
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@proffix/restapi-angular-library
Advanced tools
Programmbibliothek für die einfache Verwendung der PROFFIX REST API in Angular Applikationen
Die PROFFIX REST API Library für Angular ermöglicht die einfache Kommunikation mit der PROFFIX REST API in Angular- Anwendungen. Die Library ist unabhängig von der grafischen Oberfläche und kann mit Ionic oder anderen Frameworks verwendet werden.
Ein lauffähiges Angular-Projekt muss vorhanden sein. Über die Angular CLI lässt sich das einfach erstellen.
Die Library ist über npm verfügbar: npm install @proffix/restapi-angular-library --save
Es muss eine von Configuration vererbte Klasse erstellt werden, in der die beiden abstrakten Methoden requiredWebserviceVersion und
requiredLicencedModules überschrieben werden müssen.
import { Injectable } from '@angular/core';
import { PxConfiguration, PxModule, PxVersion } from '@proffix/restapi-angular-library';
@Injectable()
export class AppConfiguration extends PxConfiguration {
public get requiredWebserviceVersion(): PxVersion {
return { Major: 2, Minor: 2, Patch: 0 };
}
public get requiredLicencedModules(): PxModule[] {
return [ PxModule.ZEI, PxModule.ADR ];
}
}
Die AppConfiguration muss Injectable sein, da sie dem dem Dependency Injector als Configuration für die Library mitgegeben werden muss.
Zusätzliche wird das PxRestApiModule geladen und über PxRestApiModule.forRoot() importiert.
// Root Module (src/app.module.ts)
import { PxRestApiModule, PxConfiguration } from '@proffix/restapi-angular-library';
// ...
imports: [ PxRestApiModule.forRoot() ],
providers: [
AppConfiguration,
{ provide: PxConfiguration, useExisting: AppConfiguration }
],
// ...
Die Verbindungseinstellungen (Klasse ConnectionSettings) werden durch den ConnectionSettingsService im LocalStorage abgelegt.
// Angular Component
import { PxConnectionSettings, PxConnectionSettingsService } from '@proffix/restapi-angular-library';
// ...
constructor(private connectionSettingsService: PxConnectionSettingsService) {
let connectionSettings: PxConnectionSettings = { WebserviceUrl: "https://restapi.company.invalid", WebservicePasswortHash: "d3612ab62..."}
connectionSettingsService.current = connectionSettings;
}
Hinweis: Der SHA256 kann über die statische Methode Hash.sha256 erstellt werden, nachdem die Klasse Hash importiert wurde.
Der Login kann durchgeführt werden, wenn gültige Verbindungseinstellungen hinterlegt wurden.
// Angular Component
import { PxLogin, PxLoginService, PxConfiguration } from '@proffix/restapi-angular-library';
// ...
constructor(private loginService: PxLoginService, private configuration: PxConfiguration) {
let login: PxLogin = {
Benutzer: "pxuser",
Passwort: "d3612ab62...",
Datenbank: { Name: "PXDB" },
Module: this.configuration.getRequiredLicencedModulesAsStringArray() // Die Module können aus der AppConfiguration gelesen werden
}
this.loginService.doLogin(login).subscribe( // nur zu Anschauungszwecken, nie HTTP-Requests in einem Konstruktor absetzen
login => console.log("Login successed: " + login.Benutzer),
error => console.log("Login failed")
);
}
FAQs
Programmbibliothek für die einfache Verwendung der PROFFIX REST API in Angular Applikationen
The npm package @proffix/restapi-angular-library receives a total of 16 weekly downloads. As such, @proffix/restapi-angular-library popularity was classified as not popular.
We found that @proffix/restapi-angular-library 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.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.