Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mvplus-dynamic-configuration-lib
Advanced tools
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.2.5.
This project was generated with Angular CLI version 6.2.5.
Change manually the version in projects/mvplus-dynamic-configuration-lib/package.json
npm run package
npm login
npm publish dist/mvplus-dynamic-configuration-lib/mvplus-dynamic-configuration-lib-
${your-version}.tgz
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>
buttonText
typestring
, default value :'Ouvrir'
customBtnClass
typestring[]
, default value :[]
forRoot
optionsendpoints
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.
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);
}
}
BackendConfig
class BackendConfig {
constructor(public endpoints: EndpointConfiguration[] = [], public activeEndpoint: EndpointConfiguration = null) {
}
}
EndpointConfiguration
interface EndpointConfiguration {
value: string;
name: string;
version: string;
}
BackendConfigurationService
to build the URL directly,
with optional parameters to include version
of api in the url.[buttonText]
of string
type[customBtnClass]
of string[]
typeFAQs
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.2.5.
The npm package mvplus-dynamic-configuration-lib receives a total of 1 weekly downloads. As such, mvplus-dynamic-configuration-lib popularity was classified as not popular.
We found that mvplus-dynamic-configuration-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.