
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@quantumart/qa-engine-page-structure-angular
Advanced tools
**@quantumart/qa-engine-page-structure-angular**
@quantumart/qa-engine-page-structure-angular
Данная библиотека предоставляет набор инструментов для построения фронтенда для сайта на базе QP (Angular версия).
Demo site
Описание
Необходимый бэкенд для построения сайта:
Установка
Установить npm пакет:
npm install @quantumart/qa-engine-page-structure-angular
Пример подключения
Импортировать модуль QaEnginePageStructureModule в основном модуле angular-приложения:
...
import { QaEnginePageStructureModule, WidgetComponent } from '@quantumart/qa-engine-page-structure-angular';
@NgModule({
...
imports: [
...
QaEnginePageStructureModule.forRoot({
widgetPlatformApiUrl: environment.WIDGET_PLATFORM_API_URL,
layoutWidgetZones: ['SiteHeaderZone', 'SiteFooterZone'],
widgetMapping: new Map<string, Type<WidgetComponent>>([
['html_widget', HtmlWidgetComponent],
['banner_widget', BannerWidgetComponent],
['feedback_widget', FeedbackWidgetComponent],
...
]),
}),
...
],
...
Определить angular-роуты:
...
import {
DynamicRoutesInitializer,
InitialRequestComponent,
LayoutWidgetsResolver,
PageDetailsResolver
} from '@quantumart/qa-engine-page-structure-angular';
const routes: Routes = [
{
path: '**',
component: InitialRequestComponent,
canActivate: [DynamicRoutesInitializer],
},
{
path: 'start-page',
loadChildren: () => import('./start-page/start-page.module').then(m => m.StartPageModule),
resolve: {
details: PageDetailsResolver,
staticWidgets: LayoutWidgetsResolver,
},
data: {
nodeType: 'start_page',
},
},
...
];
Пример реализации компонента стартовой страницы:
import { NodeDetails } from '@quantumart/qa-engine-page-structure-angular';
import { SiteNodeComponent, SiteNodeService } from '../services';
export interface StartPageDetails extends NodeDetails {
title: string;
}
@Component({
selector: 'qa-start-page',
templateUrl: './start-page.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class StartPageComponent implements SiteNodeComponent {
public get id(): number {
return this.siteNodeService.getNodeId();
}
public readonly pageDetails$ = this.siteNodeService.getDetails<StartPageDetails>();
constructor(private readonly siteNodeService: SiteNodeService) {
}
}
Пример реализации компонента виджета:
...
import { WidgetComponent, WidgetDetails } from '@quantumart/qa-engine-page-structure-angular';
export interface HtmlWidgetDetails extends WidgetDetails {
html: string;
}
@Component({
selector: 'qa-html-widget',
templateUrl: './html-widget.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HtmlWidgetComponent implements WidgetComponent {
@Input() public widget!: HtmlWidgetDetails;
}
FAQs
**@quantumart/qa-engine-page-structure-angular**
We found that @quantumart/qa-engine-page-structure-angular demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.