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

project_for_lint

v0.0.1

Published

Infinity Infrastructure Package For Frontend Services

Downloads

1

Readme

ILRD Client Adapter

Infinity Infrastructure Package For Frontend Services

Table of Contents

How To Install

echo '@werxpace:registry=https://dev.infinitylabs.co.il/api/v4/packages/npm/' >> .npmrc
echo '//dev.infinitylabs.co.il/api/v4/packages/npm/:_authToken=${NPM_TOKEN}' >> .npmrc
cat .npmrc
  • You should commit the .npmrc
  • Then run:
export NPM_TOKEN=<your_npm_token>
echo $NPM_TOKEN
npm i @werxpace/client-utils

How To Update:

npx npm-check-updates -u @werxpace/client-utils && npm i

Users In Development -

username = 'Liad'
password = '12345678'

username = 'Erez'
password = '12345678'

Publish New Version

cd pkg
npm publish

Working With Docker:

  1. NPM_TOKEN variable need to be accessed during build time.
  2. In old npm versions, it need to exist during runtime as well.
  3. To make NPM_TOKEN accessible during build, add this line to your dockerfile:
ARG NPM_TOKEN=$NPM_TOKEN
  1. Use --build-arg NPM_TOKEN=$NPM_TOKEN with docker build (and possibly with docker run).
  2. If you're using docker-compose, do the same in your docker-compose file:
services:
  some_service:
    build:
      ...
      args:
        NPM_TOKEN: ${NPM_TOKEN} # build time env
    environment:
      - NPM_TOKEN=${NPM_TOKEN}  # runtime env

API

Usage:

import werx from "@werxpace/client-utils";
const user = werx();
// Alternatively you may pass a config object: (ask devCore team for client name)
const user = werx({
  realm: 'ilrd-dev',
  url: 'https://iam-dev.infinitylabs.co.il/auth/',
  clientId: '<client-name>',
});

// You should add your token to the requests headers.
// You may do it manually by setting: headers["authorization"]: `Bearer ${user.getToken()`.
// Alternatively, you can use the helper function like this:
const axiosInst = axios.create();
user.axiosSetup(axiosInst);

// For communication via sockets using socket.io.
// If you're using socket.io middleware provided by server-utils, you MUST use user.getSocket(io) from the client side:
import { io } from 'socket.io-client';
const socket = user.createProtectedSocket({ io, url: "http://backend.url.com" });

User

Single Sign In - redirect to Werxpace Login page.

Return Object.

{
  uuid: String, // e.g. "2f4466c9-35b6-4089-a0c1-0b1498960270a"
  email: String, // e.g. "[email protected]"
  firstName: String, // e.g. "John"
  lastName: String, // e.g. "Travolta"    
  picture: String, // http://link.to.picture
  gender: String, // e.g. female / male / other
  preferredName: String, // e.g. Johnny
  employeeID: String, // 007
}

Return token.

Return Boolean.

Single Sign Out - logout from Werxpace.


Helpers

Protect REST requests.
Applies interceptors for axios instance that will add user token Automagically to all axios requests.

Get a secure socket.io socket instansce.
io: socket.io (engine) object. If you're using server-utils socket middleware, you MUST use this method to create a socket.