mock-service-cli-ultra 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"
|
|
@@ -8215,7 +8225,7 @@
|
|
|
8215
8225
|
"format": "cjs"
|
|
8216
8226
|
},
|
|
8217
8227
|
"src/lib/fileExplorerServer.js": {
|
|
8218
|
-
"bytes":
|
|
8228
|
+
"bytes": 26424,
|
|
8219
8229
|
"imports": [
|
|
8220
8230
|
{
|
|
8221
8231
|
"path": "node_modules/express/index.js",
|
|
@@ -8283,12 +8293,12 @@
|
|
|
8283
8293
|
"original": "./archiveService"
|
|
8284
8294
|
},
|
|
8285
8295
|
{
|
|
8286
|
-
"path": "
|
|
8296
|
+
"path": "src/lib/processShutdown.js",
|
|
8287
8297
|
"kind": "require-call",
|
|
8288
|
-
"
|
|
8298
|
+
"original": "./processShutdown"
|
|
8289
8299
|
},
|
|
8290
8300
|
{
|
|
8291
|
-
"path": "
|
|
8301
|
+
"path": "http",
|
|
8292
8302
|
"kind": "require-call",
|
|
8293
8303
|
"external": true
|
|
8294
8304
|
}
|
|
@@ -9379,11 +9389,6 @@
|
|
|
9379
9389
|
"kind": "require-call",
|
|
9380
9390
|
"external": true
|
|
9381
9391
|
},
|
|
9382
|
-
{
|
|
9383
|
-
"path": "readline",
|
|
9384
|
-
"kind": "require-call",
|
|
9385
|
-
"external": true
|
|
9386
|
-
},
|
|
9387
9392
|
{
|
|
9388
9393
|
"path": "stream",
|
|
9389
9394
|
"kind": "require-call",
|
|
@@ -9558,11 +9563,6 @@
|
|
|
9558
9563
|
"path": "http",
|
|
9559
9564
|
"kind": "require-call",
|
|
9560
9565
|
"external": true
|
|
9561
|
-
},
|
|
9562
|
-
{
|
|
9563
|
-
"path": "readline",
|
|
9564
|
-
"kind": "require-call",
|
|
9565
|
-
"external": true
|
|
9566
9566
|
}
|
|
9567
9567
|
],
|
|
9568
9568
|
"exports": [],
|
|
@@ -9737,13 +9737,16 @@
|
|
|
9737
9737
|
"bytesInOutput": 4540
|
|
9738
9738
|
},
|
|
9739
9739
|
"src/lib/utils.js": {
|
|
9740
|
-
"bytesInOutput":
|
|
9740
|
+
"bytesInOutput": 12197
|
|
9741
9741
|
},
|
|
9742
9742
|
"src/lib/packageInfo.js": {
|
|
9743
9743
|
"bytesInOutput": 429
|
|
9744
9744
|
},
|
|
9745
|
+
"src/lib/processShutdown.js": {
|
|
9746
|
+
"bytesInOutput": 928
|
|
9747
|
+
},
|
|
9745
9748
|
"src/bin/mock-service-cli": {
|
|
9746
|
-
"bytesInOutput":
|
|
9749
|
+
"bytesInOutput": 12860
|
|
9747
9750
|
},
|
|
9748
9751
|
"node_modules/depd/index.js": {
|
|
9749
9752
|
"bytesInOutput": 6779
|
|
@@ -10859,7 +10862,7 @@
|
|
|
10859
10862
|
"bytesInOutput": 11845
|
|
10860
10863
|
},
|
|
10861
10864
|
"src/lib/staticServer.js": {
|
|
10862
|
-
"bytesInOutput":
|
|
10865
|
+
"bytesInOutput": 29935
|
|
10863
10866
|
},
|
|
10864
10867
|
"node_modules/busboy/lib/utils.js": {
|
|
10865
10868
|
"bytesInOutput": 8707
|
|
@@ -10982,13 +10985,13 @@
|
|
|
10982
10985
|
"bytesInOutput": 7774
|
|
10983
10986
|
},
|
|
10984
10987
|
"src/lib/fileExplorerServer.js": {
|
|
10985
|
-
"bytesInOutput":
|
|
10988
|
+
"bytesInOutput": 19485
|
|
10986
10989
|
},
|
|
10987
10990
|
"src/runtime.js": {
|
|
10988
10991
|
"bytesInOutput": 507
|
|
10989
10992
|
}
|
|
10990
10993
|
},
|
|
10991
|
-
"bytes":
|
|
10994
|
+
"bytes": 1749131
|
|
10992
10995
|
}
|
|
10993
10996
|
}
|
|
10994
10997
|
}
|