3.2.0 • Published 10 months ago

unleash-client-safe-security v3.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

unleash-client

This package provides the Unleash configuration used in Safe Security.

Motivation

Currently in Safe Security, all the services that leverage Unleash functionality required to define the unleash communication mechanism which lead to boilerplate code in each of the services. Adhering to the DRY (Don't Repeat Yourself) principle, the common configuration has been extracted out as part of this repository and made available for consumption via NPM package.

Installation

npm install unleash-client-safe-security
yarn add unleash-client-safe-security

Usage

The introduction of this package makes it very easy for clients to consume & leverage the unleash capabilities.

In Javascript:

const { getInstance } = require("unleash-client-safe-security");

const unleash = getInstance({
    unleashServerUrl: <unleash-url>,
    baseUrl: <app-url>,
    unleashClientApiKey: "zaCELgL.0imfnc8mVLWwsAawjYr4Rx-Af50DDqtlx",
});

In Typescript:

import { getInstance } from "unleash-client-safe-security";

const unleash = getInstance({
  unleashServerUrl: <unleash-url>,
    baseUrl: <app-url>,
    unleashClientApiKey: "zaCELgL.0imfnc8mVLWwsAawjYr4Rx-Af50DDqtlx",
    unleashAppName: "my-app.com",
    parameters: {
       tenantUrl: {
         valueFromMethod: getTenantUrl(),
         fallback: process.env.TENANT_URL
       }
    }
});
3.1.2

11 months ago

3.2.0

10 months ago

3.1.1

12 months ago

3.1.0

1 year ago

3.0.1-beta.1

1 year ago

3.0.1-beta.2

1 year ago

3.0.1-beta.3

1 year ago

3.0.0

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago