Commit Graph

50 Commits

Author SHA1 Message Date
James Ide d4d1608ee6 Expose the projectRoots option
Summary: This was already implemented -- just documenting it in the CLI.
Closes https://github.com/facebook/react-native/pull/3246

Reviewed By: svcscm

Differential Revision: D2560211

Pulled By: martinbigio

fb-gh-sync-id: c4e4d974db28d6251636ff38bfcb0afdf5148de7
2015-10-20 09:49:27 -07:00
Jared Forsyth 4a1ae23e4c Devtools websocket
Summary: I thought this was already in here, but then it wasn't. It's connected to by RN [here](https://github.com/facebook/react-native/blob/master/Libraries/Devtools/setupDevtools.js#L17).
Closes https://github.com/facebook/react-native/pull/3431

Reviewed By: @​svcscm

Differential Revision: D2548286

Pulled By: @frantic

fb-gh-sync-id: ffd74426949196ca538c897c1a0d07d08b204630
2015-10-16 03:41:05 -07:00
Martín Bigio 67ab9dadb9 Move oss server to cli
Summary: @​public We're moving all the operation from `local-cli` to the `private-cli` and improving the code in the process. On this diff we introduce the `server` command which will be use to start the packager server. On follow up diffs we'll make changes to start using it from `local-cli`.

Reviewed By: @vjeux

Differential Revision: D2531443

fb-gh-sync-id: 5f7f12a250895265d83d1b076f6bbddb5cbdc257
2015-10-13 06:44:12 -07:00
Martín Bigio fc7d01e2ab fix E2E tests
Reviewed By: @mkonicek

Differential Revision: D2526310

fb-gh-sync-id: 1c04f56073dc5b393a36b258c039fdfd85ab83a2
2015-10-09 07:59:02 -07:00
Martín Bigio d6db826e55 Server failing on start up
Summary: @​public
When doing node <script> some es6 features like const seem to work. But when we extracted some of them into other files and require them through babels require infra it started failing because the paths where those files are located where not on the `only` whitelist.

Reviewed By: @vjeux

Differential Revision: D2525557

fb-gh-sync-id: 79752c4f9b8ff2d20f73cfe27d6a2f3706959d95
2015-10-08 21:08:21 -07:00
Martín Bigio c9317c1445 Unify oss and internal version of base body loader middleware
Reviewed By: @amasad

Differential Revision: D2519637

fb-gh-sync-id: 88f23c33a1ca0423852ce8ed7696df811e3f8d27
2015-10-08 14:21:15 -07:00
Martín Bigio cd33f0d269 Factor out cpu profiler middleware into it's own file
Reviewed By: @amasad

Differential Revision: D2519562

fb-gh-sync-id: c2b2ba56072d75d7082740532b5d1959273c84f4
2015-10-08 14:21:07 -07:00
Martín Bigio 2fd2ca4867 Unify oss and internal version of systrace profiler middleware
Reviewed By: @amasad

Differential Revision: D2519518

fb-gh-sync-id: 6682f80447e2b62fcf6b137412ca8ddbe03ecb09
2015-10-08 14:20:58 -07:00
Martín Bigio b8a8df1052 Unify oss and internal version of status page middleware
Reviewed By: @vjeux

Differential Revision: D2519415

fb-gh-sync-id: 2cf27c88b29c18a7a1f3aa1611f0d7f510a8fa24
2015-10-08 14:20:50 -07:00
Martín Bigio e742683859 Unify oss and internal version of stack trace editor opener
Reviewed By: @vjeux

Differential Revision: D2519344

fb-gh-sync-id: 022d8865cd8eea3b0b51f9070c000f15c464dc6a
2015-10-08 14:20:42 -07:00
Martín Bigio e5296785bf Unify oss and internal version of dev-tools middleware
Reviewed By: @amasad

Differential Revision: D2518928

fb-gh-sync-id: 0c98b16481b524436a2cf4af3e196ac5715b55ee
2015-10-08 14:20:33 -07:00
Tadeu Zagallo fb57c3a601 Fix profiler setup
Summary: @​public

Update packager entry and profiler pre-built dylib +
Update makefile to make it easier to use different versions of Xcode
and shortcircuit when using the wrong version.

Reviewed By: @jspahrsummers

Differential Revision: D2498157
2015-10-01 15:05:23 -07:00
Jan Kassens ae3bf52f02 Fix for displayName transform
Summary: The `react.displayName` transform was added in 93b9329b758cde3e921b26e11ba91d9700d2a06d.

That diff missed to update the `.babelrc` where the comment says it should stay
in sync (I'm not sure where it's used though). I added a comment in the other
direction so this can be prevented in the future.

I also updated the `cacheVersion` so we actually transform the code again to add
the missing displayName properties to unchanged components.
Closes https://github.com/facebook/react-native/pull/2905

Reviewed By: @vjeux

Differential Revision: D2473447

Pulled By: @kassens
2015-09-24 08:20:02 -07:00
oveddan fd0a9c1557 Have the chrome debugger run javascript within a web worker, to remove the global document.
Summary: To make the chrome debugger environment consisten with the JSC executer environment,
where there is no `window.document`, make the chrome debugger run the javascript inside a web worker.

This fixes #1473
Closes https://github.com/facebook/react-native/pull/1632

Reviewed By: @martinbigio

Differential Revision: D2471710

Pulled By: @vjeux
2015-09-24 08:19:55 -07:00
Tadeu Zagallo 1ce0853c39 Remove use of const from packager and add systrace internally
Reviewed By: @martinbigio

Differential Revision: D2471270
2015-09-23 10:56:31 -07:00
Martin Bigio 9daabfa30c Remove `node_modules` dir early fail check
Reviewed By: @vjeux

Differential Revision: D2464127
2015-09-21 17:51:35 -07:00
Tadeu Zagallo 270b1c718f Automatically save and convert JavaScript profile to chrome format
Summary: @​public

Migrate scripts to open source and add new route on the packager
to directly convert profiler outputs to a devtools compatible format.

Reviewed By: @jspahrsummers

Differential Revision: D2425740
2015-09-11 06:40:26 -07:00
Tadeu Zagallo 91e235465b Move systrace helper out of the packager
Summary: @​public

The profiler helper shouldn't live inside the packager itself, move
it to the packager.js file with other middlewares.

Reviewed By: @martinbigio

Differential Revision: D2424878
2015-09-09 11:25:24 -07:00
Martín Bigio 4b14a2f783 [react-packager] Add command line option to reset cache on OSS 2015-09-07 01:16:44 -08:00
Felix Oghină dbdf7f366f [reactnative] remove platform option from oss packager 2015-08-26 04:49:41 -08:00
Alex Kotliarskyi 37774b463d [ReactNative] Unbreak debugger 2015-08-21 11:20:17 -07:00
Harrison Harnisch ef7dc94907 UI CPU and memory utilization graphs in Chrome debugging mode
Summary:
Chrome debugging UI is currently only showing connection state and logs in the console, leaving room for plenty of interesting information.

I've pushed the UI (using the same convention set by FPS -- UI/JS) CPU and memory utilization data over the debug Websocket and tapped into the existing stream of JS calls that get ran in V8.

The number of JS calls in a time interval is counted for all sub calls in a batch
https://github.com/hharnisc/react-native/blob/master/packager/debugger.html#L150

The last 5 batches of JS calls are displayed in a list format.

<img width="951" alt="screen shot 2015-07-19 at 7 34 00 pm" src="https://cloud.githubusercontent.com/assets/1388079/8769257/edc42f70-2e4d-11e5-8813-e86ef530a446.png">

Charts are created with [Chart.JS](https://github.com/nnnick/Chart.js) (MIT licensed).
Closes https://github.com/facebook/react-native/pull/2050
Github Author: Harrison Harnisch <hharnisc@gmail.com>
2015-08-21 02:11:45 -07:00
James Ide 01d07a3eb6 [io.js] Print a warning message if the user is not on io.js 2.x
Summary:
Detects if the user is on Node or io.js 1.x and prints a banner explaining how to upgrade. We probably should link to more detailed upgrade docs so this is just a start.

I also added a function to format banners that is kind of useful.

Addresses part of #1737

![packager-banner](https://cloud.githubusercontent.com/assets/379606/8447050/ad615402-1f67-11e5-8c02-ece5f7488135.png)

Closes https://github.com/facebook/react-native/pull/1824
Github Author: James Ide <ide@jameside.com>
2015-07-10 00:32:46 -08:00
Joe Wood 157a77e48d [Packager] Windows support for Packager - Blacklist changes
Summary:
Another Pull Request implementing the changes in issue #468 - Enabled Packager to run on Windows
This change relates to the blacklist fixes. It includes the path conversion for blacklist and changes to the default watched directory.  It has no impact on Mac OSX.
Closes https://github.com/facebook/react-native/pull/893
Github Author: Joe Wood <joewood>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-06-26 16:27:12 -08:00
Johannes Lumpe d70ff04746 [Packager] Allow user to specify a custom transformer file
Summary:
This is an edited re-submission of #1458 because I'm stupid.
Closes https://github.com/facebook/react-native/pull/1497
Github Author: Johannes Lumpe <johannes@johanneslumpe.de>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-06-26 16:00:37 -08:00
Philipp von Weitershausen fca872fac2 [React Native][Packager] allow --assetRoots to be relative paths 2015-06-22 12:58:04 -08:00
Jarek Potiuk 23ac061d83 Added support for React installed in the application via Cocoapods
Summary:
Similarly to npm-installed react, this change makes changes to the packager so that it understands that it's been installed via Cocoapods and determines the project and asset roots properly (from the main application directory).
Closes https://github.com/facebook/react-native/pull/1568
Github Author: Jarek Potiuk <jarek@potiuk.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-06-22 03:15:31 -08:00
Tadeu Zagallo 24026b6c25 [ReactNative] Revert packager ignoring node_modules 2015-06-11 10:45:32 -08:00
rickyc 91dcbe0905 Debugger won't start due to spaces in directory path
Summary:
Similar issue to #214. When I attempt to do command + D in the simulator, I get the following issue.

```
Launching Dev Tools...
Failed to run launchChromeDevTools.applescript { [Error: Command failed: /bin/sh -c /Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packager/launchChromeDevTools.applescript http://localhost:8081/debugger-ui
/bin/sh: -c: line 0: syntax error near unexpected token `Personal'
/bin/sh: -c: line 0: `/Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packager/launchChromeDevTools.applescript http://localhost:8081/debugger-ui'
]
  killed: false,
  code: 2,
  signal: null,
  cmd: '/bin/sh -c /Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packager/launchChromeDevTools.applescript http://localhost:8081/debugger-ui' }

/bin/sh: -c: line 0: syntax error near unexpected token `Personal'
/bin/sh: -c: line 0: `/Users/ricky/Dropbox (Personal)/Sites/AwesomeProject/node_modules/react-native/packa
Closes https://github.com/facebook/react-native/pull/348
Github Author: rickyc <rickyc.us@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-06-02 15:13:55 -08:00
James Ide ea9ca4637c [Packager] Fix the --root, --assetRoots, and --platform options
Summary:
Looks like these options were handled as booleans when they should be handled as strings. Explicitly specify them as strings.

Closes https://github.com/facebook/react-native/pull/1377
Github Author: James Ide <ide@jameside.com>

Test Plan:
 `packager/packager.sh --root A --root B` works. Also tested `packager/packager.sh --root A,B`.
2015-05-26 14:19:22 -08:00
Amjad Masad 936f786765 [react-native] Make document.js into a polyfill. Fixes #1149
Summary:
@public
document shimming must run before anything else. However, we don't currently guarantee that. This moves the document shimming into `document.js` which is used as a polyfill.

Test Plan:
* start server
* go to playground app
* require `NativeModules` as the first thing
* open chrome debugger
* no error
2015-05-13 17:50:21 -08:00
Spencer Ahrens 876f1084af [ReactNative] temp disable flow check in packager for OSS 2015-04-27 19:13:33 -08:00
Amjad Masad 749c81842c [react-packager] Add jpe?g to asset extensions 2015-04-21 11:06:01 -08:00
Philipp von Weitershausen 241e263e5e [ReactNative] allow running JS app server for Android from fbobjc 2015-04-14 10:28:07 -08:00
Ben Alpert c24fc75a53 [react-native] Listen on all IPv6 interfaces 2015-04-08 14:23:52 -08:00
Spencer Ahrens 061de15c1c [ReactNative] Do flow check when running packager 2015-04-07 21:40:05 -08:00
Alex Kotliarskyi 5cbbc10e4f [ReactNative] Better error message for EADDRINUSE 2015-04-07 15:39:36 -08:00
Steve Lacy 461f169a9e Update deps order - core modules first
Summary:
**packager/packager.js**

- Update deps order - node core modules first

The core deps do not get installed, and do not need to be after the dep check.
Closes https://github.com/facebook/react-native/pull/224
Github Author: Steve Lacy <me@slacy.me>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-02 17:05:40 -08:00
Justin Carmony ceeb06eb1a Packager status page & build validating against it.
Summary:
Creating a packager status page so React can validate a proper packager instance is running on 8081.

See #257 for details on this bug.

The biggest thing in this PR is I have it perform an exit 2 in the build script if the check fails. This will cause the build to fail, they can click on the error and see a nice message. Not sure if there is a way to throw a warning instead.

Also, I broke the bash script into several lines, in the Xcode editor it looks fine but in the source code it looks less than ideal. We might want to break that out into it's own bash script that is called. Let me know if you want to do that.
Closes https://github.com/facebook/react-native/pull/308
Github Author: Justin Carmony <justin@justincarmony.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-31 23:01:04 -08:00
Amjad Masad a895e62e6d [react-packager] Fix assetRoots when starting in node_modules 2015-03-27 19:08:24 -08:00
James Ide ecfc78f47e [Assets] Allow scripts to override assetRoots
Summary:
The CLI parse was accepting a string but assetRoots should be an array, so split on commas. Tested by specifying a root directory that was at least two folders up (../../stuff).
Closes https://github.com/facebook/react-native/pull/189
Github Author: James Ide <ide@jameside.com>

Test Plan:
* export to open source
* started server passing --assetRoots array
2015-03-26 01:24:08 -08:00
Christopher Chedeau a2c32d4d29 [ReactNative] Expanded license on js packager files 2015-03-23 11:28:51 -08:00
Alex Kotliarskyi 098d7bfa45 [ReactNative] Print directories packager is serving files from 2015-03-22 22:37:55 -08:00
Alex Kotliarskyi 601b21fa79 [ReactNative] Adjust packager default root when running from within node_modules 2015-03-20 16:12:57 -08:00
Amjad Masad 98ed9422c2 [react-packager] Make sure projectRoots is converted to an array 2015-03-20 14:09:31 -08:00
Alex Kotliarskyi 72ad4e5be8 [ReactNative] Bring Chrome debugger to OSS. Part 2 2015-03-19 11:48:51 -08:00
Amjad Masad ace7e3613f [react-packager] Add assetRoots option 2015-03-18 18:26:35 -08:00
Amjad Masad a4d041ce62 [react-packager] Make dev a query param option 2015-03-04 21:24:08 -08:00
James Ide ee00675dab [react-packager] Add dev option to CLI | James Ide
Summary:
Exposes the dev option that is already there to the CLI so that you can turn off invariant checks, etc. I also made it omit the inlined source map when dev=false which made it a lot faster to run on a phone, both due to smaller download size and fewer bytes to copy from Obj-C to JS and evaluate.
Closes https://github.com/facebook/react-native/pull/112
Github Author: James Ide <ide@jameside.com>

Test Plan:
* ./runJestTests.sh
* test bundle creation with `bundle.sh`
* test `load_dependencies.js` script
* start the server and click around shell app
2015-03-02 21:11:07 -08:00
Spencer Ahrens 382e1553af [react-packager][streamline oss] Move open sourced JS source to react-native-github 2015-02-19 21:25:11 -08:00