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

urx-next

v1.0.0

Published

URX next - Front End application

Downloads

3

Readme

URX Front End App

Quality Gate Status Build Status

Set Up Local Environment

In order to avoid CORS for IdaaS service, we will be using a host entry

127.0.0.1 idm02.somerslab.ibm.com What this will is, it will serve localhost as idm02.somerslab.ibm.com

Nginx Reverse Proxy

     error_log /usr/local/var/log/nginx/error.log;

     events {
       worker_connections  1024;
     }

     http {

         map $http_upgrade $connection_upgrade {
             default upgrade;
             '' close;
         }

         upstream websocket {
             server localhost:3001;
         }

       # This should be in the same directory as this conf
       # e.g. /usr/local/etc/nginx
       include       mime.types;
       default_type  application/octet-stream;

       # Note this log_format is named 'main', and is used with the access log below
       log_format   main '$remote_addr - $remote_user [$time_local]  $status '
         '"$request" $body_bytes_sent "$http_referer" '
         '"$http_user_agent" "$http_x_forwarded_for"';

       sendfile        on;
       keepalive_timeout  65;

       # Without this I got this error: 'upstream sent too big header
       # while reading response header from upstream'
       proxy_buffer_size   128k;
       proxy_buffers   4 256k;
       proxy_busy_buffers_size   256k;

       server {
           listen 443 ssl;
           #server_name tools.caseonit.net;
           access_log /usr/local/var/log/nginx/tools.caseonit  main;

           ssl_certificate           /usr/local/etc/nginx/cert.crt;
           ssl_certificate_key       /usr/local/etc/nginx/cert.key;
           #ssl on;
           ssl_session_cache  builtin:1000  shared:SSL:10m;
           ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
           ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
           ssl_prefer_server_ciphers on;

         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection $connection_upgrade;

           location / {
               #proxy_pass         http://localhost:3001/;
               proxy_pass http://websocket/;
           }
           location /account/register {
               #proxy_pass         http://localhost:3001/account/register;
               proxy_pass         http://websocket/account/register;
           }
           location /ibmid/myibm/profile {
               #proxy_pass         http://localhost:3001/;
               proxy_pass         http://websocket/;
           }
       }
     }

https://idm02.somerslab.ibm.com/account/reg/signup?formid=urx-14321

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev

Docker

create image

docker build -t sanjitbauli/urx-next .

run container in local system

docker run -d -p 3001:80 sanjitbauli/urx-next:latest

Environment variables

Environment variables are taking from .env file by default. Though while deployment in K8s it gets override by deployment.yaml by UCD. Environment variables in UCD can be found here (Dev env): https://ucdeploy2.swg-devops.com/#resource/16ef492a-9f27-2a3f-041b-2c677db8cc0f/configuration

Important :warning: if you use a different BASE_PATH in .env and run time environment, then Pre-render will stop working.

Dev Notes

Router Push & Link examples

import {Link, Router} from '../../routes';
<Link routes={getPath(ROUTES_PATH.LOGIN, locale, query)}  >
    <a>
        {t('login')}
    </a>
</Link>

<a href={`#`} onClick={(e)=>{
    e.preventDefault();
    Router.pushRoute(getPath(ROUTES_PATH.LOGIN, locale, query));
}}>Login</a>

Style Guidelines:

Break Points
@include breakpoint.breakpoint-up('md') {
  // starts from width 672px
}
@include breakpoint.breakpoint-up('lg') {
    // starts from width 1056px
  @include carbon--make-col(2, 16);
}

$TEMP--breakpoint-down--md: map-get(
    map-get($carbon--grid-breakpoints, 'md'),
    'width'
  ) - rem(1px);

Manage images in registry

https://cloud.ibm.com/docs/services/Registry?topic=registry-registry_quota#registry_quota

Deployment

All future deployment will be done via Tekton https://web-platform-dev-d4b80535626182c66d855ee969650fc9-0004.us-south.containers.appdomain.cloud/