mock-service-cli 4.9.1 → 4.9.3
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 +29 -26
- package/dist/runtime.js +9 -9
- 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",
|
|
@@ -1092,8 +1092,13 @@
|
|
|
1092
1092
|
],
|
|
1093
1093
|
"format": "cjs"
|
|
1094
1094
|
},
|
|
1095
|
+
"src/lib/processShutdown.js": {
|
|
1096
|
+
"bytes": 1358,
|
|
1097
|
+
"imports": [],
|
|
1098
|
+
"format": "cjs"
|
|
1099
|
+
},
|
|
1095
1100
|
"src/bin/mock-service-cli": {
|
|
1096
|
-
"bytes":
|
|
1101
|
+
"bytes": 16599,
|
|
1097
1102
|
"imports": [
|
|
1098
1103
|
{
|
|
1099
1104
|
"path": "node_modules/colors/safe.js",
|
|
@@ -1130,6 +1135,11 @@
|
|
|
1130
1135
|
"kind": "require-call",
|
|
1131
1136
|
"original": "../lib/packageInfo"
|
|
1132
1137
|
},
|
|
1138
|
+
{
|
|
1139
|
+
"path": "src/lib/processShutdown.js",
|
|
1140
|
+
"kind": "require-call",
|
|
1141
|
+
"original": "../lib/processShutdown"
|
|
1142
|
+
},
|
|
1133
1143
|
{
|
|
1134
1144
|
"path": "child_process",
|
|
1135
1145
|
"kind": "require-call",
|
|
@@ -7425,7 +7435,7 @@
|
|
|
7425
7435
|
"format": "cjs"
|
|
7426
7436
|
},
|
|
7427
7437
|
"src/lib/staticServer.js": {
|
|
7428
|
-
"bytes":
|
|
7438
|
+
"bytes": 39048,
|
|
7429
7439
|
"imports": [
|
|
7430
7440
|
{
|
|
7431
7441
|
"path": "node_modules/express/index.js",
|
|
@@ -7483,14 +7493,14 @@
|
|
|
7483
7493
|
"original": "portfinder"
|
|
7484
7494
|
},
|
|
7485
7495
|
{
|
|
7486
|
-
"path": "src/lib/
|
|
7496
|
+
"path": "src/lib/processShutdown.js",
|
|
7487
7497
|
"kind": "require-call",
|
|
7488
|
-
"original": "./
|
|
7498
|
+
"original": "./processShutdown"
|
|
7489
7499
|
},
|
|
7490
7500
|
{
|
|
7491
|
-
"path": "
|
|
7501
|
+
"path": "src/lib/utils.js",
|
|
7492
7502
|
"kind": "require-call",
|
|
7493
|
-
"
|
|
7503
|
+
"original": "./utils"
|
|
7494
7504
|
}
|
|
7495
7505
|
],
|
|
7496
7506
|
"format": "cjs"
|
|
@@ -8499,7 +8509,7 @@
|
|
|
8499
8509
|
"format": "cjs"
|
|
8500
8510
|
},
|
|
8501
8511
|
"src/lib/fileExplorerServer.js": {
|
|
8502
|
-
"bytes":
|
|
8512
|
+
"bytes": 26424,
|
|
8503
8513
|
"imports": [
|
|
8504
8514
|
{
|
|
8505
8515
|
"path": "node_modules/express/index.js",
|
|
@@ -8567,12 +8577,12 @@
|
|
|
8567
8577
|
"original": "./archiveService"
|
|
8568
8578
|
},
|
|
8569
8579
|
{
|
|
8570
|
-
"path": "
|
|
8580
|
+
"path": "src/lib/processShutdown.js",
|
|
8571
8581
|
"kind": "require-call",
|
|
8572
|
-
"
|
|
8582
|
+
"original": "./processShutdown"
|
|
8573
8583
|
},
|
|
8574
8584
|
{
|
|
8575
|
-
"path": "
|
|
8585
|
+
"path": "http",
|
|
8576
8586
|
"kind": "require-call",
|
|
8577
8587
|
"external": true
|
|
8578
8588
|
}
|
|
@@ -9663,11 +9673,6 @@
|
|
|
9663
9673
|
"kind": "require-call",
|
|
9664
9674
|
"external": true
|
|
9665
9675
|
},
|
|
9666
|
-
{
|
|
9667
|
-
"path": "readline",
|
|
9668
|
-
"kind": "require-call",
|
|
9669
|
-
"external": true
|
|
9670
|
-
},
|
|
9671
9676
|
{
|
|
9672
9677
|
"path": "stream",
|
|
9673
9678
|
"kind": "require-call",
|
|
@@ -9897,11 +9902,6 @@
|
|
|
9897
9902
|
"path": "http",
|
|
9898
9903
|
"kind": "require-call",
|
|
9899
9904
|
"external": true
|
|
9900
|
-
},
|
|
9901
|
-
{
|
|
9902
|
-
"path": "readline",
|
|
9903
|
-
"kind": "require-call",
|
|
9904
|
-
"external": true
|
|
9905
9905
|
}
|
|
9906
9906
|
],
|
|
9907
9907
|
"exports": [],
|
|
@@ -10076,13 +10076,16 @@
|
|
|
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
|
+
"src/lib/processShutdown.js": {
|
|
10085
|
+
"bytesInOutput": 928
|
|
10086
|
+
},
|
|
10084
10087
|
"src/bin/mock-service-cli": {
|
|
10085
|
-
"bytesInOutput":
|
|
10088
|
+
"bytesInOutput": 12860
|
|
10086
10089
|
},
|
|
10087
10090
|
"node_modules/depd/index.js": {
|
|
10088
10091
|
"bytesInOutput": 6779
|
|
@@ -11198,7 +11201,7 @@
|
|
|
11198
11201
|
"bytesInOutput": 11845
|
|
11199
11202
|
},
|
|
11200
11203
|
"src/lib/staticServer.js": {
|
|
11201
|
-
"bytesInOutput":
|
|
11204
|
+
"bytesInOutput": 29935
|
|
11202
11205
|
},
|
|
11203
11206
|
"node_modules/busboy/lib/utils.js": {
|
|
11204
11207
|
"bytesInOutput": 8707
|
|
@@ -11375,13 +11378,13 @@
|
|
|
11375
11378
|
"bytesInOutput": 7774
|
|
11376
11379
|
},
|
|
11377
11380
|
"src/lib/fileExplorerServer.js": {
|
|
11378
|
-
"bytesInOutput":
|
|
11381
|
+
"bytesInOutput": 19485
|
|
11379
11382
|
},
|
|
11380
11383
|
"src/runtime.js": {
|
|
11381
11384
|
"bytesInOutput": 507
|
|
11382
11385
|
}
|
|
11383
11386
|
},
|
|
11384
|
-
"bytes":
|
|
11387
|
+
"bytes": 1837014
|
|
11385
11388
|
}
|
|
11386
11389
|
}
|
|
11387
11390
|
}
|