lumigather 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/start.sh +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumigather",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "局域网 Mod 图片画廊:目录浏览、压缩包直出、序列帧合成 GIF",
5
5
  "bin": {
6
6
  "lumigather": "bin/lumigather.js"
@@ -17,7 +17,8 @@
17
17
  },
18
18
  "scripts": {
19
19
  "start": "node bin/lumigather.js",
20
- "prepublishOnly": "bash scripts/prepublish-guard.sh"
20
+ "prepublishOnly": "node scripts/prepublish-guard.js",
21
+ "verify:pack": "bash scripts/verify-pack.sh"
21
22
  },
22
23
  "keywords": [
23
24
  "gallery",
package/start.sh CHANGED
@@ -410,8 +410,17 @@ stop_server() {
410
410
  }
411
411
 
412
412
  status_server() {
413
+ # 与 start_server 用同一套参数解析:不认 --port 时,用非默认端口起的实例会被判成「未运行」
414
+ # (下面查监听与 /api/status 都用 port,而 port 默认取自配置里的端口)。
415
+ local port_opt=""
416
+ while [ $# -gt 0 ]; do
417
+ case "$1" in
418
+ --port) port_opt="${2:-}"; shift 2 ;;
419
+ *) shift ;;
420
+ esac
421
+ done
413
422
  local port
414
- port="$(config_port)"
423
+ port="${port_opt:-$(config_port)}"
415
424
  echo "======== $PROJECT_NAME ========"
416
425
  echo "根目录: $ROOT"
417
426
  echo "PID文件: $PID_FILE$([ -f "$PID_FILE" ] && echo " (存在)" || echo " (无)")"
@@ -511,7 +520,7 @@ case "$CMD" in
511
520
  sleep 1
512
521
  start_server "$@"
513
522
  ;;
514
- status) status_server ;;
523
+ status) status_server "$@" ;;
515
524
  *)
516
525
  err "❌ 未知命令: $CMD"
517
526
  echo "可用命令: start, stop, restart, status"