
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.
@teamhive/angular-package-core
Advanced tools
A common package for all Angular packages published by team hive
A common package for all Angular packages published by team hive
DEMO: https://teamhive.github.io/angular-package-core
npm i @teamhive/angular-package-core --save
In angular.json add the following entries to their locations
...
"styles": [
"node_modules/prismjs/themes/prism.css",
"node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css"
],
"scripts": [
"node_modules/marked/lib/marked.js",
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-bash.min.js",
"node_modules/prismjs/components/prism-typescript.min.js",
"node_modules/prismjs/components/prism-scss.min.js",
"node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js"
]
app.module.ts
import { TeamHivePackageCoreModule } from '@teamhive/angular-package-core';
@NgModule({
imports: [
...,
TeamHivePackageCoreModule.forRoot(),
]
})
When providing values to the ExampleSources and SupportingSource objects, use the require() function with '!!raw-loader' to read the files so they can be passed. requiring them in, in this way makes sure that, during bundling the locations of the files are taken into account
app-example-page-shell
is the main component to use from this package
import { Component } from '@angular/core';
import { ExampleSources, SupportingSource } from '@teamhive/angular-package-core';
@Component({
selector: 'app-my-page',
templateUrl: 'my-page.component.html',
styleUrls: ['my-page.component.scss']
})
export class MyPageComponent {
// The component example's files. Allows the component to be run and the files viewed at the same time.
// Dynamic paths do not work. The entire relative path must be available at compile time.
readonly source: ExampleSources = {
html: require(`!!raw-loader?lang=html!../../exampless/my-example/my-example.component.html`),
ts: require(`!!raw-loader?lang=typescript!../../examples/my-example/my-example.component.ts`)
}
// Other supporting files (data, interfaces, utils, pipes, etc.)
otherFiles: SupportingSource[] = [
{
name: 'sample-data.ts',
language: 'javascript',
content: require('!!raw-loader?lang=typescript!../../data/sample-data.ts')
}
];
}
<!-- the example title will display above the example -->
<app-example-page-shell exampleTitle="My Example" [exampleSources]="source" [otherSources]="otherFiles">
<app-my-example></app-my-example>
</app-example-page-shell>
import { Component } from '@angular/core';
@Component({
selector: 'app-my-example',
templateUrl: 'my-example.component.html',
styleUrls: ['my-example.component.scss']
})
export class MyExampleComponent {
...
}
Inputs | Description |
---|---|
exampleTitle | The title to display above the example |
exampleSources | The files that are used as a part of the component rendered as an example. See example-sources.interface.ts |
otherSources | The supporting files for the example or any other files to include for display. See supporting-sources.interface.ts |
See the Demo for more configuration, and styling options.
FAQs
A common package for all Angular packages published by team hive
The npm package @teamhive/angular-package-core receives a total of 1 weekly downloads. As such, @teamhive/angular-package-core popularity was classified as not popular.
We found that @teamhive/angular-package-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 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.