
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@142vip/common
Advanced tools
142vip平台通用工具包,封装常用工具函数
封装随机字符串生成函数,常用的有:
generateRandomStrgenerateRandomStrWithSpecialsgenerateRandomStrWithLetter封装了分页请求中的常见的currentPage和pageSize字段。
/**
* 分页时的请求参数
* - 可继承
*/
export interface PaginationParams {
currentPage: number
pageSize: number
}
分页数据的响应结构,继承了 PaginationParams的请求参数中的currentPage和pageSize字段,同时添加了totalPage字段和data字段,data字段为分页数据,支持泛型。
/**
* 分页相应参数
*/
export interface PaginationResponseItem<T> extends PaginationParams {
totalPage: number
data: T[]
}
当分页接口返回数据时,常见的结构为:
{
"currentPage": 1,
"pageSize": 10,
"totalPage": 1,
// data字段支持泛型,常见是数组对象
"data": []
}
export interface VipBaseResponse {
traceId: string
code: HttpStatus
success: boolean
message: string
}
/**
* 成功时,接口返回结构
*/
export interface VipSuccessResponse<T> extends VipBaseResponse {
result: T
}
/**
* 异常时,接口返回结构
*/
export interface VipErrorResponse<T = string> extends VipBaseResponse {
// 生产环境,严禁暴露这个字段
detailErrorMessage?: T
}
Copyright (c) 2019-present, 142vip 储凡
FAQs
142vip平台通用工具包,封装常用工具函数
We found that @142vip/common demonstrated a healthy version release cadence and project activity because the last version was released less than 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.