ern-sourcemap-store
v1.0.1
Published
## Setup
Downloads
2
Readme
Electrode Native Source Map Store Server
Setup
- Install the source map store server
npm install -g ern-sourcemap-store
- Start the source map store server (with default configuration)
ern-sourcemap-store
ern-sourcemap-store
executable expose the following command line options:
--host <string>
The server host/ip (default: 0.0.0.0)--port <number>
The server port (default 3000)--max-container-maps <number>
Maximum number of container source maps to keep (per application version) (default -1)--max-codepush-maps <number>
Maximum number of code push source maps to keep (per application version) (default -1)--store-path <string>
Local path to the directory containing the database and store files (default to $cwd/store)
Development
If you are only planning to use the Source Map Store server with Electrode Native, you shouldn't pay much attention to this section unless you wish to know more about the different routes exposed by the server.
On the other hand, if you are interested in contributing to this project, or forking it for your own needs, this section might prove useful.
- To run from source :
npm start
- To run the tests :
npm test
REST API routes
GET /status
Get the current status of the server
Response will always return HTTP 200 OK
status code as long as the server is running.
POST /symbolicate/container/:app/:platform/:version/:containerVersion
Symbolicate a stack trace of a Container bundle
Content-Type header should be set to text/plain
Can be used to symbolicate the JS stack trace of an exception being thrown from the bundle included in a specific Container.
Example:
POST /symbolicate/container/myapp/android/1.0.0/19.0.0
Sample Request Body
onPress@364:619
touchableHandlePress@203:2130
touchableHandlePress@195:9628
Sample Response Body
onPress@25:65 [miniappA/App.js]
touchableHandlePress@213:45 [react-native/Libraries/Components/Touchable/TouchableNativeFeedback.android.js]
touchableHandlePress@878:34 [react-native/Libraries/Components/Touchable/Touchable.js]
Symbolicate the provided JS stack trace, that is being thrown from Container version 19.0.0
of myapp:android:1.0.0
native application version. The symbolicated stack trace will contain the line
/column
of original source file, along with source file path.
POST /symbolicate/codepush/:app/:platform/:version/:deploymentName/:label
Symbolicate a stack trace of a CodePush bundle
Content-Type header should be set to text/plain
Can be used to symbolicate the JS stack trace of an exception being thrown from a bundle that has been code pushed.
Example:
POST /symbolicate/codepush/myapp/android/1.0.0/Production/v37
Sample Request Body
onPress@364:619
touchableHandlePress@203:2130
touchableHandlePress@195:9628
Sample Response Body
onPress@25:65 [miniappA/App.js]
touchableHandlePress@213:45 [react-native/Libraries/Components/Touchable/TouchableNativeFeedback.android.js]
touchableHandlePress@878:34 [react-native/Libraries/Components/Touchable/Touchable.js]
Symbolicate the provided JS stack trace, that is being thrown from a Production
bundle with label v37
that was CodePush to myapp:android:1.0.0
native application version. The symbolicated stack trace will contain the line
/column
of original source file, along with source file path.
POST /sourcemaps/container/:app/:platform/:version/:containerVersion
Upload the source map of a Container bundle to the server
The sourcemap should be attached to the request as multi part file upload using sourcemap
field name.
Example:
POST /sourcemaps/container/myapp/android/1.0.0/19.0.0
Upload the source map of the bundle of myapp:android:1.0.0
Container v19.0.0
POST /sourcemaps/codepush/:app/:platform/:version/:deploymentName/:label
Upload the source map of a CodePush bundle to the server
The sourcemap should be attached to the request as multi part file upload using sourcemap
field name.
Example:
POST /sourcemaps/codepush/myapp/android/1.0.0/Production/v37
Upload the source map of the bundle CodePushed to Production
deployment name with label v37
of myapp:android:1.0.0
native application version.
POST /sourcemaps/codepush/copy/:app/:platform/:version/:deploymentName/:label/:toVersion/:toDeploymentName/:toLabel
Copy a CodePush source map to a different version/deployment name/label
This can be used when CodePush is promoting an existing bundle, when the bundle and source map are not regenerated but instead reused.
Example:
POST /sourcemaps/codepush/myapp/android/1.0.0/QA/v37/1.0.0/Production/v38
Copy the sourcemap associated to the bundle CodePushed to QA
with label v37
, to Production with label v38
for the same native application version (this mostly correspond to a bundle that has been promoted on the CodePush server from QA
to Production
)
GET /sourcemaps/container/:app/:platform/:version/:containerVersion
Download a Container bundle source map from the server
Example:
GET /sourcemaps/container/myapp/android/1.0.0/19.0.0
Download the source map of Container v19.0.0
of myapp:android:1.0.0
native application version.
GET /sourcemaps/codepush/:app/:platform/:version/:deploymentName/:label
Download a CodePush bundle source map from the server
Example:
GET /sourcemaps/codepush/myapp/android/1.0.0/Production/v37
Download the source map of the bundle CodePushed to Production
deployment name with label v37
of myapp:android:1.0.0
native application version.