whistle.mock-plugins 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -257,7 +257,7 @@ module.exports = (server, options) => {
257
257
  // 如果找到匹配的接口,返回对应的规则将请求转发到插件
258
258
  if (matchedInterface) {
259
259
  log(`找到匹配接口 "${matchedInterface.name || matchedInterface.id || '未知'}" 用于 ${method} ${path}`);
260
- res.end(`${fullUrl} mock-plugin://`);
260
+ res.end(`${fullUrl} mock-plugins://`);
261
261
  } else {
262
262
  // 如果没有匹配的接口,返回空字符串,Whistle 会继续处理下一个规则
263
263
  log(`未找到匹配接口,跳过处理 ${method} ${path}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whistle.mock-plugins",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Whistle 插件,用于快速创建 API 模拟数据",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -88,7 +88,7 @@ describe('rulesServer 测试', () => {
88
88
  req.originalReq.method = 'GET';
89
89
 
90
90
  requestHandler(req, res);
91
- expect(res.end).toHaveBeenCalledWith('mock-plugin://');
91
+ expect(res.end).toHaveBeenCalledWith('mock-plugins://');
92
92
  });
93
93
 
94
94
  test('未匹配的URL应该返回空字符串', () => {
@@ -115,6 +115,6 @@ describe('rulesServer 测试', () => {
115
115
  req.originalReq.method = 'GET';
116
116
 
117
117
  requestHandler(req, res);
118
- expect(res.end).toHaveBeenCalledWith('mock-plugin://');
118
+ expect(res.end).toHaveBeenCalledWith('mock-plugins://');
119
119
  });
120
120
  });
@@ -703,7 +703,7 @@ const InterfaceManagement = () => {
703
703
  description={
704
704
  <div>
705
705
  <p>当前接口匹配规则:<code>{editingInterface.urlPattern}</code></p>
706
- <p>在Whistle规则中,您需要配置完整URL或域名指向whistle.mock-plugin://,然后插件会根据接口的匹配规则处理请求。</p>
706
+ <p>在Whistle规则中,您需要配置完整URL或域名指向whistle.mock-plugins://,然后插件会根据接口的匹配规则处理请求。</p>
707
707
  <p>插件支持以下匹配方式:</p>
708
708
  <ul>
709
709
  <li>精确匹配:完全匹配URL路径部分</li>