
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
generator-yapi-types
Advanced tools
将 YAPI 接口文档转换为 TypeScript 类型定义和 API 调用函数的工具。
npm install generator-yapi-types --save-dev
# 或
yarn add generator-yapi-types --dev
1、安装后,用户可以创建一个脚本文件 generate-api.ts
const { generateApi } = require('generator-yapi-types');
const path = require('path');
async function main() {
await generateApi({
yapiUrl: 'https://yapi.hdltest.com',
token: '真实token',
projectId: '项目id',
outputDir: path.resolve(__dirname, './src/api')
});
}
main().catch(console.error);
2、在 package.json 文件中添加以下内容: "generate-api": "node generate-api.ts"
3、运行命令: npm run generate-api
FAQs
Convert YAPI interface documents to TypeScript types and API functions
We found that generator-yapi-types 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.