npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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.