- 站点内容外置为单一片段(upstreamInclude,运维维护):生成的 server 块 = 证书骨架 + 一行 include <片段>,撤掉此前的 customDir 多片段方案;并强制 include 必须是绝对路径 且文件已存在(nginx 解析相对 include 的基准是 nginx prefix,不是脚本 cwd,写相对路径 会让 nginx -t 失败并回滚整轮变更),不满足直接 exit 1(dry-run 下仅告警) - conf 命名加版本位 <domain>-<ver>.conf:轮转只改配置的 ver,旧命名自动清理并 reload - 声明式对账自愈:证书 / 私钥 / server 块缺失或被改坏,按库内内容原子重建后统一 nginx -t + reload(内容一致时零写入、零 reload);失败态(sync_status=2)同样参与 收敛并在校验通过后回到 1;nginx -t / reload 属全局失败,只落 last_sync_error 下轮 重试,不再把行写成 2 卡死 - 域名下线改为配置差集驱动:以「已配置 + 已验证 + 证书就绪」的期望集合为准(同一仓库 只取 id 最小的一条),目录中属于本系统命名规则但配置里已无该域名的 conf / 证书直接 删除并 reload;不再消费 retired_domain(该列仅作应用侧审计留痕) - 证书未配置的行不写 conf 也不作为文件保留依据(遗留产物由差集回收,避免 conf 引用 不存在的证书导致 nginx -t 全局失败),行状态回写 sync_status=0 待同步;证书非空但 非法、域名形态非法才记行级失败(2) - cert-sync 部署命令瘦身为 install / uninstall;新增 watchdog 部署命令(precheck / install / status / dry-run / run),安装路径统一到 script/;deploy-lib 保护生产运行时 配置不被发布覆盖;README 补「发布与运维」章节(目录硬约定 / 定时任务 / 命令清单)
101 lines
4.4 KiB
JSON
101 lines
4.4 KiB
JSON
{
|
|
"name": "wms",
|
|
"version": "1.0.0",
|
|
"description": "奇门wms",
|
|
"private": true,
|
|
"egg": {
|
|
"declarations": true
|
|
},
|
|
"dependencies": {
|
|
"await-stream-ready": "^1.0.1",
|
|
"cos-js-sdk-v5": "^1.10.1",
|
|
"cos-nodejs-sdk-v5": "^2.15.4",
|
|
"crypto-js": "^4.2.0",
|
|
"egg": "^3.17.5",
|
|
"egg-cors": "^3.0.1",
|
|
"egg-jwt": "^3.1.7",
|
|
"egg-mysql": "^5.0.0",
|
|
"egg-redis": "^2.6.1",
|
|
"egg-scripts": "2",
|
|
"egg-sequelize": "^6.0.0",
|
|
"egg-view-ejs": "^3.0.0",
|
|
"ejs": "^5.0.1",
|
|
"exceljs": "^4.4.0",
|
|
"fast-xml-parser": "^5.3.1",
|
|
"mysql2": "^3.15.3",
|
|
"path": "^0.12.7",
|
|
"qiniu-js": "^3.4.3",
|
|
"soap": "^1.8.0",
|
|
"spark-md5": "^3.0.2",
|
|
"xlsx": "^0.18.5"
|
|
},
|
|
"devDependencies": {
|
|
"egg-bin": "6",
|
|
"egg-mock": "5",
|
|
"eslint": "8",
|
|
"eslint-config-egg": "13",
|
|
"sequelize-cli": "^6.6.3"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
},
|
|
"scripts": {
|
|
"start": "egg-scripts start ",
|
|
"stop": "node ./app/lib/stop_current_egg.js",
|
|
"dev": "egg-bin dev --port=6060",
|
|
"frpc:install": "powershell -ExecutionPolicy Bypass -File ./script/frp/frp-install.ps1",
|
|
"frpc:start": "powershell -ExecutionPolicy Bypass -File ./script/frp/frp-start.ps1",
|
|
"file-writer:pressure": "node ./temp/generated-tests/file-writer-pressure.generated.test.cjs",
|
|
"debug:webhook:receiver": "node ./script/debug-webhook-receiver.cjs",
|
|
"debug:webhook:receiving": "node ./script/debug-send-receiving-webhooks.cjs",
|
|
"debug:warehouse:push-receiver": "node ./script/debug-warehouse-push-receiver.cjs",
|
|
"doc:api:update": "node ./script/update-api-doc.cjs",
|
|
"doc:api:update:dry": "node ./script/update-api-doc.cjs --dry-run",
|
|
"deploy:precheck": "node ./script/deploy-precheck.cjs",
|
|
"deploy:authcheck": "node ./script/deploy-auth-check.cjs",
|
|
"deploy:version": "node ./script/deploy-version.cjs production",
|
|
"deploy:version:history": "node ./script/deploy-version.cjs production --history=20",
|
|
"deploy:inspect": "node ./script/deploy-ops.cjs production inspect",
|
|
"deploy:smoke": "node ./script/deploy-ops.cjs production smoke",
|
|
"deploy:verify": "node ./script/deploy-ops.cjs production verify",
|
|
"deploy:cleanup-backups": "node ./script/deploy-ops.cjs production cleanup-backups",
|
|
"deploy:cert-sync:install": "node ./script/deploy-cert-sync.cjs production install",
|
|
"deploy:cert-sync:uninstall": "node ./script/deploy-cert-sync.cjs production uninstall",
|
|
"deploy:watchdog:precheck": "node ./script/deploy-watchdog.cjs production precheck",
|
|
"deploy:watchdog:install": "node ./script/deploy-watchdog.cjs production install",
|
|
"deploy:watchdog:status": "node ./script/deploy-watchdog.cjs production status",
|
|
"deploy:watchdog:dry-run": "node ./script/deploy-watchdog.cjs production dry-run",
|
|
"deploy:watchdog:run": "node ./script/deploy-watchdog.cjs production run",
|
|
|
|
"deploy:gateway-probe": "node ./script/deploy-ops.cjs production gateway-probe",
|
|
"ops:check-root-logs": "node ./script/check-root-logs.cjs",
|
|
"ops:clean-root-logs": "node ./script/check-root-logs.cjs production --clean",
|
|
"ops:clean-root-logs:apply": "node ./script/check-root-logs.cjs production --clean --apply",
|
|
"version:record": "node ./script/version-record.cjs",
|
|
"version:history": "node ./script/version-history.cjs --limit=50",
|
|
"deploy": "npm run deploy:prod",
|
|
"deploy:prod": "node ./script/deploy-remote.cjs production",
|
|
"rollback": "npm run rollback:prod",
|
|
"rollback:prod": "node ./script/rollback-remote.cjs production",
|
|
"guard:git": "node ./script/git-safety-check.cjs",
|
|
"setup:hooks": "node ./script/setup-git-hooks.cjs",
|
|
"test": "npm run lint -- --fix && npm run test:local",
|
|
"test:local": "egg-bin test",
|
|
"test:dispatch-factory": "egg-bin test test/app/model/order_delivery_dispatch_factory.test.js",
|
|
"cov": "egg-bin cov",
|
|
"lint": "eslint .",
|
|
"migration:single": "node ./script/run-single-migration.cjs",
|
|
"db:update-stock-weight": "node ./script/update-stock-warehouse-weight.cjs",
|
|
"db:update-stock-weight:dry": "node ./script/update-stock-warehouse-weight.cjs --dry-run",
|
|
"permission:sync:system-api": "node ./script/sync-system-api-permission.cjs",
|
|
"check:model-boundary": "node ./script/model-boundary-check.cjs",
|
|
"ci": "npm run lint && npm run check:model-boundary && npm run cov"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": ""
|
|
},
|
|
"author": "刘付明仁",
|
|
"license": "MIT"
|
|
}
|