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

pwa-sharchat

v1.0.0

Published

ShareChat PWA

Downloads

6

Readme

pwa-sharechat

ShareChat progressive web app (PWA)

Build Setup

# install dependencies
npm install

# serve PWA with hot reload at localhost:8085
npm run dev

# serve AMP with hot reload at localhost:8085
npm run dev:amp

# webpack build for production
npm run build:isomorphic

# run node server in production environment at localhost:8088
npm run build:server

# build for production and run node server at localhost:8088
npm run build

# build for production and view the webpack bundle analyzer report at localhost:8888
npm run build --report

# convert .svg image to react component
npm run svg

Push Notification Testing

curl -X POST -H "Authorization: key=AAAAYB5a-G8:APA91bF3ZsM9sNN7Jih3X7PVXMr5LCIuzKI4G0GDeWiOYkbMxyyEMMOJG4q9OZ1HhdFdHPaMqbmu_JoRO8EX0D7_tzBzORG2vYikTFqvB5tAdp1G7rJXIBZZ1EMdwR0i1fta4TfIukpE" -H "Content-Type: application/json" -d '{
  "notification": {
    "title": "Notification from ShareChat",
    "body": "Yay! This is a testing notification.",
    "icon": "https://cdn6.aptoide.com/imgs/f/e/b/feb715e42bb4ff2d3961c3f57cc97573_icon.png?w=240",
    "click_action": "/"
  },
  "to": "dJWT9kJtzIA:APA91bFvq7SCth4A4kbmsyHy6JQHb4y3Qo5rpL87yyCQxt5FL58V0hDunY5LJcn-e5yh-GLeJ596nk_uSEh6qb3YuWqdANjh_kxoqMRwFaLbIXr_0DERjlQbDPX4Tcey4pbR4BaEAob8"
}' "https://fcm.googleapis.com/fcm/send"
curl --location --request POST 'https://fcm.googleapis.com/fcm/send' \
--header 'Authorization: key=AAAAYB5a-G8:APA91bF3ZsM9sNN7Jih3X7PVXMr5LCIuzKI4G0GDeWiOYkbMxyyEMMOJG4q9OZ1HhdFdHPaMqbmu_JoRO8EX0D7_tzBzORG2vYikTFqvB5tAdp1G7rJXIBZZ1EMdwR0i1fta4TfIukpE' \
--header 'Content-Type: application/json' \
--data-raw '{
"lang": "Tamil",
"notification": {
"title": "life is no end",
"badge": "https://cdn6.aptoide.com/imgs/f/e/b/feb715e42bb4ff2d3961c3f57cc97573_icon.png?w=128",
"body": "Train it as hard as you can,Train it as hard as you can!!",
"icon": "https://cdn6.aptoide.com/imgs/f/e/b/feb715e42bb4ff2d3961c3f57cc97573_icon.png?w=240",
"image": "https://i.ytimg.com/vi/zNOBP7sj6UM/maxresdefault.jpg",
"data": {
"type": "follow",
"click_action": "/trending",
}
},
"to":"fo9zt1wLUFo:APA91bHFJer0MeEsof4-VatrWu7Bc3f7kdK4KNBsTbKrIxWZeFF94Xdw7MkabpQE9_Lg7gBZl6P5G3IapgY1-Ig92XDZKesyh820GO-zJRQhL5z1SW7NZz3i1OExE-SUaucNoFMHyhrC"
}'
curl --location --request POST 'https://fcm.googleapis.com/fcm/send' \
--header 'Authorization: key=AAAAYB5a-G8:APA91bF3ZsM9sNN7Jih3X7PVXMr5LCIuzKI4G0GDeWiOYkbMxyyEMMOJG4q9OZ1HhdFdHPaMqbmu_JoRO8EX0D7_tzBzORG2vYikTFqvB5tAdp1G7rJXIBZZ1EMdwR0i1fta4TfIukpE' \
--header 'Content-Type: application/json' \
--data-raw '{
"collapse_key": "do_not_collapse",
"data": {
  "payload": "{\"lt\":71,\"t\":4,\"d\":{\"p\":770031525,\"c\":69,\"n\":\"Kavita meena\",\"u\":{\"i\":\"201635976\",\"n\":\"Kavita meena\",\"pu\":\"https://cdn.sharechat.com/5930151a-a953-4c54-a59c-079c09d9337e-acdff407-8554-443e-b256-2159fcf79a24.jpeg\",\"s\":\"मुझे ShareChat पर फॉलो करें!\",\"pc\":5,\"a\":401,\"b\":74,\"h\":\"201635976\",\"vp\":0,\"config_bits\":0,\"gender\":\"M\",\"accountDeactivated\":0,\"tu\":\"https://cdn.sharechat.com/5930151a-a953-4c54-a59c-079c09d9337e-acdff407-8554-443e-b256-2159fcf79a24_thumb.jpg\",\"coverPic\":\"https://cdn.sharechat.com/348931aa_1590151392614.png\",\"branchIOLink\":\"https://b.sharechat.com/ZPRDEoFAxW\"},\"i\":{\"p\":770031525,\"c\":110,\"t\":1590278677,\"a\":201635976,\"l\":\"0\",\"x\":\"text\",\"y\":\"0\",\"h\":\"0\",\"replyCount\":\"0\",\"m\":\"Sarm karo\",\"encodedText\":null},\"offset\":\"JAA1wWwPxKT7zPqyMJd4u3BpXjR973Fr8GaQnVNWFOBMwzP0VlhgGJKmG6PVF4Vv7eWlqMCaOMZrbb5XcJxBKJZB6zsAKgW8vveBTmbRRn4wXruxJRd5XP1NUnD8NP1XDOceX8k4vld0SWyg5bV6vkUQnd8p5lW7iPP17ObVPDcNbXrrVPG8ibNz0BQ3lJFVepeBXPwdCW9lqejEG5fmD7xMn6X5Uj4wEyzKAkT7a9KpEBnBibn6WMv694TRArqQ664nS5jbmbJxZliGOp8N30XBIrKNbnj67BCqRd3A\"},\"groupedNotifVariant\":\"variant-1\",\"notifId\":\"e4b5dda9-bfd4-4b3a-b45e-ef0355d656e9\",\"creationTime\":1590278695162,\"attempt\":1,\"notifBucket\":1}"
},
"from": "412826138735",
"priority": "high",
"to":"fh7R6xSosUk:APA91bGaL6QbScEu65ydFnalWzihPZAqGuc66o-Y7Hy2q_u1djrIEEvfL9ylJ3dLMPHiNagwwUK8tRqSutuJkSQJaXX2U_u8-X6Sn0lJLjr_tO4phZn48jaY2w270M-7ARtrGkTGVCb_"
}'
curl --location --request POST 'https://fcm.googleapis.com/fcm/send' \
--header 'Authorization: key=AAAAYB5a-G8:APA91bF3ZsM9sNN7Jih3X7PVXMr5LCIuzKI4G0GDeWiOYkbMxyyEMMOJG4q9OZ1HhdFdHPaMqbmu_JoRO8EX0D7_tzBzORG2vYikTFqvB5tAdp1G7rJXIBZZ1EMdwR0i1fta4TfIukpE' \
--header 'Content-Type: application/json' \
--data-raw '{
"collapse_key": "do_not_collapse",
"data": {
  "payload": "{\"d\":[\"Saket Diwakar dekho\",\"hello\",\"https://cdn.sharechat.com/मीबनवलेलेअंगठीचेव्हिडीओ_cd0fa9e8-cc7f-4154-8ed4-4bcc9412bc12-c7d2f8c3-18fb-4b77-b04b-cd77c176edc8_cmprsd_40.jpg\"],\"f\":[\"Saket Diwakar dekho\",\"hello\",\"https://cdn.sharechat.com/मीबनवलेलेअंगठीचेव्हिडीओ_cd0fa9e8-cc7f-4154-8ed4-4bcc9412bc12-c7d2f8c3-18fb-4b77-b04b-cd77c176edc8_cmprsd_40.jpg\"],\"actionData\":{\"type\":\"post\",\"action\":\"open_activity\",\"referrer\":\"notification\",\"postId\":\"681592664\"},\"t\":75,\"lt\":55,\"ti\":1590165919,\"notificationIcon\":\"\",\"notificationThumb\":\"https://cdn.sharechat.com/मीबनवलेलेअंगठीचेव्हिडीओ_cd0fa9e8-cc7f-4154-8ed4-4bcc9412bc12-c7d2f8c3-18fb-4b77-b04b-cd77c176edc8_cmprsd_40.jpg\",\"notificationLargeImage\":\"https://cdn.sharechat.com/9c82c20_1581499941395.jpeg\",\"subType\":\"Emergency_Notification\",\"notifId\":\"866fcc90-e77f-4ac1-9970-add3d111f3e8\",\"creationTime\":1590165918983,\"attempt\":1,\"notifBucket\":8,\"ttl\":7200,\"errorOffset\":300}"
},
"from": "412826138735",
"priority": "high",
"to":"fo9zt1wLUFo:APA91bHFJer0MeEsof4-VatrWu7Bc3f7kdK4KNBsTbKrIxWZeFF94Xdw7MkabpQE9_Lg7gBZl6P5G3IapgY1-Ig92XDZKesyh820GO-zJRQhL5z1SW7NZz3i1OExE-SUaucNoFMHyhrC"
}'
curl -X POST -H "Authorization: key=AAAAYB5a-G8:APA91bF3ZsM9sNN7Jih3X7PVXMr5LCIuzKI4G0GDeWiOYkbMxyyEMMOJG4q9OZ1HhdFdHPaMqbmu_JoRO8EX0D7_tzBzORG2vYikTFqvB5tAdp1G7rJXIBZZ1EMdwR0i1fta4TfIukpE" -H "Content-Type: application/json" -d '{
"notification": {
"title": "Topic Notification from ShareChat",
"body": "Yay! This is a targetted notification.",
"icon": "https://cdn6.aptoide.com/imgs/f/e/b/feb715e42bb4ff2d3961c3f57cc97573_icon.png?w=240",
"click_action": "/"
},
"to": "/topics/wildling"
}' "https://fcm.googleapis.com/fcm/send"

Find all locales string regex for editors

  • install copy-find-results plugin in Atom
  • cmd + shift + F => locales.([a-zA-Z0-9_]+) => Right click => Copy find results (text) => cmd + F => Find All => Tab switch and switch back => cmd + C => cmd + V

special cases

http://sharechat.com/item/3RbDqn // no tag in post data

Sonarqube local setup

docker-compose -f docker-compose.sonar.yml up -d

// open http://localhost:9000 and login with username and password both as admin

// generate token from account and use it in sonar-project.js file

// generate coverage report
npm run test:coverage

// this will use the coverage report and push it to sonarqube dashboard locally
npm run sonar

// open http://localhost:9000