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 🙏

© 2025 – Pkg Stats / Ryan Hefner

mvplus-dynamic-configuration-lib

v1.6.1

Published

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.2.5.

Readme

MvplusDynamicConfigurationLibApp

This project was generated with Angular CLI version 6.2.5.

Support

  • Angular version >=5.0.0
  • Rxjs@ version >=5.0.0

Upgrade version of npm plugin

Change manually the version in projects/mvplus-dynamic-configuration-lib/package.json

Build package

npm run package

Publish on npm

npm login

npm publish dist/mvplus-dynamic-configuration-lib/mvplus-dynamic-configuration-lib-${your-version}.tgz

Usage

Import MvplusDynamicConfigurationLibModule in your app (or core if you have) module, calling forRoot method :

Example core.module.ts

@NgModule({
    imports: [
        BrowserModule,
        CommonModule,
        LeafletModule.forRoot(),
        HttpClientModule,
        MvplusDynamicConfigurationLibModule.forRoot({ //You need to match with BackendConf class constructor
            endpoints: [ 
                { name: 'dev', value: 'http://dev.virt.moviplus.ch:8083/tpc_app_clients' },
                { name: 'demo', value: 'http://demo.virt.moviplus.ch:8085/tpc_app_clients' }
            ],
            activeEndpoint: { name: 'dev', value: 'http://demo.virt.moviplus.ch:8083/tpc_app_clients' }
        })
    ],
    providers: [],
    exports: [MvplusDynamicConfigurationLibModule]
})

You can see class definitions below.

Then use the component in the view :

<mvplus-configuration-selector [buttonText]="'Open'" [customBtnClass]="['btn']"></mvplus-configuration-selector>

Input properties

buttonText type string, default value : 'Ouvrir'

customBtnClass type string[], default value : []

forRoot options

endpoints

This is an array of EndpointConfiguration (see impl. below), which appear to the dropdown of backend endpoint choice.

activeEndpoint

This is a representation of EndpointConfiguration (see impl. below), which is the default backend endpoint.

Usage of dynamic backend in code

You must inject BackendConfigService to have access to current active endpoint.

Example

@Injectable()
export class SigninService {
    constructor(
        private http: HttpClient,
        private authenticationService: AuthenticationService,
        private backendConfigurationService: BackendConfigService) {
    }

    public $signin(login: string, password: string): Observable<UserResponse> {
        const params: SigninParams = {
            login: login,
            password: password
        };
        const body: HttpParams = new HttpParams({ fromObject: params });
        return this.http
            .post<UserResponse>(`${this.backendConfigurationService.getBackend().value}/signin.cms.json`, body);
    }
}

Implementation of the configuration

BackendConfig

class BackendConfig {
  constructor(public endpoints: EndpointConfiguration[] = [], public activeEndpoint: EndpointConfiguration = null) {
  }
}

EndpointConfiguration

interface EndpointConfiguration {
  value: string;
  name: string;
  version: string;
}

Changelog

v1.6.1 (11.12.18)

  • New method in BackendConfigurationService to build the URL directly, with optional parameters to include version of api in the url.

v1.6.0 (11.12.18)

  • Add API version in `EndpointConfiguration

v1.5.9 (29.10.18)

  • Remove "Close" button
  • Update readme

v1.5.8 (29.10.18)

  • You can change the label of the button by input [buttonText] of string type
  • You can change the css style of the button by input [customBtnClass] of string[] type