# Why
Fixes that QR code on web UI pointed to the `Expo Go` directly instead of to the interstitial page.
Fallback to the SDK version if the runtime version wasn't defined.
# How
- Extended the dev graphQL server to serve Interstitial page URL if available.
# Test Plan
- runs the local version of the CLI and confirms that the web QR code points to the correct place.
- checks if the SDK version was detected when the runtime version isn't available.
* Rename @expo/xdl to xdl
* Remove unused modules from the xdl interface
* Remove unused TurtleApi
* Remove unused Detach.detachAsync
* Remove unused code in src/detach folder
- Remove StandaloneContextService (this code now always runs in user context)
- Remove unused functions in ExponentTools and IosWorkspace
- Remove unused modules
- All of the remaining files in src/detach folder are now TypeScript for easier refactoring
* Remove `xdl.Modules`
* remove 2 extra config reads from expo start
* Added optional config to start RN server
* make getSlugAsync accept an optional ExpoConfig
* Better API
- Give android parity with #2541
- Support multiple connected android devices
- Support opening Android emulators/devices from a list
- Support prompt to update client automatically
- Improve emulator boot-up
- Improve error messages
Co-authored-by: Brent Vatne <[email protected]>
- fix interactions after prompting user to upgrade
- bring simulator to the front when the link is opened in it
- prompt to upgrade automatically
- maximize reuse across functions, cutting down on possible edge cases in our abstraction
- add ability to select simulators
- prompt user to select a simulator from a list when no simulators are open
- add shift+i for selecting more simulators
- shim out methods for other simulator utilities
- provide better methods for ensuring that a simulator fully boots up
- created simcontrol module for extending simctl
Co-authored-by: Brent Vatne <[email protected]>
* [xdl] Start Ngrok only when running expo start --tunnel
Fixes#335
* this doesn't actually return packagerOpts, so destructure instead of using incorrect name
* [dev-tools] toggling 'tunnel' in DevTools should start tunnels
* Update packages/dev-tools/server/graphql/GraphQLSchema.ts
Co-authored-by: Ville Immonen <[email protected]>
Co-authored-by: Ville Immonen <[email protected]>
* [dev-tools] Initialize new Expo app
* [dev-tools] remove decorators
* [dev-tools] get UI rendering via Expo Web instead of NextJS
* [dev-tools] use path.resolve to remove leading slash
* [dev-tools] get Expo Web dev-tools running on `expod start`
* [dev-tools] get local dev server working with `expo start`-ed UI
* [dev-tools] add nodemon watcher for developing DevToolsServer and create script for developing DevTools UI.
This also removes the `yarn start` script, as you should run `yarn dev-server <path>` and `yarn dev-ui` in separate terminals.
* [dev-tools] update README.md
* [dev-tools] build/develop DevTools client using xdl directly
* [dev-tools] add emotion babel plugin dep
* [website] remember to install client dependencies
* [dev-tools] check before cleaning dist path
* [dev-tools] remove nextjs config files
* [dev-tools] test if adding next back to the devtools package unbreaks CI
* Revert "[dev-tools] test if adding next back to the devtools package unbreaks CI"
This reverts commit 3647e51eff44eaddb65c322a66c9728e97b5a0b6.
* [dev-tools] try to add *correct* NextJS back to fix CI
* [dev-tools] use correct start script to not start metro
* [dev-tools] remove redundant main field
we should stop generating this in the template if it's default now
* [dev-tools] remove redundant platforms field
* [dev-tools] moved indexpage to appjs
* Update packages/dev-tools/client/.gitignore
Co-Authored-By: Evan Bacon <[email protected]>
* [dev-tools] be more specific about what version of dev-tools you should be testing
* [dev-toold] reduce size from 4.3mb to 1.2mb (on-par with nextjs predecessor)
* [dev-tools] import name properly
* [dev-tools] tell developers to not run `expo start` when trying to `yarn dev`
* [dev-tools] retake: remove manifest, run on port 19002, and support relative paths
Co-authored-by: Evan Bacon <[email protected]>
Fix a memory leak resulting in warnings like this to be generated by
Node:
```
(node:14054) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ADDED listeners added to [Issues]. Use emitter.setMaxListeners() to increase limit
(node:14054) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 UPDATED listeners added to [Issues]. Use emitter.setMaxListeners() to increase limit
(node:14054) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 DELETED listeners added to [Issues]. Use emitter.setMaxListeners() to increase limit
```
To reproduce the bug I refreshed the browser tab with Dev Tools in it
10+ times. After this, the warning shown above was printed in the
terminal.
The underlying cause was that each time the browser subscribed to the
logs, `addListener` was called in `eventEmitterToAsyncIterator`, but
the corresponding `removeListener` was never called.
There was code wrapping async iterators in the Dev Tools server, which
did not implement the `return()` and `throw()` methods of the async
iterator. For this reason, whenever a client disconnected, the async
iterator was not cleaned up.
* fix(dev-tools): ability to specify listen host for devtool (#1081)
Added support for environment variable EXPO_DEVTOOLS_LISTEN_ADDRESS,
which is used to bind Expo DevTools instance in given address. If this
variable is not given, 'localhost' is used instead.
* fix: get actual hostname
Assign arrow function return value to variable, instead of having it as function.
* Refactoring for code style
Moved devtoolsGraphQLHost and devtoolsHost function definitions
This patch adds four measures to limit access to the local WebSocket
API of Dev Tools.
- The WebSocket API endpoint URL now includes a secret token.
Requests to the API without the ticket are unauthorized, for example:
ws://localhost:19002/M2vbMDtkD-hVJGCegdw3BytRFV5JbQXPM2pLbYwgQDo/graphql
- WebSocket connections without a correct `Origin` header are rejected.
- After a connection is established, the client needs to inclue
`clientAuthenticationToken`, another secret token.
- The HTTP server of Dev Tools is only listening connections to `localhost`.
The secret tokens are obtained from a new HTTP endpoint `/dev-tools-info`.
Thanks to Spencer von der Ohe for reporting this issue.
npm currently has issues with 3 character package names (https://status.npmjs.org/incidents/qg46dsfk1vt2) and scoped packages also have more permission options available (e.g. npm access command only works with scoped packages).
* Add optimize command and read in bundled assets
* Add sharp to dependencies and compress images
* Use assets.json in .expo folder to store which assets have been modified
* Store assets by their checksum in .expo-shared and add --save option
This commit switches to storing assets.json in a new .expo-shared folder
rather than .expo so that it can be checked into git and state can be shared
amongst multiple people . It also now keeps track of files using the SHA256
checksum of their contents rather than their inodes or names which allows it
to work crossplatform and accross different machines. Finally, I added a --save
option to save the original assets and switched to overwriting them and
not saving the unoptimized versions by default.
* Delete unused hash values in assets.json and log when no assets are optimized
Deleting unused hash values allows us to remove entries in assets.json for assets that were deleted or modified
* Only search for assets files in project directory
* Output KB saved and remove 'optimized' assets if larger than original
* Update function to convert number of bytes to a human readable value
* Add warning and prompt the user if --save flag is not passed in
* Prompt user to optimize assets before publishing
* Add toggle for asset optimization in dev-tools
* Add optimize functionality to dev-tools GUI
Moves core logic of optimization to xdl and imports from within expo-cli and
dev-tools. Adds a new Graph QL mutation which the dev-tools front end
calls to trigger the xdl optimizeAsync function.
* Add message about assets.json when it's created.
* Use path.join instead of string concatenation
* Move helper functions into a new AssetUtils module
* Add --include and --exclude options to filter files
* Clarify that --include and --exclude patterns are relative to proj root
* Make logs less colorful
* Update prompt messages to be more clear
* .expo -> .orig for backups
* Remove backup prompt/warning when there are no assets to optimize
* Update prompt message to backup original files
This removes SMS from the UI for sending project development links. The server endpoint still behaves the same, but the UI now promotes email over SMS. Email is more reliable, much cheaper, and more customizable. We'll make a similar change on web as well.
Test plan: Ran the CLI on a test project and verified that both the CLI and web UI showed just "email" without "SMS" for sending links.
npm sets the mtime of all files in published tarballs to
"Sat, 26 Oct 1985 08:15:00 GMT", which messed up with the
browser cache of the static files in dev-tools, because the
server responded with 304 Not Modified after upgrading the
package, as the mtime had not changed.