@whyour/qinglong 2.22.0 → 2.24.0
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/.env.example +3 -0
- package/README-NODE.md +10 -0
- package/back/protos/api.proto +10 -0
- package/cli/README.en.md +156 -0
- package/cli/README.md +156 -0
- package/cli/src/internal/maintenance/nodeRuntime.cjs +18 -0
- package/cli/src/internal/maintenance/panelUpgrade.cjs +577 -0
- package/cli/src/internal/maintenance/platformBundle.cjs +582 -0
- package/cli/src/internal/maintenance/upgradeArtifacts.cjs +979 -0
- package/cli/src/internal/maintenance/upgradePrestart.cjs +396 -0
- package/ecosystem.config.js +3 -0
- package/package.json +59 -15
- package/sample/notify.js +308 -135
- package/sample/notify.py +174 -27
- package/shell/api.sh +71 -74
- package/shell/install-bundle.cjs +320 -0
- package/shell/install-package.cjs +74 -0
- package/shell/lang/en.sh +38 -0
- package/shell/node-runtime-probe.cjs +62 -0
- package/shell/node_path_cache.sh +10 -2
- package/shell/otask.sh +41 -41
- package/shell/preload/client.js +1 -0
- package/shell/preload/notificationAudit.js +51 -0
- package/shell/preload/sitecustomize.js +9 -5
- package/shell/preload/sitecustomize.py +9 -7
- package/shell/rmlog.sh +21 -16
- package/shell/share.sh +62 -45
- package/shell/start-simplify.sh +90 -0
- package/shell/start.sh +48 -71
- package/shell/task-timeout.sh +75 -0
- package/shell/task.sh +14 -12
- package/shell/update.sh +92 -133
- package/shell/upgrade-lock.yaml +16122 -0
- package/shell/upgrade.cjs +8 -0
- package/static/build/api/clientIp.js +2 -1
- package/static/build/api/clientIp.js.map +1 -0
- package/static/build/api/config.js +2 -6
- package/static/build/api/config.js.map +1 -0
- package/static/build/api/cron.js.map +1 -0
- package/static/build/api/dashboard.js.map +1 -0
- package/static/build/api/dependence.js.map +1 -0
- package/static/build/api/env.js +15 -14
- package/static/build/api/env.js.map +1 -0
- package/static/build/api/health.js.map +1 -0
- package/static/build/api/index.js.map +1 -0
- package/static/build/api/log.js.map +1 -0
- package/static/build/api/open.js +2 -1
- package/static/build/api/open.js.map +1 -0
- package/static/build/api/retention.js.map +1 -0
- package/static/build/api/script.js +155 -9
- package/static/build/api/script.js.map +1 -0
- package/static/build/api/subscription.js +3 -6
- package/static/build/api/subscription.js.map +1 -0
- package/static/build/api/system.js +53 -3
- package/static/build/api/system.js.map +1 -0
- package/static/build/api/update.js.map +1 -0
- package/static/build/api/user.js.map +1 -0
- package/static/build/app.js +10 -23
- package/static/build/app.js.map +1 -0
- package/static/build/bootstrap/database.js.map +1 -0
- package/static/build/bootstrap/upgradeProbe.js +154 -0
- package/static/build/bootstrap/upgradeProbe.js.map +1 -0
- package/static/build/config/const.js +2 -1
- package/static/build/config/const.js.map +1 -0
- package/static/build/config/container.js.map +1 -0
- package/static/build/config/grpcCerts.js +89 -40
- package/static/build/config/grpcCerts.js.map +1 -0
- package/static/build/config/http.js.map +1 -0
- package/static/build/config/index.js.map +1 -0
- package/static/build/config/serverEnv.js.map +1 -0
- package/static/build/config/share.js.map +1 -0
- package/static/build/config/subscription.js +19 -11
- package/static/build/config/subscription.js.map +1 -0
- package/static/build/config/util.js +178 -77
- package/static/build/config/util.js.map +1 -0
- package/static/build/data/cron.js.map +1 -0
- package/static/build/data/cronStats.js.map +1 -0
- package/static/build/data/cronView.js.map +1 -0
- package/static/build/data/dependence.js.map +1 -0
- package/static/build/data/env.js.map +1 -0
- package/static/build/data/index.js.map +1 -0
- package/static/build/data/notify.js.map +1 -0
- package/static/build/data/open.js.map +1 -0
- package/static/build/data/runningInstance.js.map +1 -0
- package/static/build/data/sock.js.map +1 -0
- package/static/build/data/subscription.js.map +1 -0
- package/static/build/data/system.js +3 -1
- package/static/build/data/system.js.map +1 -0
- package/static/build/interface/schedule.js.map +1 -0
- package/static/build/loaders/app.js.map +1 -0
- package/static/build/loaders/bootAfter.js.map +1 -0
- package/static/build/loaders/db.js.map +1 -0
- package/static/build/loaders/depInjector.js.map +1 -0
- package/static/build/loaders/deps.js.map +1 -0
- package/static/build/loaders/express.js +10 -3
- package/static/build/loaders/express.js.map +1 -0
- package/static/build/loaders/httpApplication.js +55 -0
- package/static/build/loaders/httpApplication.js.map +1 -0
- package/static/build/loaders/initData.js +20 -30
- package/static/build/loaders/initData.js.map +1 -0
- package/static/build/loaders/initFile.js.map +1 -0
- package/static/build/loaders/initTask.js +11 -1
- package/static/build/loaders/initTask.js.map +1 -0
- package/static/build/loaders/logger.js.map +1 -0
- package/static/build/loaders/server.js.map +1 -0
- package/static/build/loaders/sock.js.map +1 -0
- package/static/build/middlewares/monitoring.js.map +1 -0
- package/static/build/middlewares/protectedPathCase.js.map +1 -0
- package/static/build/middlewares/uniqueConstraintError.js +15 -0
- package/static/build/middlewares/uniqueConstraintError.js.map +1 -0
- package/static/build/middlewares/validationErrors.js +17 -0
- package/static/build/middlewares/validationErrors.js.map +1 -0
- package/static/build/protos/api.js +140 -2
- package/static/build/protos/api.js.map +1 -0
- package/static/build/protos/cron.js +63 -2
- package/static/build/protos/cron.js.map +1 -0
- package/static/build/protos/health.js.map +1 -0
- package/static/build/schedule/addCron.js +45 -63
- package/static/build/schedule/addCron.js.map +1 -0
- package/static/build/schedule/api.js +21 -2
- package/static/build/schedule/api.js.map +1 -0
- package/static/build/schedule/client.js +19 -1
- package/static/build/schedule/client.js.map +1 -0
- package/static/build/schedule/data.js.map +1 -0
- package/static/build/schedule/delCron.js +6 -4
- package/static/build/schedule/delCron.js.map +1 -0
- package/static/build/schedule/health.js.map +1 -0
- package/static/build/schedule/setConcurrency.js +27 -0
- package/static/build/schedule/setConcurrency.js.map +1 -0
- package/static/build/services/config.js +2 -3
- package/static/build/services/config.js.map +1 -0
- package/static/build/services/cron.js +43 -17
- package/static/build/services/cron.js.map +1 -0
- package/static/build/services/cronView.js.map +1 -0
- package/static/build/services/dependence.js +48 -13
- package/static/build/services/dependence.js.map +1 -0
- package/static/build/services/env.js +1 -1
- package/static/build/services/env.js.map +1 -0
- package/static/build/services/grpc.js +4 -3
- package/static/build/services/grpc.js.map +1 -0
- package/static/build/services/health.js +2 -0
- package/static/build/services/health.js.map +1 -0
- package/static/build/services/http.js.map +1 -0
- package/static/build/services/log.js +1 -1
- package/static/build/services/log.js.map +1 -0
- package/static/build/services/metrics.js +2 -1
- package/static/build/services/metrics.js.map +1 -0
- package/static/build/services/notify.js +45 -24
- package/static/build/services/notify.js.map +1 -0
- package/static/build/services/open.js +106 -31
- package/static/build/services/open.js.map +1 -0
- package/static/build/services/retention.js.map +1 -0
- package/static/build/services/schedule.js +32 -21
- package/static/build/services/schedule.js.map +1 -0
- package/static/build/services/script.js +1 -1
- package/static/build/services/script.js.map +1 -0
- package/static/build/services/scriptHistory.js +30 -0
- package/static/build/services/scriptHistory.js.map +1 -0
- package/static/build/services/sock.js.map +1 -0
- package/static/build/services/sshKey.js +45 -17
- package/static/build/services/sshKey.js.map +1 -0
- package/static/build/services/subscription.js +104 -53
- package/static/build/services/subscription.js.map +1 -0
- package/static/build/services/system.js +139 -74
- package/static/build/services/system.js.map +1 -0
- package/static/build/services/user.js +17 -12
- package/static/build/services/user.js.map +1 -0
- package/static/build/shared/auth.js.map +1 -0
- package/static/build/shared/authMutation.js.map +1 -0
- package/static/build/shared/childProcess.js.map +1 -0
- package/static/build/shared/clientIp.js.map +1 -0
- package/static/build/shared/cronCommand.js +17 -0
- package/static/build/shared/cronCommand.js.map +1 -0
- package/static/build/shared/cronSchedule.js +157 -0
- package/static/build/shared/cronSchedule.js.map +1 -0
- package/static/build/shared/cronScheduler.js +74 -0
- package/static/build/shared/cronScheduler.js.map +1 -0
- package/static/build/shared/errors.js.map +1 -0
- package/static/build/shared/fileAccess.js.map +1 -0
- package/static/build/shared/i18n.js +167 -87
- package/static/build/shared/i18n.js.map +1 -0
- package/static/build/shared/interface.js.map +1 -0
- package/static/build/shared/languageSync.js +61 -0
- package/static/build/shared/languageSync.js.map +1 -0
- package/static/build/shared/linuxMirror.js +96 -0
- package/static/build/shared/linuxMirror.js.map +1 -0
- package/static/build/shared/logPath.js +15 -0
- package/static/build/shared/logPath.js.map +1 -0
- package/static/build/shared/logReader.js.map +1 -0
- package/static/build/shared/logStreamManager.js.map +1 -0
- package/static/build/shared/loginThrottle.js +45 -0
- package/static/build/shared/loginThrottle.js.map +1 -0
- package/static/build/shared/notificationAudit.js +46 -0
- package/static/build/shared/notificationAudit.js.map +1 -0
- package/static/build/shared/pLimit.js +27 -14
- package/static/build/shared/pLimit.js.map +1 -0
- package/static/build/shared/password.js.map +1 -0
- package/static/build/shared/retention.js.map +1 -0
- package/static/build/shared/runCron.js +81 -29
- package/static/build/shared/runCron.js.map +1 -0
- package/static/build/shared/runtimeBuild.js +44 -0
- package/static/build/shared/runtimeBuild.js.map +1 -0
- package/static/build/shared/schedulerMutationLock.js.map +1 -0
- package/static/build/shared/schedulerReadiness.js.map +1 -0
- package/static/build/shared/schemaMigrations.js.map +1 -0
- package/static/build/shared/scriptHistory.js +445 -0
- package/static/build/shared/scriptHistory.js.map +1 -0
- package/static/build/shared/shellQuote.js +11 -0
- package/static/build/shared/shellQuote.js.map +1 -0
- package/static/build/shared/startupProcess.js.map +1 -0
- package/static/build/shared/store.js.map +1 -0
- package/static/build/shared/subscriptionMutationLock.js +34 -0
- package/static/build/shared/subscriptionMutationLock.js.map +1 -0
- package/static/build/shared/subscriptionPath.js +41 -0
- package/static/build/shared/subscriptionPath.js.map +1 -0
- package/static/build/shared/subscriptionStorage.js +98 -0
- package/static/build/shared/subscriptionStorage.js.map +1 -0
- package/static/build/shared/trustProxy.js +5 -4
- package/static/build/shared/trustProxy.js.map +1 -0
- package/static/build/shared/utils.js +2 -1
- package/static/build/shared/utils.js.map +1 -0
- package/static/build/token.js +3 -14
- package/static/build/token.js.map +1 -0
- package/static/build/validation/schedule.js +22 -19
- package/static/build/validation/schedule.js.map +1 -0
- package/static/build-info.json +754 -0
- package/static/dist/1089.0ecc5383.async.js.gz +0 -0
- package/static/dist/1174.41a43fee.async.js.gz +0 -0
- package/static/dist/119.89e2d610.async.js.gz +0 -0
- package/static/dist/1212.f87fd07a.async.js.gz +0 -0
- package/static/dist/1352.96a77e1d.async.js.gz +0 -0
- package/static/dist/1379.f91563a1.async.js.gz +0 -0
- package/static/dist/1571.94ddca13.async.js.gz +0 -0
- package/static/dist/1706.ac98cb3f.async.js.gz +0 -0
- package/static/dist/1765.5ac01a93.async.js.gz +0 -0
- package/static/dist/1836.f0b74cf1.async.js.gz +0 -0
- package/static/dist/1883.675b6a18.chunk.css.gz +0 -0
- package/static/dist/1885.b8f427bf.async.js.gz +0 -0
- package/static/dist/1887.9e0d3da8.async.js.gz +0 -0
- package/static/dist/1967.3f3945d0.async.js.gz +0 -0
- package/static/dist/198.db47fc1a.async.js.gz +0 -0
- package/static/dist/2325.dfa32834.async.js.gz +0 -0
- package/static/dist/2338.d678967d.async.js.gz +0 -0
- package/static/dist/2372.b5a50ee7.async.js +1 -0
- package/static/dist/2372.b5a50ee7.async.js.gz +0 -0
- package/static/dist/2476.4e9b0992.async.js.gz +0 -0
- package/static/dist/2537.2b262ee0.async.js.gz +0 -0
- package/static/dist/2577.aa8fe709.async.js.gz +0 -0
- package/static/dist/2635.d4c59d23.async.js.gz +0 -0
- package/static/dist/2664.e69530fb.async.js +1 -0
- package/static/dist/2664.e69530fb.async.js.gz +0 -0
- package/static/dist/2693.51c2636b.async.js.gz +0 -0
- package/static/dist/2808.cdc0995c.async.js.gz +0 -0
- package/static/dist/2821.651f31e5.async.js.gz +0 -0
- package/static/dist/2890.add55e85.async.js.gz +0 -0
- package/static/dist/2901.6d0de54e.async.js +1 -0
- package/static/dist/2901.6d0de54e.async.js.gz +0 -0
- package/static/dist/292.1b962b29.chunk.css.gz +0 -0
- package/static/dist/292.27ce781f.async.js +1 -0
- package/static/dist/292.27ce781f.async.js.gz +0 -0
- package/static/dist/300.08ac9875.async.js.gz +0 -0
- package/static/dist/3191.3b7e4b42.async.js +1 -0
- package/static/dist/3191.3b7e4b42.async.js.gz +0 -0
- package/static/dist/3382.a584a111.async.js.gz +0 -0
- package/static/dist/3383.041eee73.async.js.gz +0 -0
- package/static/dist/3512.95e41255.async.js +1 -0
- package/static/dist/3512.95e41255.async.js.gz +0 -0
- package/static/dist/3714.8d6dba9e.async.js.gz +0 -0
- package/static/dist/3906.a5eee612.async.js.gz +0 -0
- package/static/dist/3948.4fe809fd.async.js.gz +0 -0
- package/static/dist/4324.5a5887d1.async.js.gz +0 -0
- package/static/dist/4559.faab3673.async.js.gz +0 -0
- package/static/dist/4573.16f19278.async.js.gz +0 -0
- package/static/dist/{4736.1d2b5cb6.async.js → 4736.7c4c489b.async.js} +1 -1
- package/static/dist/4736.7c4c489b.async.js.gz +0 -0
- package/static/dist/4887.8e3ae573.async.js.gz +0 -0
- package/static/dist/4934.f3539d08.async.js.gz +0 -0
- package/static/dist/5077.cbd111cd.async.js.gz +0 -0
- package/static/dist/{5481.624d0e07.async.js → 5481.e2945a63.async.js} +1 -1
- package/static/dist/5481.e2945a63.async.js.gz +0 -0
- package/static/dist/5662.678b0cfb.async.js.gz +0 -0
- package/static/dist/5970.5862e59e.async.js +1 -0
- package/static/dist/5970.5862e59e.async.js.gz +0 -0
- package/static/dist/6013.db535339.async.js.gz +0 -0
- package/static/dist/6035.32ebfad9.async.js.gz +0 -0
- package/static/dist/6212.30a9c190.async.js +1 -0
- package/static/dist/6212.30a9c190.async.js.gz +0 -0
- package/static/dist/6341.673fb65c.async.js.gz +0 -0
- package/static/dist/6367.8b0e838c.async.js.gz +0 -0
- package/static/dist/6431.c50479be.async.js +1 -0
- package/static/dist/6569.55177f6a.async.js.gz +0 -0
- package/static/dist/6610.c111af7e.async.js.gz +0 -0
- package/static/dist/6638.87a163d2.async.js.gz +0 -0
- package/static/dist/6646.95e92533.async.js.gz +0 -0
- package/static/dist/{6872.a503ef55.async.js → 6872.fcc9ce17.async.js} +1 -1
- package/static/dist/6872.fcc9ce17.async.js.gz +0 -0
- package/static/dist/691.187a388c.async.js.gz +0 -0
- package/static/dist/7146.4dc150b1.async.js +1 -0
- package/static/dist/7146.4dc150b1.async.js.gz +0 -0
- package/static/dist/7231.f7e5b668.async.js.gz +0 -0
- package/static/dist/7253.4b9bf133.async.js.gz +0 -0
- package/static/dist/7278.96bf439f.async.js.gz +0 -0
- package/static/dist/7355.fca746f5.async.js.gz +0 -0
- package/static/dist/7384.1bb449d5.async.js.gz +0 -0
- package/static/dist/7508.3fffed15.chunk.css.gz +0 -0
- package/static/dist/7508.d90eac63.async.js.gz +0 -0
- package/static/dist/7802.34255805.async.js.gz +0 -0
- package/static/dist/7984.eaac7402.async.js.gz +0 -0
- package/static/dist/8033.5cb31493.async.js.gz +0 -0
- package/static/dist/8078.8586c875.async.js.gz +0 -0
- package/static/dist/8147.2fb55202.async.js.gz +0 -0
- package/static/dist/8187.48c130d6.async.js.gz +0 -0
- package/static/dist/8495.d53e15ca.async.js.gz +0 -0
- package/static/dist/8844.a0fef08e.async.js.gz +0 -0
- package/static/dist/9308.3202ac13.async.js.gz +0 -0
- package/static/dist/9323.a33f47da.async.js.gz +0 -0
- package/static/dist/965.8d9b1fbd.async.js +1 -0
- package/static/dist/965.8d9b1fbd.async.js.gz +0 -0
- package/static/dist/9761.360a19d8.async.js.gz +0 -0
- package/static/dist/index.html +2 -2
- package/static/dist/layouts__index.86b6bcbe.chunk.css +1 -0
- package/static/dist/layouts__index.86b6bcbe.chunk.css.gz +0 -0
- package/static/dist/layouts__index.c8e9788e.async.js +1 -0
- package/static/dist/layouts__index.c8e9788e.async.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/base/worker/workerMain.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/abap/abap.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/clojure/clojure.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/elixir/elixir.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/freemarker2/freemarker2.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/mysql/mysql.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/pgsql/pgsql.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/redshift/redshift.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/solidity/solidity.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/basic-languages/sql/sql.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.css.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.de.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.es.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.fr.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.it.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ja.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ko.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ru.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.zh-cn.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.zh-tw.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/css/cssMode.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/css/cssWorker.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/html/htmlMode.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/html/htmlWorker.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/json/jsonMode.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/json/jsonWorker.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/typescript/tsMode.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/language/typescript/tsWorker.js.gz +0 -0
- package/static/dist/monaco-editor/min/vs/loader.js.gz +0 -0
- package/static/dist/preload_helper.8b8f6581.js +1 -0
- package/static/dist/src__pages__404.3fd8332e.async.js +1 -0
- package/static/dist/src__pages__config__index.d18d8f95.async.js +1 -0
- package/static/dist/src__pages__crontab__detail.88729e8f.async.js +1 -0
- package/static/dist/src__pages__crontab__detail.88729e8f.async.js.gz +0 -0
- package/static/dist/src__pages__crontab__index.8aa9d297.async.js +1 -0
- package/static/dist/src__pages__crontab__index.8aa9d297.async.js.gz +0 -0
- package/static/dist/src__pages__crontab__logModal.930535e2.async.js.gz +0 -0
- package/static/dist/src__pages__crontab__modal.a2c8fdcc.async.js.gz +0 -0
- package/static/dist/src__pages__crontab__viewCreateModal.7b4f9cbe.async.js.gz +0 -0
- package/static/dist/src__pages__crontab__viewManageModal.cd454ea0.async.js.gz +0 -0
- package/static/dist/src__pages__dashboard__index.c05ce904.async.js +1 -0
- package/static/dist/src__pages__dashboard__index.c05ce904.async.js.gz +0 -0
- package/static/dist/src__pages__dependence__index.5b7fd97d.async.js +1 -0
- package/static/dist/src__pages__dependence__index.5b7fd97d.async.js.gz +0 -0
- package/static/dist/{src__pages__dependence__logModal.154efe7a.async.js → src__pages__dependence__logModal.01729f63.async.js} +1 -1
- package/static/dist/src__pages__dependence__logModal.01729f63.async.js.gz +0 -0
- package/static/dist/src__pages__dependence__modal.ef7ae53b.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.ef7ae53b.async.js.gz +0 -0
- package/static/dist/src__pages__diff__index.4233ea93.async.js +1 -0
- package/static/dist/src__pages__diff__index.4233ea93.async.js.gz +0 -0
- package/static/dist/src__pages__env__index.eddb35bf.async.js +1 -0
- package/static/dist/src__pages__env__index.eddb35bf.async.js.gz +0 -0
- package/static/dist/src__pages__env__modal.4d71adb3.async.js.gz +0 -0
- package/static/dist/src__pages__error__index.66605c72.async.js +1 -0
- package/static/dist/src__pages__initialization__index.9c1c5b76.async.js +1 -0
- package/static/dist/src__pages__initialization__index.9c1c5b76.async.js.gz +0 -0
- package/static/dist/src__pages__log__index.71250e0d.async.js.gz +0 -0
- package/static/dist/src__pages__login__index.58bb4b38.async.js +1 -0
- package/static/dist/src__pages__login__index.58bb4b38.async.js.gz +0 -0
- package/static/dist/src__pages__script__components__UnsupportedFilePreview__index.c347a13a.async.js.gz +0 -0
- package/static/dist/src__pages__script__editModal.d15f8d78.async.js +1 -0
- package/static/dist/src__pages__script__editModal.d15f8d78.async.js.gz +0 -0
- package/static/dist/src__pages__script__editNameModal.789ad87b.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.789ad87b.async.js.gz +0 -0
- package/static/dist/src__pages__script__historyDrawer.8c58d958.async.js +1 -0
- package/static/dist/src__pages__script__historyDrawer.8c58d958.async.js.gz +0 -0
- package/static/dist/src__pages__script__historyDrawer.a449193a.chunk.css +1 -0
- package/static/dist/src__pages__script__index.96a6d30f.async.js +1 -0
- package/static/dist/src__pages__script__index.96a6d30f.async.js.gz +0 -0
- package/static/dist/src__pages__script__index.ab360776.chunk.css +1 -0
- package/static/dist/src__pages__script__saveModal.8fca1a22.async.js +1 -0
- package/static/dist/src__pages__script__saveWithHistory.99ece830.async.js +1 -0
- package/static/dist/{src__pages__setting__about.e6db5090.chunk.css → src__pages__setting__about.0d6ea255.chunk.css} +1 -1
- package/static/dist/src__pages__setting__about.3d3c019f.async.js.gz +0 -0
- package/static/dist/src__pages__setting__checkUpdate.429a42f3.async.js +1 -0
- package/static/dist/src__pages__setting__checkUpdate.429a42f3.async.js.gz +0 -0
- package/static/dist/src__pages__setting__clientIp.3a8711ed.async.js.gz +0 -0
- package/static/dist/{src__pages__setting__dependence.28ecea01.chunk.css → src__pages__setting__dependence.80b183a5.chunk.css} +1 -1
- package/static/dist/src__pages__setting__dependence.c227c0f5.async.js +1 -0
- package/static/dist/src__pages__setting__dependence.c227c0f5.async.js.gz +0 -0
- package/static/dist/src__pages__setting__index.274ad415.async.js +1 -0
- package/static/dist/src__pages__setting__index.274ad415.async.js.gz +0 -0
- package/static/dist/{src__pages__setting__index.7cf46d4a.chunk.css → src__pages__setting__index.46315660.chunk.css} +1 -1
- package/static/dist/src__pages__setting__loginLog.ef135f19.async.js +1 -0
- package/static/dist/src__pages__setting__loginLog.ef135f19.async.js.gz +0 -0
- package/static/dist/src__pages__setting__notifyLog.5ef5b578.async.js +1 -0
- package/static/dist/src__pages__setting__notifyLog.5ef5b578.async.js.gz +0 -0
- package/static/dist/{src__pages__setting__other.28ecea01.chunk.css → src__pages__setting__notifyLog.80b183a5.chunk.css} +1 -1
- package/static/dist/src__pages__setting__other.80b183a5.chunk.css +1 -0
- package/static/dist/src__pages__setting__other.e744c0d1.async.js +1 -0
- package/static/dist/src__pages__setting__other.e744c0d1.async.js.gz +0 -0
- package/static/dist/src__pages__setting__security.e2d71ebb.async.js.gz +0 -0
- package/static/dist/src__pages__setting__systemLog.000bcb5e.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.000bcb5e.async.js.gz +0 -0
- package/static/dist/src__pages__subscription__index.f556ae4c.async.js +1 -0
- package/static/dist/src__pages__subscription__index.f556ae4c.async.js.gz +0 -0
- package/static/dist/src__pages__subscription__logModal.cdba5139.async.js.gz +0 -0
- package/static/dist/src__pages__subscription__modal.8f04f506.async.js +1 -0
- package/static/dist/umi.73936e34.js +1 -0
- package/static/dist/umi.73936e34.js.gz +0 -0
- package/static/dist/umi.a4d14b92.css.gz +0 -0
- package/version.yaml +11 -19
- package/.dockerignore +0 -13
- package/AGENTS.md +0 -43
- package/SECURITY.md +0 -5
- package/back/protos/cron.proto +0 -29
- package/back/protos/health.proto +0 -22
- package/deploy/kubernetes/README.md +0 -81
- package/deploy/kubernetes/base/kustomization.yaml +0 -5
- package/deploy/kubernetes/base/qinglong.yaml +0 -95
- package/deploy/kubernetes/overlays/example/kustomization.yaml +0 -10
- package/docker/Dockerfile +0 -113
- package/docker/Dockerfile.310 +0 -113
- package/docker/Dockerfile.debian +0 -128
- package/docker/Dockerfile.debian310 +0 -130
- package/docker/build-manifest.cjs +0 -28
- package/docker/docker-compose.yml +0 -10
- package/docker/docker-entrypoint.sh +0 -147
- package/docker/verify-build.cjs +0 -49
- package/docs/PROJECT_ARCHITECTURE.md +0 -550
- package/docs/releases/2.22.0-validation.md +0 -49
- package/docs/releases/2.22.0.md +0 -54
- package/sample/tool.ts +0 -40
- package/scripts/benchmark-execution.cjs +0 -96
- package/scripts/write-build-info.cjs +0 -27
- package/shell/pub.sh +0 -28
- package/static/dist/2096.6d98fd12.async.js +0 -1
- package/static/dist/255.8a80b983.async.js +0 -1
- package/static/dist/2901.2ca95295.async.js +0 -1
- package/static/dist/3600.7637c822.async.js +0 -1
- package/static/dist/445.a65ff63b.async.js +0 -1
- package/static/dist/4859.97d6653c.async.js +0 -1
- package/static/dist/5970.d3a6e7bd.async.js +0 -1
- package/static/dist/6212.9e6d9913.async.js +0 -1
- package/static/dist/6431.4603ad0e.async.js +0 -1
- package/static/dist/6707.801b886b.async.js +0 -1
- package/static/dist/9066.605168f8.async.js +0 -1
- package/static/dist/9313.37acaf13.async.js +0 -1
- package/static/dist/layouts__index.633d3553.async.js +0 -1
- package/static/dist/layouts__index.adf0692f.chunk.css +0 -1
- package/static/dist/preload_helper.cf7de3fa.js +0 -1
- package/static/dist/src__pages__404.771168fc.async.js +0 -1
- package/static/dist/src__pages__config__index.9aba4054.async.js +0 -1
- package/static/dist/src__pages__crontab__detail.86b2eebb.async.js +0 -1
- package/static/dist/src__pages__crontab__index.ae4e06f2.async.js +0 -1
- package/static/dist/src__pages__dashboard__index.243c5a35.async.js +0 -1
- package/static/dist/src__pages__dependence__index.874d501f.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.a29c1a0f.async.js +0 -1
- package/static/dist/src__pages__diff__index.1714b941.async.js +0 -1
- package/static/dist/src__pages__env__index.fd6fd2b0.async.js +0 -1
- package/static/dist/src__pages__error__index.aae50c94.async.js +0 -1
- package/static/dist/src__pages__initialization__index.82a2e967.async.js +0 -1
- package/static/dist/src__pages__login__index.a0fd5ed8.async.js +0 -1
- package/static/dist/src__pages__script__editModal.22acdf7c.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.1a521cc0.async.js +0 -1
- package/static/dist/src__pages__script__index.60b6f827.chunk.css +0 -1
- package/static/dist/src__pages__script__index.a18b2692.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.8965b74c.async.js +0 -1
- package/static/dist/src__pages__setting__checkUpdate.d175b154.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.9c0f749b.async.js +0 -1
- package/static/dist/src__pages__setting__index.cb397741.async.js +0 -1
- package/static/dist/src__pages__setting__loginLog.e0a1f54d.async.js +0 -1
- package/static/dist/src__pages__setting__other.3d0b8492.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.b3046955.async.js +0 -1
- package/static/dist/src__pages__subscription__index.43086a06.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.38991e1e.async.js +0 -1
- package/static/dist/umi.fc019050.js +0 -1
- package/test/back/auth-security.test.cjs +0 -74
- package/test/back/build-provenance.test.cjs +0 -150
- package/test/back/cron-log-name.test.cjs +0 -110
- package/test/back/cron-validation.test.cjs +0 -45
- package/test/back/dashboard-failures.test.cjs +0 -173
- package/test/back/database-bootstrap.test.cjs +0 -193
- package/test/back/dependence-cache-status.test.cjs +0 -125
- package/test/back/deprecated-file-routes.test.cjs +0 -82
- package/test/back/ecosystem.test.cjs +0 -28
- package/test/back/env-name-parsing.test.cjs +0 -96
- package/test/back/execution-lifecycle.test.cjs +0 -236
- package/test/back/file-access-security.test.cjs +0 -47
- package/test/back/fileTreeListing.test.cjs +0 -57
- package/test/back/grpc-cron-response.test.cjs +0 -60
- package/test/back/http-exclusive-listen.test.cjs +0 -31
- package/test/back/http-security.test.cjs +0 -213
- package/test/back/listen-security.test.cjs +0 -67
- package/test/back/log-path-security.test.cjs +0 -158
- package/test/back/logReader.test.cjs +0 -72
- package/test/back/manual-execution.test.cjs +0 -85
- package/test/back/manual-stop-claim.test.cjs +0 -220
- package/test/back/metrics.test.cjs +0 -34
- package/test/back/monitoring.test.cjs +0 -73
- package/test/back/node-path-cache.test.cjs +0 -173
- package/test/back/node-path-lock.test.cjs +0 -178
- package/test/back/npm-publication.test.cjs +0 -70
- package/test/back/primary-apm.test.cjs +0 -24
- package/test/back/process-exit-state.test.cjs +0 -81
- package/test/back/process-stop-signal.test.cjs +0 -77
- package/test/back/protected-path-case.test.cjs +0 -58
- package/test/back/qlServiceLogCommand.test.cjs +0 -128
- package/test/back/retention.test.cjs +0 -131
- package/test/back/role-loading.test.cjs +0 -118
- package/test/back/schedule-health.test.cjs +0 -86
- package/test/back/scheduler-file-lock.test.cjs +0 -51
- package/test/back/scheduler-mutation.test.cjs +0 -312
- package/test/back/scheduler-readiness.test.cjs +0 -85
- package/test/back/scheduler-reconciliation.test.cjs +0 -152
- package/test/back/scheduler-rpc-timeout.test.cjs +0 -49
- package/test/back/schema-migrations.test.cjs +0 -127
- package/test/back/shell-api-parsing.test.cjs +0 -184
- package/test/back/sock-polling.test.cjs +0 -297
- package/test/back/sock-security.test.cjs +0 -72
- package/test/back/start-env-preservation.test.cjs +0 -53
- package/test/back/stop-failure-feedback.test.cjs +0 -158
- package/test/back/stop-race.test.cjs +0 -167
- package/test/back/subscription-cleanup.test.cjs +0 -53
- package/test/back/subscription-stop-state.test.cjs +0 -66
- package/test/back/system-dependence-cache.test.cjs +0 -126
- package/test/back/task-time.test.cjs +0 -116
- package/test/back/user-api.test.cjs +0 -99
- package/test/back/user-security.test.cjs +0 -248
- package/test/back/worker-apm.test.cjs +0 -84
- package/test/back/wpush-grpc.test.cjs +0 -115
- package/test/front/cron-log-pagination.test.cjs +0 -214
- package/test/front/http-auth.test.cjs +0 -152
- package/test/front/http-error.test.cjs +0 -29
- package/test/helpers/load-security-module.cjs +0 -42
- /package/static/dist/{4859.1b962b29.chunk.css → 292.1b962b29.chunk.css} +0 -0
package/shell/update.sh
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
3
|
dir_shell=$QL_DIR/shell
|
|
4
|
-
. $dir_shell/share.sh
|
|
5
|
-
. $dir_shell/api.sh
|
|
4
|
+
. "$dir_shell/share.sh"
|
|
5
|
+
. "$dir_shell/api.sh"
|
|
6
6
|
load_ql_envs
|
|
7
|
-
. $dir_shell/env.sh
|
|
7
|
+
. "$dir_shell/env.sh"
|
|
8
8
|
|
|
9
9
|
send_mark=$dir_shell/send_mark
|
|
10
10
|
|
|
@@ -31,7 +31,7 @@ diff_cron() {
|
|
|
31
31
|
## 输出是否有新的或失效的定时任务,$1:新的或失效的任务清单文件路径,$2:新/失效
|
|
32
32
|
output_list_add_drop() {
|
|
33
33
|
local list=$1
|
|
34
|
-
local type=$2
|
|
34
|
+
local type=$(t "$2")
|
|
35
35
|
if [[ -s $list ]]; then
|
|
36
36
|
t '检测到有%s的定时任务:' "$type"
|
|
37
37
|
cat $list
|
|
@@ -67,7 +67,7 @@ del_cron() {
|
|
|
67
67
|
done
|
|
68
68
|
if [[ $ids ]]; then
|
|
69
69
|
result=$(del_cron_api "$ids")
|
|
70
|
-
notify_api "$path
|
|
70
|
+
notify_api "$(t '%s 删除任务%s' "$path" "$result")" "$detail"
|
|
71
71
|
fi
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -99,7 +99,9 @@ add_cron() {
|
|
|
99
99
|
cron_name=$(grep "new Env" $file | awk -F "\(" '{print $2}' | awk -F "\)" '{print $1}' | sed 's:.*\('\''\|"\)\([^"'\'']*\)\('\''\|"\).*:\2:' | sed 's:"::g' | sed "s:'::g" | head -1)
|
|
100
100
|
[[ -z $cron_name ]] && cron_name=$(grep "name:" $file | awk -F ":" '{print $2}' | head -1 | xargs)
|
|
101
101
|
[[ -z $cron_name ]] && cron_name=$(basename "$file_name")
|
|
102
|
-
|
|
102
|
+
cron_name=${cron_name//$'\r'/}
|
|
103
|
+
cron_line=${cron_line//$'\r'/}
|
|
104
|
+
result=$(add_cron_api "$cron_line" "${cmd_task} ${file}" "$cron_name" "$SUB_ID")
|
|
103
105
|
echo -e "$result"
|
|
104
106
|
if [[ $detail ]]; then
|
|
105
107
|
detail="${detail}${result}\n"
|
|
@@ -108,7 +110,7 @@ add_cron() {
|
|
|
108
110
|
fi
|
|
109
111
|
fi
|
|
110
112
|
done
|
|
111
|
-
notify_api "$
|
|
113
|
+
notify_api "$(t '%s 新增任务' "$path")" "$detail"
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
## 更新仓库
|
|
@@ -163,17 +165,20 @@ update_raw() {
|
|
|
163
165
|
t '开始下载:%s 保存路径:%s\n' "${raw_url}" "$dir_raw/${raw_file_name}"
|
|
164
166
|
|
|
165
167
|
set_proxy "$proxy"
|
|
166
|
-
wget -q --no-check-certificate -O "$dir_raw/${raw_file_name}.new" $
|
|
167
|
-
|
|
168
|
+
if wget -q --no-check-certificate -O "$dir_raw/${raw_file_name}.new" "$raw_url"; then
|
|
169
|
+
exit_status=0
|
|
170
|
+
else
|
|
171
|
+
exit_status=$?
|
|
172
|
+
fi
|
|
168
173
|
unset_proxy
|
|
169
174
|
|
|
170
|
-
if [[
|
|
171
|
-
mv "$dir_raw/${raw_file_name}.new" "$dir_raw/${raw_file_name}"
|
|
175
|
+
if [[ $exit_status -eq 0 ]]; then
|
|
176
|
+
mv "$dir_raw/${raw_file_name}.new" "$dir_raw/${raw_file_name}" || return $?
|
|
172
177
|
t '下载 %s 成功...\n' "${raw_file_name}"
|
|
173
|
-
cd $dir_raw
|
|
178
|
+
cd "$dir_raw" || return $?
|
|
174
179
|
local filename="raw_${raw_file_name}"
|
|
175
|
-
local cron_id=$(cat $list_crontab_user | grep -E "$cmd_task.* $filename" | perl -pe "s|.*ID=(.*) $cmd_task.* $filename\.*|\1|" | head -1 | awk -F " " '{print $1}')
|
|
176
|
-
cp -f $raw_file_name $dir_scripts/${filename}
|
|
180
|
+
local cron_id=$(cat "$list_crontab_user" | grep -E "$cmd_task.* $filename" | perl -pe "s|.*ID=(.*) $cmd_task.* $filename\.*|\1|" | head -1 | awk -F " " '{print $1}')
|
|
181
|
+
cp -f "$raw_file_name" "$dir_scripts/${filename}" || return $?
|
|
177
182
|
if [[ -z $cron_id ]] && [[ ${autoAddCron} == true ]]; then
|
|
178
183
|
cron_line=$(
|
|
179
184
|
perl -ne "{
|
|
@@ -190,14 +195,17 @@ update_raw() {
|
|
|
190
195
|
[[ -z $cron_line ]] && cron_line=$(grep "cron:" $raw_file_name | awk -F ":" '{print $2}' | head -1 | xargs)
|
|
191
196
|
[[ -z $cron_line ]] && cron_line=$(grep "cron " $raw_file_name | awk -F "cron \"" '{print $2}' | awk -F "\" " '{print $1}' | head -1 | xargs)
|
|
192
197
|
[[ -z $cron_line ]] && cron_line="$default_cron"
|
|
193
|
-
|
|
198
|
+
cron_name=${cron_name//$'\r'/}
|
|
199
|
+
cron_line=${cron_line//$'\r'/}
|
|
200
|
+
result=$(add_cron_api "$cron_line" "${cmd_task} ${filename}" "$cron_name" "$SUB_ID")
|
|
194
201
|
echo -e "$result\n"
|
|
195
|
-
notify_api "新增任务通知" "\n$result"
|
|
202
|
+
notify_api "$(t '新增任务通知')" "\n$result"
|
|
196
203
|
# update_cron_api "$cron_line:$cmd_task $filename:$cron_name:$cron_id"
|
|
197
204
|
fi
|
|
198
205
|
else
|
|
199
206
|
t '下载 %s 失败,保留之前正常下载的版本...\n' "${raw_file_name}"
|
|
200
207
|
[[ -f "$dir_raw/${raw_file_name}.new" ]] && rm -f "$dir_raw/${raw_file_name}.new"
|
|
208
|
+
return "$exit_status"
|
|
201
209
|
fi
|
|
202
210
|
|
|
203
211
|
}
|
|
@@ -205,7 +213,7 @@ update_raw() {
|
|
|
205
213
|
## 调用用户自定义的extra.sh
|
|
206
214
|
run_extra_shell() {
|
|
207
215
|
if [[ -f $file_extra_shell ]]; then
|
|
208
|
-
. $file_extra_shell
|
|
216
|
+
. "$file_extra_shell"
|
|
209
217
|
else
|
|
210
218
|
t '%s文件不存在,跳过执行...\n' "$file_extra_shell"
|
|
211
219
|
fi
|
|
@@ -262,119 +270,66 @@ show_service_logs() {
|
|
|
262
270
|
# Winston writes the active runtime log by date. Follow the filename so
|
|
263
271
|
# size-based rotations are handled without involving the PM2 log files.
|
|
264
272
|
local current_system_log="$system_log_dir/$(date +%F).log"
|
|
265
|
-
tail -
|
|
273
|
+
# GNU and BSD tail both support -F; --retry is GNU-only and implied by -F.
|
|
274
|
+
tail -n 0 -F "$current_system_log"
|
|
266
275
|
}
|
|
267
276
|
|
|
268
277
|
## 脚本用法
|
|
269
278
|
usage() {
|
|
270
|
-
t "$cmd_update
|
|
271
|
-
echo -e "1. $cmd_update update # 更新并重启青龙"
|
|
272
|
-
echo -e "2. $cmd_update extra # 运行自定义脚本"
|
|
273
|
-
echo -e "3. $cmd_update raw <fileurl> # 更新单个脚本文件"
|
|
274
|
-
echo -e "4. $cmd_update repo <repourl> <path> <blacklist> <dependence> <branch> <extensions> # 更新单个仓库的脚本"
|
|
275
|
-
echo -e "5. $cmd_update rmlog <days> # 删除旧日志"
|
|
276
|
-
echo -e "6. $cmd_update bot # 启动tg-bot"
|
|
277
|
-
echo -e "7. $cmd_update check # 检测青龙环境并修复"
|
|
278
|
-
echo -e "8. $cmd_update log [--lines <n>] [--nostream] # 查看青龙运行日志"
|
|
279
|
-
echo -e "9. $cmd_update resetlet # 重置登录错误次数"
|
|
280
|
-
echo -e "10. $cmd_update resettfa # 禁用两步登录"
|
|
281
|
-
echo -e "11. $cmd_update resetpwd # 修改登录密码"
|
|
282
|
-
echo -e "12. $cmd_update resetname # 修改登录用户名"
|
|
279
|
+
t '%s 命令使用方法:' "$cmd_update"
|
|
280
|
+
echo -e "1. $cmd_update update # $(t '更新并重启青龙')"
|
|
281
|
+
echo -e "2. $cmd_update extra # $(t '运行自定义脚本')"
|
|
282
|
+
echo -e "3. $cmd_update raw <fileurl> # $(t '更新单个脚本文件')"
|
|
283
|
+
echo -e "4. $cmd_update repo <repourl> <path> <blacklist> <dependence> <branch> <extensions> # $(t '更新单个仓库的脚本')"
|
|
284
|
+
echo -e "5. $cmd_update rmlog <days> # $(t '删除旧日志')"
|
|
285
|
+
echo -e "6. $cmd_update bot # $(t '启动tg-bot')"
|
|
286
|
+
echo -e "7. $cmd_update check # $(t '检测青龙环境并修复')"
|
|
287
|
+
echo -e "8. $cmd_update log [--lines <n>] [--nostream] # $(t '查看青龙运行日志')"
|
|
288
|
+
echo -e "9. $cmd_update resetlet # $(t '重置登录错误次数')"
|
|
289
|
+
echo -e "10. $cmd_update resettfa # $(t '禁用两步登录')"
|
|
290
|
+
echo -e "11. $cmd_update resetpwd # $(t '修改登录密码')"
|
|
291
|
+
echo -e "12. $cmd_update resetname # $(t '修改登录用户名')"
|
|
283
292
|
}
|
|
284
293
|
|
|
285
294
|
reload_qinglong() {
|
|
286
|
-
echo -e "[reload_qinglong] deleting Triggered at $(date)" >>${dir_log}/reload.log
|
|
287
|
-
sleep 3
|
|
288
|
-
delete_pm2
|
|
289
|
-
echo -e "[reload_qinglong] deleted Triggered at $(date)" >>${dir_log}/reload.log
|
|
290
|
-
|
|
291
295
|
local reload_target="${1}"
|
|
292
|
-
local primary_branch="master"
|
|
293
|
-
if [[ "${QL_BRANCH}" == "develop" ]] || [[ "${QL_BRANCH}" == "debian" ]] || [[ "${QL_BRANCH}" == "debian-dev" ]]; then
|
|
294
|
-
primary_branch="${QL_BRANCH}"
|
|
295
|
-
fi
|
|
296
|
-
|
|
297
296
|
if [[ "$reload_target" == 'system' ]]; then
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
rm -rf $dir_static/*
|
|
301
|
-
mv -f ${dir_tmp}/qinglong-static-${primary_branch}/* ${dir_static}/
|
|
302
|
-
cp -f $file_config_sample $dir_config/config.sample.sh
|
|
297
|
+
QlPort="${ql_port:-${QlPort:-5700}}" QlBaseUrl="${ql_base_url:-${QlBaseUrl:-/}}" node "$dir_shell/upgrade.cjs" reload
|
|
298
|
+
return $?
|
|
303
299
|
fi
|
|
304
300
|
|
|
301
|
+
# Data import and a plain service restart retain their existing behavior.
|
|
302
|
+
echo -e "[reload_qinglong] deleting Triggered at $(date)" >>"${dir_log}/reload.log"
|
|
303
|
+
sleep 3
|
|
304
|
+
delete_pm2
|
|
305
305
|
if [[ "$reload_target" == 'data' ]]; then
|
|
306
|
-
rm -rf ${dir_data}/*
|
|
307
|
-
mv -f $
|
|
306
|
+
rm -rf "${dir_data:?}"/*
|
|
307
|
+
mv -f "$dir_tmp"/data/* "$dir_data"/ || return $?
|
|
308
308
|
fi
|
|
309
|
-
echo -e "[reload_qinglong] starting Triggered at $(date)" >>${dir_log}/reload.log
|
|
310
309
|
reload_pm2
|
|
311
|
-
echo -e "[reload_qinglong] started Triggered at $(date)\n" >>${dir_log}/reload.log
|
|
312
310
|
}
|
|
313
311
|
|
|
314
312
|
## 更新 qinglong
|
|
315
313
|
update_qinglong() {
|
|
316
|
-
rm -rf ${dir_tmp}/*
|
|
317
314
|
local mirror="gitee"
|
|
318
|
-
|
|
319
|
-
local downloadStaticUrl="https://gitee.com/whyour/qinglong-static/repository/archive"
|
|
320
|
-
local githubStatus=$(curl -s --noproxy "*" -m 2 -IL "https://google.com" | grep 200)
|
|
321
|
-
if [[ ! -z $githubStatus ]]; then
|
|
315
|
+
if curl --fail --silent --noproxy "*" --max-time 2 --head "https://github.com" >/dev/null; then
|
|
322
316
|
mirror="github"
|
|
323
|
-
downloadQLUrl="https://github.com/whyour/qinglong/archive/refs/heads"
|
|
324
|
-
downloadStaticUrl="https://github.com/whyour/qinglong-static/archive/refs/heads"
|
|
325
|
-
fi
|
|
326
|
-
t '使用 %s 源更新...\n' "${mirror}"
|
|
327
|
-
|
|
328
|
-
local primary_branch="master"
|
|
329
|
-
if [[ "${QL_BRANCH}" == "develop" ]] || [[ "${QL_BRANCH}" == "debian" ]] || [[ "${QL_BRANCH}" == "debian-dev" ]]; then
|
|
330
|
-
primary_branch="${QL_BRANCH}"
|
|
331
|
-
fi
|
|
332
|
-
|
|
333
|
-
wget -cqO "${dir_tmp}/ql.zip" "${downloadQLUrl}/${primary_branch}.zip"
|
|
334
|
-
exit_status=$?
|
|
335
|
-
|
|
336
|
-
if [[ $exit_status -eq 0 ]]; then
|
|
337
|
-
t '更新青龙源文件成功...\n'
|
|
338
|
-
|
|
339
|
-
unzip -oq ${dir_tmp}/ql.zip -d ${dir_tmp}
|
|
340
|
-
|
|
341
|
-
update_qinglong_static
|
|
342
|
-
else
|
|
343
|
-
t '更新青龙源文件失败,请检查网络...\n'
|
|
344
317
|
fi
|
|
318
|
+
t '使用 %s 源更新...\n' "$mirror"
|
|
319
|
+
QlPort="${ql_port:-${QlPort:-5700}}" QlBaseUrl="${ql_base_url:-${QlBaseUrl:-/}}" node "$dir_shell/upgrade.cjs" update "$mirror" "$needRestart"
|
|
345
320
|
}
|
|
346
321
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
check_update_dep
|
|
322
|
+
# Preserve the updater's status through both tee and the final timing output.
|
|
323
|
+
run_update_logged() (
|
|
324
|
+
set -o pipefail
|
|
325
|
+
if [[ "$real_time" == 'true' ]]; then
|
|
326
|
+
"$@"
|
|
327
|
+
elif [[ "$no_tee" == 'true' ]]; then
|
|
328
|
+
"$@" >>"$file_path" 2>&1
|
|
356
329
|
else
|
|
357
|
-
|
|
358
|
-
fi
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
check_update_dep() {
|
|
362
|
-
t '\n开始检测依赖...\n'
|
|
363
|
-
if [[ $(diff $dir_root/package.json ${dir_tmp}/qinglong-${primary_branch}/package.json) ]]; then
|
|
364
|
-
npm_install_2 "${dir_tmp}/qinglong-${primary_branch}"
|
|
330
|
+
"$@" 2>&1 | tee -a "$file_path"
|
|
365
331
|
fi
|
|
366
|
-
|
|
367
|
-
if [[ $exit_status -eq 0 ]]; then
|
|
368
|
-
t '\n依赖检测安装成功...\n'
|
|
369
|
-
t '更新包下载成功...\n'
|
|
370
|
-
|
|
371
|
-
if [[ "$needRestart" == 'true' ]]; then
|
|
372
|
-
reload_qinglong "system"
|
|
373
|
-
fi
|
|
374
|
-
else
|
|
375
|
-
t '\n依赖检测安装失败,请检查网络...\n'
|
|
376
|
-
fi
|
|
377
|
-
}
|
|
332
|
+
)
|
|
378
333
|
|
|
379
334
|
## 对比脚本
|
|
380
335
|
diff_scripts() {
|
|
@@ -429,23 +384,19 @@ gen_list_repo() {
|
|
|
429
384
|
|
|
430
385
|
cd ${repo_path}
|
|
431
386
|
|
|
432
|
-
local
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
387
|
+
local extension_string="${6:-$file_extensions}"
|
|
388
|
+
extension_string="${extension_string//|/ }"
|
|
389
|
+
extension_string="${extension_string//$'\n'/ }"
|
|
390
|
+
local -a extensions=() find_args=()
|
|
391
|
+
IFS=$' \t\n' read -r -a extensions <<< "$extension_string"
|
|
392
|
+
local extension
|
|
393
|
+
for extension in "${extensions[@]}"; do
|
|
394
|
+
if [[ ${#find_args[@]} -gt 0 ]]; then
|
|
395
|
+
find_args+=(-o)
|
|
438
396
|
fi
|
|
439
|
-
|
|
440
|
-
for extension in $file_extensions; do
|
|
441
|
-
if [[ $index -eq 0 ]]; then
|
|
442
|
-
cmd="${cmd} -name \"*.${extension}\""
|
|
443
|
-
else
|
|
444
|
-
cmd="${cmd} -o -name \"*.${extension}\""
|
|
445
|
-
fi
|
|
446
|
-
let index+=1
|
|
397
|
+
find_args+=(-name "*.${extension}")
|
|
447
398
|
done
|
|
448
|
-
files=$(
|
|
399
|
+
files=$(find . "${find_args[@]}" | sed 's/^..//')
|
|
449
400
|
if [[ $path ]]; then
|
|
450
401
|
files=$(echo "$files" | egrep "$path")
|
|
451
402
|
fi
|
|
@@ -458,7 +409,7 @@ gen_list_repo() {
|
|
|
458
409
|
|
|
459
410
|
if [[ $dependence ]]; then
|
|
460
411
|
cd ${repo_path}
|
|
461
|
-
results=$(
|
|
412
|
+
results=$(find . "${find_args[@]}" | sed 's/^..//' | egrep "$dependence")
|
|
462
413
|
for _file in ${results}; do
|
|
463
414
|
file_path=$(dirname $_file)
|
|
464
415
|
make_dir "${dir_scripts}/${uniq_path}/${file_path}"
|
|
@@ -529,7 +480,7 @@ main() {
|
|
|
529
480
|
|
|
530
481
|
if [[ "$p1" == "log" ]]; then
|
|
531
482
|
show_service_logs "${@:2}"
|
|
532
|
-
return
|
|
483
|
+
return 0
|
|
533
484
|
fi
|
|
534
485
|
|
|
535
486
|
local log_dir="${p1}"
|
|
@@ -538,9 +489,9 @@ main() {
|
|
|
538
489
|
local log_path="${log_dir}/${log_time}.log"
|
|
539
490
|
local file_path="$dir_log/$log_path"
|
|
540
491
|
|
|
541
|
-
cmd
|
|
492
|
+
printf -v cmd '2>&1 | tee -a %q' "$file_path"
|
|
542
493
|
if [[ "$no_tee" == "true" ]]; then
|
|
543
|
-
cmd
|
|
494
|
+
printf -v cmd '>> %q 2>&1' "$file_path"
|
|
544
495
|
fi
|
|
545
496
|
if [[ "$real_time" == "true" ]]; then
|
|
546
497
|
cmd=""
|
|
@@ -553,19 +504,24 @@ main() {
|
|
|
553
504
|
local begin_time=$(format_time "$time_format" "$time")
|
|
554
505
|
|
|
555
506
|
if [[ "$p1" != "repo" ]] && [[ "$p1" != "raw" ]]; then
|
|
556
|
-
|
|
507
|
+
local start_message
|
|
508
|
+
printf -v start_message '%q' "$(t '## 开始执行... %s\n' "$begin_time")"
|
|
509
|
+
eval "printf '%s\n' $start_message $cmd"
|
|
557
510
|
fi
|
|
558
511
|
|
|
559
512
|
[[ $ID ]] && update_cron "\"$ID\"" "0" "$$" "$log_path" "$begin_timestamp"
|
|
560
513
|
|
|
514
|
+
local command_status=0
|
|
561
515
|
case $p1 in
|
|
562
516
|
update)
|
|
563
517
|
fix_config
|
|
564
518
|
local needRestart=${p2:-"true"}
|
|
565
|
-
|
|
519
|
+
run_update_logged update_qinglong
|
|
520
|
+
command_status=$?
|
|
566
521
|
;;
|
|
567
522
|
reload)
|
|
568
|
-
|
|
523
|
+
run_update_logged reload_qinglong "$p2"
|
|
524
|
+
command_status=$?
|
|
569
525
|
;;
|
|
570
526
|
extra)
|
|
571
527
|
eval run_extra_shell $cmd
|
|
@@ -583,19 +539,20 @@ main() {
|
|
|
583
539
|
get_uniq_path "$p2"
|
|
584
540
|
if [[ -n $p2 ]]; then
|
|
585
541
|
update_raw "$p2" "$p3" "$p4" "$p5"
|
|
542
|
+
command_status=$?
|
|
586
543
|
else
|
|
587
544
|
t '命令输入错误...\n'
|
|
588
545
|
eval usage $cmd
|
|
589
546
|
fi
|
|
590
547
|
;;
|
|
591
548
|
rmlog)
|
|
592
|
-
eval . $dir_shell/rmlog.sh "$p2" $cmd
|
|
549
|
+
eval '. "$dir_shell/rmlog.sh" "$p2"' "$cmd"
|
|
593
550
|
;;
|
|
594
551
|
bot)
|
|
595
|
-
eval . $dir_shell/bot.sh $cmd
|
|
552
|
+
eval '. "$dir_shell/bot.sh"' "$cmd"
|
|
596
553
|
;;
|
|
597
554
|
check)
|
|
598
|
-
eval . $dir_shell/check.sh $cmd
|
|
555
|
+
eval '. "$dir_shell/check.sh"' "$cmd"
|
|
599
556
|
;;
|
|
600
557
|
resetlet)
|
|
601
558
|
eval update_auth_config "\\\"retries\\\":0" "重置登录错误次数" $cmd
|
|
@@ -622,11 +579,13 @@ main() {
|
|
|
622
579
|
[[ $ID ]] && update_cron "\"$ID\"" "1" "$$" "$log_path" "$begin_timestamp" "$diff_time"
|
|
623
580
|
|
|
624
581
|
if [[ "$p1" != "repo" ]] && [[ "$p1" != "raw" ]]; then
|
|
625
|
-
|
|
582
|
+
local end_message
|
|
583
|
+
printf -v end_message '%q' "$(t '\n## 执行结束... %s 耗时 %s 秒' "$end_time" "$diff_time") "
|
|
584
|
+
eval "printf '%s\n' $end_message $cmd"
|
|
626
585
|
fi
|
|
586
|
+
return "$command_status"
|
|
627
587
|
}
|
|
628
588
|
|
|
629
589
|
import_config "$@"
|
|
630
590
|
main "$@"
|
|
631
|
-
|
|
632
|
-
exit 0
|
|
591
|
+
exit $?
|