Gathering detailed insights and metrics for webpack-dev-mock
Gathering detailed insights and metrics for webpack-dev-mock
Gathering detailed insights and metrics for webpack-dev-mock
Gathering detailed insights and metrics for webpack-dev-mock
mocker-api
This is dev support mock RESTful API.
webpack-mock-server
Mocks api requests for webpack-dev-server with hot-replacement
webpack-api-mocker
This is dev support mock RESTful API.
express-proxy-mock
This is an express middleware that can be used with webpack and vite. Its main function is to visualize the configuration, manage proxies, and mock data.
🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
npm install webpack-dev-mock
Typescript
Module System
Node Version
NPM Version
34.3
Supply Chain
65.8
Quality
78.6
Maintenance
50
Vulnerability
97
License
TypeScript (90.85%)
JavaScript (6.48%)
CSS (1.57%)
EJS (0.92%)
AppleScript (0.18%)
Shell (0.01%)
Total Downloads
196,939
Last Day
15
Last Week
410
Last Month
2,964
Last Year
24,195
MIT License
18,543 Stars
3,279 Commits
2,129 Forks
440 Watchers
66 Branches
125 Contributors
Updated on Jul 03, 2025
Minified
Minified + Gzipped
Latest Version
2.0.0
Package Id
webpack-dev-mock@2.0.0
Unpacked Size
15.11 kB
Size
5.29 kB
File Count
11
NPM Version
6.14.15
Node Version
12.22.7
Published on
Dec 09, 2021
Cumulative downloads
Total Downloads
Last Day
-77.9%
15
Compared to previous day
Last Week
-20.1%
410
Compared to previous week
Last Month
-48.9%
2,964
Compared to previous month
Last Year
-13.7%
24,195
Compared to previous year
mock-dev-server 是一个 express 服务的中间件
读取项目目录下的 mock/index.js
文件生成,会配置对应的接口。
1// mock/index.js 2const foo = require('./foo.json'); 3const bar = require('./bar'); 4 5module.exports = { 6 // 同时支持 GET 和 POST 7 '/api/users/1': foo, 8 '/api/foo/bar': bar(), 9 10 // 支持标准 HTTP 11 'GET /api/users': { users: [1, 2] }, 12 'DELETE /api/users': { users: [1, 2] }, 13 14 // 支持自定义函数,API 参考 express4 15 'POST /api/users/create': (req, res) => { 16 res.end('OK'); 17 }, 18 19 // 支持参数 20 'POST /api/users/:id': (req, res) => { 21 const { id } = req.params; 22 res.send({ id: id }); 23 }, 24};
1// server.js 2const express = require('express'); 3 4const mockServer = require('mock-server'); 5 6const app = express(); 7 8mockServer(app); 9 10app.get('/', (req, res) => res.send('hello world')); 11 12app.listen(6001, () => { 13 console.log('Example app listening on port 6001!'); 14 console.log('http://127.0.0.1:6001'); 15});
No vulnerabilities found.
Reason
23 commit(s) and 14 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 24/26 approved changesets -- score normalized to 9
Reason
SAST tool is not run on all commits -- score normalized to 2
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
56 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More