@edgar/2 fa with backwards compat (#1476)
@edgar/2 fa with backwards compat (#1476)

* [dev][exp] Add localAuthFlow flag

* [exp] Change gulp to save the ruby authing scripts

* [exp] Validate locally the Apple Certs

* [exp] Add tmp pkg

* [exp] Check App ID locally

* [exp] Add build function based on local auth

* [exp]Provide for unix clients to generate their own p12

* [exp] Write out the unix openssl usage for cert/pass gen for iOS standalone build

* [xdl][turtle-agent] Add provisionProfile to credentials

* [turtle-agent] Use provision profile if provided by credentials www/API

* [exp] Add base local auth, helpers and validators

* [exp] Separate out message to enduser, fix missing await in local auth

* [exp] Prompt for provision profile

* [turtle-agent] EnsureAppID is noop when client provided provision profile already

* [exp] VC windows client for local auth, temp disable validateCredentials bc push cert not done yet

* [turtle-agent][xdl] Add extra field to credentials

indicating that exp made creds on client machine, account for it in turtle

* [exp] Use local creds creation for exp standalone apps

* [exp] Add more context for user in local auth flow

* [exp] Typo

* [exp] Add more context & information for end user in local auth flow

* [exp] Run ensure AppID locally with --local-auth for building standalone

* [exp] Factor out a high level app flow for local auth across platforms

* [exp] Use Linux openssl auth flow until security and traveling ruby on os x packaged

* [exp] Use node-tar

* [exp] Expand out gzipped traveling_fastlane

* [dev] VC traveling_fastlane scripts, build system

* [dev] Add package.json, index.js for traveling-fastlane

* [dev] traveling-fastlane wrapper gives more path info

* [exp] Remove assumption of exp distributing ruby scripts

* [traveling-fastlane] Provide caller all paths of scripts

* [exp] Update windows-client API for local auth, sketch out idea

* [traveling-fastlane] Fill out validate_apple_credentials.rb

* [traveling-fastlane] Implement fetch_cert.rb, gets prod cert from Apple on OS X or Linux

* [traveling-fastlane] Fix incorrect attribute in error handling

* [traveling-fastlane] Implement fetch_push_cert

* [traveling-fastlane] Add missing require and fix exception in validate apple credentials

* [traveling-fastlane] Fill out impl of new provision profile script

* [traveling-fastlane] Fill out ensure_app_id implementation

* [traveling-fastlane] Fold responsibility of ensure_app_id and create_app_on_dev_center

* [traveling-fastlane] create application through Tunes, not developer portal

* [traveling-fastlane] Adjust parameters for made app on iTunesConnect

* [traveling-fastlane] Check for app on Apple Portal and create

* [traveling-fastlane][exp] Consume results from ruby local auth scripts

* [traveling-fastlane] Adjust Rakefile to reflect renamed app_management script

* [traveling-fastlane][exp] Fix ruby script, have darwin client consume traveling-fastlane

* [traveling-fastlane] Fix ruby push cert script

* [traveling-fastlane] Commuicate over file JSON to parent node process from ruby

* [traveling-fastlane] Fix two attribute exception mistakes

* [traveling-fastlane] Pick the latest cert always

* [traveling-fastlane] Create optional dependencies, remove unneeded files

* [exp] Use optional dependencies for per platform install

* [exp][traveling-fastlane] Implement 2FA on Unix systems

* [exp] VC auth functions using local ruby scripts

* [exp] Change name of local auth CLI flag

* [traveling-fastlane] Bump version to 1.0.1 with newest scripts, update Rakefile

* [exp] Bump dependency on traveling fastlanes, update lock

* [traveling-fastlane] Use provisioning profile for bundle ID if it exists, otherwise make a new one

* [traveling-fastlane] Release new version for change in provisioning profile script

* [traveling-fastlane] Bump version, fix Rakefile

* [exp] Bump dep version of traveling-fastlane

* [exp] Make sure all data persisted to Apple credentials are strings

* [traveling-fastlane] Do not VC runtimes for publishing or vendor of packaging, add logic to Rakefile

* [traveling-fastlane] Remove some VCed tarballs

* [exp] Remove some unnecessary changes & code re 2FA

* [exp] Be sure to keep username, account and team ID on fresh account

* [2FA] Fixes and changes as requested in PR 1476

* [traveling-fastlane] Typo, win32 not win

* [traveling-fastlane] Version bump for win32 mistake

* [exp] Bump versions of traveling-fastlane used

* [exp][traveling-fastlane] Make sure Linux DOES install on windows, bump version

* [exp][traveling-fastlane] Make sure to clean up after rake package in publish, bump version

* [exp] Only keep teamId with new local auth

* [traveling-fastlane] Assume JSON replies over stderr instead of file based RPC

* [exp] Assume JSON replies over stderr instead of file based RPC

* [exp] Rename local_auth to local-auth

* [exp] Implement changes requested on PR 1476

* [exp] Get teamID after validating credentials, save end user from touching apple portal

* [exp] Publish teamId providing traveling-fastlane package

* [exp][traveling-fastlane] Provide more robust error message on provisioningProfile

* [exp][traveling-fastlane] Bump version to 1.0.11

* [exp] Simplify and remove async/await where was not needed

* [exp] Provide windows support for local auth, fix missing teamId, factor out error handling

fbshipit-source-id: b24c8549ac

exponentjs/xdl,exponentjs/xdl,exponentjs/xdl