mock-service-cli 4.9.1 → 4.9.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.
- package/README.md +5 -0
- package/dist/meta.json +9 -9
- package/dist/runtime.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,6 +97,7 @@ npx mock-service-cli [options] [path]
|
|
|
97
97
|
| `--watch-depth <n>` | 限制静态服务器文件监听递归深度(非负整数) | 无限 |
|
|
98
98
|
| `--watch-interval <n>` | 设置静态服务器轮询间隔(毫秒;仅 Windows Node 24+ 轮询模式生效) | 250 |
|
|
99
99
|
| `--no-watch` | 关闭静态服务器的文件监听与 live-reload(纯静态托管大目录) | false |
|
|
100
|
+
| `--no-os-hidden` | 跳过 Windows 系统隐藏属性判定(attrib/PowerShell) | false |
|
|
100
101
|
| `-e` 或 `--explorer` | 启用文件浏览器服务器,指定要浏览的目录 | ./ |
|
|
101
102
|
| `--edit` | 启用文件浏览器的新建、重命名、删除和上传操作 | false |
|
|
102
103
|
| `--auth <password>` | 为文件浏览器启用密码认证(仅可搭配 `--explorer`) | - |
|
|
@@ -191,6 +192,10 @@ mock-service-cli -e ./ --host
|
|
|
191
192
|
mock-service-cli -e ./ --host ./allowed-ips.txt
|
|
192
193
|
```
|
|
193
194
|
|
|
195
|
+
静态服务器目录索引与文件浏览器默认把点号命名文件、以及(Windows 上)带系统隐藏属性的文件视为隐藏项。
|
|
196
|
+
传入 `--no-os-hidden` 可跳过系统隐藏属性判定、仅按点号命名判定(利于规避个别属性误判与探测开销),
|
|
197
|
+
对静态服务器目录索引与文件浏览器同时生效。
|
|
198
|
+
|
|
194
199
|
默认情况下,Mock、SPA、Static 和 File Explorer 服务只监听 `127.0.0.1`。
|
|
195
200
|
`--host` 会使这些服务监听所有 IPv4 网卡,请仅在可信网络中使用。传入白名单文件时,服务仍监听全部 IPv4 网卡,
|
|
196
201
|
但仅允许 `localhost`、`127.0.0.1`、`::1` 及文件中的 IP/CIDR 访问;空行和行首 `#` 注释会忽略,非法或空白名单会阻止启动。
|
package/dist/meta.json
CHANGED
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
"format": "cjs"
|
|
1042
1042
|
},
|
|
1043
1043
|
"src/lib/utils.js": {
|
|
1044
|
-
"bytes":
|
|
1044
|
+
"bytes": 22595,
|
|
1045
1045
|
"imports": [
|
|
1046
1046
|
{
|
|
1047
1047
|
"path": "fs",
|
|
@@ -1093,7 +1093,7 @@
|
|
|
1093
1093
|
"format": "cjs"
|
|
1094
1094
|
},
|
|
1095
1095
|
"src/bin/mock-service-cli": {
|
|
1096
|
-
"bytes":
|
|
1096
|
+
"bytes": 15146,
|
|
1097
1097
|
"imports": [
|
|
1098
1098
|
{
|
|
1099
1099
|
"path": "node_modules/colors/safe.js",
|
|
@@ -7425,7 +7425,7 @@
|
|
|
7425
7425
|
"format": "cjs"
|
|
7426
7426
|
},
|
|
7427
7427
|
"src/lib/staticServer.js": {
|
|
7428
|
-
"bytes":
|
|
7428
|
+
"bytes": 39069,
|
|
7429
7429
|
"imports": [
|
|
7430
7430
|
{
|
|
7431
7431
|
"path": "node_modules/express/index.js",
|
|
@@ -8499,7 +8499,7 @@
|
|
|
8499
8499
|
"format": "cjs"
|
|
8500
8500
|
},
|
|
8501
8501
|
"src/lib/fileExplorerServer.js": {
|
|
8502
|
-
"bytes":
|
|
8502
|
+
"bytes": 26437,
|
|
8503
8503
|
"imports": [
|
|
8504
8504
|
{
|
|
8505
8505
|
"path": "node_modules/express/index.js",
|
|
@@ -10076,13 +10076,13 @@
|
|
|
10076
10076
|
"bytesInOutput": 4540
|
|
10077
10077
|
},
|
|
10078
10078
|
"src/lib/utils.js": {
|
|
10079
|
-
"bytesInOutput":
|
|
10079
|
+
"bytesInOutput": 12197
|
|
10080
10080
|
},
|
|
10081
10081
|
"src/lib/packageInfo.js": {
|
|
10082
10082
|
"bytesInOutput": 429
|
|
10083
10083
|
},
|
|
10084
10084
|
"src/bin/mock-service-cli": {
|
|
10085
|
-
"bytesInOutput":
|
|
10085
|
+
"bytesInOutput": 11804
|
|
10086
10086
|
},
|
|
10087
10087
|
"node_modules/depd/index.js": {
|
|
10088
10088
|
"bytesInOutput": 6779
|
|
@@ -11198,7 +11198,7 @@
|
|
|
11198
11198
|
"bytesInOutput": 11845
|
|
11199
11199
|
},
|
|
11200
11200
|
"src/lib/staticServer.js": {
|
|
11201
|
-
"bytesInOutput":
|
|
11201
|
+
"bytesInOutput": 29860
|
|
11202
11202
|
},
|
|
11203
11203
|
"node_modules/busboy/lib/utils.js": {
|
|
11204
11204
|
"bytesInOutput": 8707
|
|
@@ -11375,13 +11375,13 @@
|
|
|
11375
11375
|
"bytesInOutput": 7774
|
|
11376
11376
|
},
|
|
11377
11377
|
"src/lib/fileExplorerServer.js": {
|
|
11378
|
-
"bytesInOutput":
|
|
11378
|
+
"bytesInOutput": 19410
|
|
11379
11379
|
},
|
|
11380
11380
|
"src/runtime.js": {
|
|
11381
11381
|
"bytesInOutput": 507
|
|
11382
11382
|
}
|
|
11383
11383
|
},
|
|
11384
|
-
"bytes":
|
|
11384
|
+
"bytes": 1834880
|
|
11385
11385
|
}
|
|
11386
11386
|
}
|
|
11387
11387
|
}
|