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

lpd-product-amadeus-leisure-platform-israel

v0.0.1

Published

[![js-standard-style](https://img.shields.io/badge/code%20style-airbnb-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Downloads

3

Readme

LPD Product - Amadeus Leisure Platform Israel

js-standard-style

The project includes the application for the Amadeus Leisure Platform for the Israeli market.

Motivation

The application is to be retreaded after more than 10 years. This includes topics such as better security and a modern UI/UX.

Build status

Build status of continus integration.

Build Status Windows Build Status

Screenshots

Screen 1 Screen 2 Screen 3

Tech/framework used

Built with

Features

What makes your project stand out?

Installation

Clone the repository

git clone ssh://[email protected]/trsc/lpd-product-amadeus-leisure-platform-israel.git

Step into the new project

cd lpd-product-amadeus-leisure-platform-israel

Prepare hosts file for development server

In case of using external services like Keycloak and use redirects to our development. Because of security external services like Keycloak are not allowed to redirect to localhost. This is why we need a fake host running on the development server. To simulate this fake host you must edit your hosts file and prepare it for the new fake domain which is using here in this project.

You can find the hosts file here:

MacOS: /etc/hosts

Windows: C:\Windows\System32\Drivers\etc

Please add to your hosts file the following line.

127.0.0.1       alp-il.local

Configure access token for Amadeus private npm registry

Apart from the packages sourced from the public NPM registry, we also use an internal NPM package (search-service) which contains the types and enumerations used in the Binoculars search service project (the Search service gateway). That package is published in a private Amadeus NPM registry. To access that registry you need to provide an access token based on you corporate Amadeus credentials. Here is how to get and provide that token to NPM:

  1. On your machine go to your $HOME directory (your user directory) and open the .npmrc file located there. It should contain the following:

    registry=https://registry.npmjs.org/

    If the contents of the file differs, delete everything and paste the above line.

  2. Add the following three lines below the above one:

    //repository.rnd.amadeus.net/api/npm/:_auth =
    always-auth = true
    email = YOUR_CORPORATE_AMADEUS_EMAIL
  3. In GitBash run the following command and provide your Amadeus username and password, when prompted, to get Amadeus registry access token:

    curl -u AMADEUS_USERNAME https://repository.rnd.amadeus.net/api/npm/auth

    If for some reason the above does not work, run the following instead:

    curl -u AMADEUS_USERNAME:AMADEUS_PASS https://repository.rnd.amadeus.net/api/npm/auth
  4. The response will consist of three lines. The one that you are interested of starts with _auth =:

    _auth = SOME_ACCESS_TOKEN_STRING

    Copy the access token from the above line and paste it after the //repository.rnd.amadeus.net/api/npm/:_auth = text in the .npmrc file you have edited. Note that the token must remain on the same line as the registry address:

    //repository.rnd.amadeus.net/api/npm/:_auth = SOME_ACCESS_TOKEN_STRING
  5. This is how the .npmrc file should look like at the end:

    registry=https://registry.npmjs.org/
    //repository.rnd.amadeus.net/api/npm/:_auth = SOME_ACCESS_TOKEN_STRING
    always-auth = true
    email = YOUR_CORPORATE_AMADEUS_EMAIL

Please, note that the the above has to be adjusted as per the Linux / MacOS location of the user .npmrc file.

Install packages

After providing the access token for the private Amadeus NPM registry, install all dependencies:

npm install

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

## Building

To create a production version of your app:

```bash
npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

API Reference

Depending on the size of the project, if it is small and simple enough the reference docs can be added to the README. For medium size to larger projects it is important to at least provide a link to where the API reference docs live.

Tests

Describe and show how to run the tests with code examples.

How to use?

If people like your project they’ll want to learn how they can use it. To do so include step by step guide to use your project.

Contribute

Let people know how they can contribute into your project. A contributing guideline will be a big plus.

Security

Authorization

Login

Middleware

Authentication

After every login we store the user data

{
  userName: string;
  isAuthenticated: boolean;
  token: string;
  profile: string;
  fullName: string;
  zoneInfo: string;
}

inside the application. There is no PII data stored in sessions, cookies or local storages.

By a page refresh the data will request again and stored in the running application at runtime.

By every request to our middleware the stored token from the user object will send automatically at header request.

'Authorization' = `Bearer ${user.token}`;

With this header the client will authorize at our middleware and ALP IL API. The ALP IL will use it also for authentication the right user.

License

MIT © Amadeus