
Security News
Python Adopts Standard Lock File Format for Reproducible Installs
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
@depanlz/core
Advanced tools
这个模块在项目依赖分析中扮演着核心角色,集成了关键的依赖分析功能,将各种依赖分析的任务统一在一个模块中。
declare class DepAnlz {
depth: number;
constructor(depth: number);
preHook(): Config;
coreHook(config: Config): DepGraph;
postHook(callback: (config:Config, depGraph: DepGraph) => any): any;
lifeCycle(): DepGraph;
}
DepAnlz
类是我们分析项目依赖的核心,我们可以通过DepAnlz
实例对象身上的一些Hook
方法,来定制化个人的依赖分析行为。
$ npm install @depanlz/core
$ pnpm add @depanlz/core
$ yarn add @depanlz/core
有关 typescript
的类型声明
type Config = {
PKG_JSON_DIR: string,
NODE_MODULES_DIR: string,
PKG_MANAGER: string,
DEPTH: number
}
type DepNode = {
id: string,
dependence: string,
version: string,
level: number
}
type DepRel = {
source: string,
target: string
}
declare class DepGraph {
nodes: Array<DepNode>;
edges: Array<DepRel>;
constructor();
insertEgde(fromNodeId: string, toNodeId: string): void;
insertNode(dependence: string, version: string, level: number):void ;
}
使用 DepAnlz
类构建实例,以及进行依赖分析,加工处理等。
import { DepAnlz, Config, DepGraph } from "@depanlz/core"
const depth: number = 3
const anlz: DepAnlz = new DepAnlz(depth)
const config: Config = anlz.preHook()
const depGraph: DepGraph = anlz.coreHook(config)
function callback (config: Config, depGraph: DepGraph): void {
console.log(config)
console.log(depGraph)
}
anlz.postHook(callback)
FAQs
The npm package @depanlz/core receives a total of 37 weekly downloads. As such, @depanlz/core popularity was classified as not popular.
We found that @depanlz/core 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
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.