@whyour/qinglong 2.23.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 +53 -10
- package/sample/notify.js +308 -135
- package/sample/notify.py +174 -27
- package/shell/api.sh +18 -7
- 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/otask.sh +38 -36
- package/shell/preload/client.js +1 -0
- package/shell/preload/notificationAudit.js +51 -0
- package/shell/preload/sitecustomize.js +3 -3
- package/shell/preload/sitecustomize.py +5 -5
- package/shell/rmlog.sh +21 -16
- package/shell/share.sh +61 -44
- package/shell/start-simplify.sh +90 -0
- package/shell/start.sh +48 -71
- package/shell/task-timeout.sh +22 -10
- package/shell/task.sh +7 -7
- package/shell/update.sh +52 -38
- package/shell/upgrade-lock.yaml +16122 -0
- package/shell/upgrade.cjs +1 -1
- package/static/build/api/clientIp.js +2 -1
- package/static/build/api/clientIp.js.map +1 -0
- 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.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.map +1 -0
- package/static/build/api/retention.js.map +1 -0
- package/static/build/api/script.js.map +1 -0
- package/static/build/api/subscription.js.map +1 -0
- package/static/build/api/system.js +18 -0
- 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.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.map +1 -0
- package/static/build/config/util.js +178 -79
- 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 +8 -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.map +1 -0
- package/static/build/loaders/initFile.js.map +1 -0
- package/static/build/loaders/initTask.js +1 -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.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.map +1 -0
- package/static/build/protos/health.js.map +1 -0
- package/static/build/schedule/addCron.js +2 -2
- 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.map +1 -0
- package/static/build/schedule/data.js.map +1 -0
- package/static/build/schedule/delCron.js +5 -3
- package/static/build/schedule/delCron.js.map +1 -0
- package/static/build/schedule/health.js.map +1 -0
- package/static/build/schedule/setConcurrency.js.map +1 -0
- package/static/build/services/config.js.map +1 -0
- package/static/build/services/cron.js +7 -7
- 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.map +1 -0
- package/static/build/services/grpc.js +2 -2
- 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.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.map +1 -0
- package/static/build/services/retention.js.map +1 -0
- package/static/build/services/schedule.js +13 -12
- package/static/build/services/schedule.js.map +1 -0
- package/static/build/services/script.js.map +1 -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 +8 -5
- package/static/build/services/sshKey.js.map +1 -0
- package/static/build/services/subscription.js.map +1 -0
- package/static/build/services/system.js +76 -46
- package/static/build/services/system.js.map +1 -0
- package/static/build/services/user.js +2 -2
- 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.map +1 -0
- package/static/build/shared/cronSchedule.js +65 -9
- package/static/build/shared/cronSchedule.js.map +1 -0
- package/static/build/shared/cronScheduler.js +3 -2
- 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 +164 -85
- 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.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.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 +8 -8
- 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 +69 -26
- 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.map +1 -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.map +1 -0
- package/static/build/shared/subscriptionPath.js.map +1 -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.map +1 -0
- package/static/build/token.js.map +1 -0
- package/static/build/validation/schedule.js +19 -1
- 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.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.gz +0 -0
- package/static/dist/src__pages__script__historyDrawer.8c58d958.async.js.gz +0 -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__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 -14
- package/.dockerignore +0 -13
- package/AGENTS.md +0 -43
- package/SECURITY.md +0 -5
- package/back/protos/cron.proto +0 -33
- 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/development/node-cron-migration.md +0 -49
- package/docs/development/task-startup.md +0 -78
- package/docs/releases/2.22.0-validation.md +0 -49
- package/docs/releases/2.22.0.md +0 -62
- package/docs/releases/2.23.0.md +0 -33
- package/docs/script-history.md +0 -53
- package/sample/tool.ts +0 -40
- package/scripts/benchmark-execution.cjs +0 -96
- package/scripts/benchmark-script-history.cjs +0 -39
- package/scripts/publish-static.sh +0 -34
- package/scripts/sync-static.sh +0 -20
- package/scripts/wait-for-mirror.sh +0 -214
- package/scripts/write-build-info.cjs +0 -27
- package/shell/pub.sh +0 -28
- package/static/dist/255.8a80b983.async.js +0 -1
- package/static/dist/2901.2ca95295.async.js +0 -1
- package/static/dist/292.264757f0.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/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/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.01fcd534.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.0fa8b421.async.js +0 -1
- package/static/dist/src__pages__diff__index.b94e5dc5.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.afabf073.async.js +0 -1
- package/static/dist/src__pages__script__index.fc575945.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.30868ba8.async.js +0 -1
- package/static/dist/umi.3a24a9fa.js +0 -1
- package/test/back/advisory-input-security.test.cjs +0 -416
- package/test/back/auth-security.test.cjs +0 -74
- package/test/back/build-provenance.test.cjs +0 -150
- package/test/back/code-scanning-security.test.cjs +0 -189
- package/test/back/cron-log-name.test.cjs +0 -110
- package/test/back/cron-macros.test.cjs +0 -51
- package/test/back/cron-schedule-compatibility.test.cjs +0 -69
- package/test/back/cron-scheduler-routing.test.cjs +0 -59
- 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/draft-path-security.test.cjs +0 -235
- package/test/back/ecosystem.test.cjs +0 -28
- package/test/back/env-import-security.test.cjs +0 -91
- package/test/back/env-name-parsing.test.cjs +0 -96
- package/test/back/execution-lifecycle.test.cjs +0 -236
- package/test/back/file-access-scope.test.cjs +0 -180
- 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/grpc-mtls-security.test.cjs +0 -136
- package/test/back/http-exclusive-listen.test.cjs +0 -31
- package/test/back/http-security.test.cjs +0 -313
- package/test/back/legacy-cron-recovery.test.cjs +0 -76
- package/test/back/linux-mirror-result.test.cjs +0 -176
- package/test/back/listen-security.test.cjs +0 -68
- 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/mirror-status.test.cjs +0 -257
- package/test/back/monitoring.test.cjs +0 -73
- package/test/back/node-cron-migration.test.cjs +0 -65
- package/test/back/node-path-cache.test.cjs +0 -202
- package/test/back/node-path-lock.test.cjs +0 -182
- package/test/back/npm-publication.test.cjs +0 -70
- package/test/back/preload-lazy-notify.test.cjs +0 -168
- 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/queued-cron-invalidation.test.cjs +0 -98
- package/test/back/restart-instance-recovery.test.cjs +0 -116
- 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-bulk-recovery.test.cjs +0 -40
- package/test/back/scheduler-concurrency.test.cjs +0 -411
- 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 -206
- package/test/back/scheduler-rpc-timeout.test.cjs +0 -49
- package/test/back/schema-migrations.test.cjs +0 -127
- package/test/back/script-file-access.test.cjs +0 -210
- package/test/back/script-history-api.test.cjs +0 -551
- package/test/back/script-history.test.cjs +0 -383
- package/test/back/shell-api-parsing.test.cjs +0 -184
- package/test/back/shell-translation-output.test.cjs +0 -16
- package/test/back/shell-upgrade.test.cjs +0 -312
- package/test/back/shellApiToken.test.cjs +0 -151
- package/test/back/sock-polling.test.cjs +0 -297
- package/test/back/sock-security.test.cjs +0 -72
- package/test/back/ssh-config-home.test.cjs +0 -113
- package/test/back/start-env-preservation.test.cjs +0 -53
- package/test/back/static-mirror-trigger.test.cjs +0 -441
- package/test/back/static-mirror.test.cjs +0 -179
- package/test/back/stop-failure-feedback.test.cjs +0 -158
- package/test/back/stop-race.test.cjs +0 -171
- package/test/back/subscription-cleanup.test.cjs +0 -53
- package/test/back/subscription-mutation-lock.test.cjs +0 -83
- package/test/back/subscription-review-regression.test.cjs +0 -607
- package/test/back/subscription-stop-state.test.cjs +0 -66
- package/test/back/subscription-storage-regression.test.cjs +0 -553
- package/test/back/system-dependence-cache.test.cjs +0 -127
- package/test/back/system-export-history.test.cjs +0 -119
- package/test/back/systemTokenRenewal.test.cjs +0 -497
- package/test/back/task-shell-lifecycle.test.cjs +0 -194
- package/test/back/task-time.test.cjs +0 -116
- package/test/back/unique-constraint-error.test.cjs +0 -72
- package/test/back/upgrade-guards.test.cjs +0 -285
- package/test/back/upgrade-lifecycle.test.cjs +0 -288
- package/test/back/upgrade-transaction.test.cjs +0 -133
- package/test/back/user-api.test.cjs +0 -99
- package/test/back/user-security.test.cjs +0 -349
- package/test/back/worker-apm.test.cjs +0 -84
- package/test/back/wpush-grpc.test.cjs +0 -116
- package/test/fixtures/legacy-cron.json +0 -1371
- package/test/front/cron-log-pagination.test.cjs +0 -214
- package/test/front/diff-file-routing.test.cjs +0 -126
- package/test/front/http-auth.test.cjs +0 -152
- package/test/front/http-error.test.cjs +0 -29
- package/test/front/script-history-save.test.cjs +0 -121
- package/test/helpers/load-security-module.cjs +0 -42
- package/test/helpers/upgrade-fixture.cjs +0 -30
|
@@ -1,550 +0,0 @@
|
|
|
1
|
-
# Project Architecture Guide
|
|
2
|
-
|
|
3
|
-
This document is written for AI coding agents and maintainers who need to understand and modify this project safely. It focuses on where behavior lives, how the application starts, and which files are usually involved for common changes.
|
|
4
|
-
|
|
5
|
-
## Project Summary
|
|
6
|
-
|
|
7
|
-
Qinglong is a timed task management platform. It provides a web admin panel for managing cron jobs, scripts, environment variables, subscriptions, dependencies, logs, configuration files, and system settings.
|
|
8
|
-
|
|
9
|
-
The repository is organized as a full-stack TypeScript application:
|
|
10
|
-
|
|
11
|
-
- `src/`: frontend admin panel, built with Umi Max, React, Ant Design, and Ant Design Pro Layout.
|
|
12
|
-
- `back/`: backend application, built with Express, TypeScript, typedi, Sequelize, SQLite, gRPC, and worker processes.
|
|
13
|
-
- `shell/`: runtime shell scripts used to execute tasks and preload task environments.
|
|
14
|
-
- `data/`: local runtime data, including scripts, logs, configs, SQLite database, uploaded files, and cloned repositories.
|
|
15
|
-
- `static/`: built frontend and backend artifacts.
|
|
16
|
-
- `docker/`: Docker images, compose file, and entrypoint.
|
|
17
|
-
- `sample/`: sample scripts and default config templates.
|
|
18
|
-
|
|
19
|
-
## High-Level Runtime Flow
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
Browser
|
|
23
|
-
-> src/pages/*
|
|
24
|
-
-> src/utils/http.tsx
|
|
25
|
-
-> /api/*
|
|
26
|
-
-> back/api/*
|
|
27
|
-
-> back/services/*
|
|
28
|
-
-> back/data/* Sequelize models
|
|
29
|
-
-> data/db/database.sqlite
|
|
30
|
-
|
|
31
|
-
Cron/task execution
|
|
32
|
-
-> back/services/cron.ts
|
|
33
|
-
-> shell/task.sh or shell/otask.sh
|
|
34
|
-
-> data/scripts/*
|
|
35
|
-
-> data/log/*
|
|
36
|
-
|
|
37
|
-
Frontend assets in production
|
|
38
|
-
-> static/dist/*
|
|
39
|
-
-> served by back/loaders/express.ts
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Main Startup Path
|
|
43
|
-
|
|
44
|
-
Development starts from `package.json`:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
pnpm start
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
This runs:
|
|
51
|
-
|
|
52
|
-
- `start:back`: `nodemon ./back/app.ts`
|
|
53
|
-
- `start:front`: `max dev`
|
|
54
|
-
|
|
55
|
-
Backend startup begins in `back/app.ts`.
|
|
56
|
-
|
|
57
|
-
Important details:
|
|
58
|
-
|
|
59
|
-
- The backend uses Node `cluster`.
|
|
60
|
-
- The primary process initializes the database first.
|
|
61
|
-
- A gRPC worker starts before the HTTP worker.
|
|
62
|
-
- The HTTP worker starts Express and serves API routes plus frontend static files.
|
|
63
|
-
- If the gRPC worker restarts, the HTTP worker is asked to re-register cron jobs.
|
|
64
|
-
|
|
65
|
-
Production-style backend output is generated by:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
pnpm run build:back
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
The compiled backend is placed under `static/build`.
|
|
72
|
-
|
|
73
|
-
Frontend output is generated by:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
pnpm run build:front
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The compiled frontend is placed under `static/dist`.
|
|
80
|
-
|
|
81
|
-
## Backend Architecture
|
|
82
|
-
|
|
83
|
-
### Entry Point
|
|
84
|
-
|
|
85
|
-
- `back/app.ts`
|
|
86
|
-
|
|
87
|
-
Responsibilities:
|
|
88
|
-
|
|
89
|
-
- Creates the Express application.
|
|
90
|
-
- Starts primary/worker process logic.
|
|
91
|
-
- Initializes database in the primary process.
|
|
92
|
-
- Starts gRPC and HTTP workers.
|
|
93
|
-
- Handles graceful shutdown.
|
|
94
|
-
- Re-registers cron jobs after gRPC worker recovery.
|
|
95
|
-
|
|
96
|
-
### Loaders
|
|
97
|
-
|
|
98
|
-
- `back/loaders/app.ts`
|
|
99
|
-
- `back/loaders/express.ts`
|
|
100
|
-
- `back/loaders/db.ts`
|
|
101
|
-
- `back/loaders/depInjector.ts`
|
|
102
|
-
- `back/loaders/initData.ts`
|
|
103
|
-
- `back/loaders/initFile.ts`
|
|
104
|
-
- `back/loaders/initTask.ts`
|
|
105
|
-
- `back/loaders/server.ts`
|
|
106
|
-
- `back/loaders/sock.ts`
|
|
107
|
-
|
|
108
|
-
Loader responsibilities:
|
|
109
|
-
|
|
110
|
-
- Register dependency injection bindings.
|
|
111
|
-
- Sync Sequelize models.
|
|
112
|
-
- Initialize files and default data.
|
|
113
|
-
- Initialize scheduled tasks.
|
|
114
|
-
- Configure Express middleware.
|
|
115
|
-
- Register routes.
|
|
116
|
-
- Attach socket/server behavior.
|
|
117
|
-
|
|
118
|
-
`back/loaders/express.ts` is the main HTTP middleware and routing setup. It handles:
|
|
119
|
-
|
|
120
|
-
- CORS.
|
|
121
|
-
- Helmet.
|
|
122
|
-
- body parser.
|
|
123
|
-
- static frontend serving.
|
|
124
|
-
- JWT validation.
|
|
125
|
-
- token validation against shared auth state.
|
|
126
|
-
- `/open/*` rewrite to `/api/*`.
|
|
127
|
-
- route mounting through `back/api/index.ts`.
|
|
128
|
-
- frontend fallback to `static/dist/index.html`.
|
|
129
|
-
- API error handling.
|
|
130
|
-
|
|
131
|
-
### API Routes
|
|
132
|
-
|
|
133
|
-
- `back/api/index.ts`
|
|
134
|
-
|
|
135
|
-
This file registers all API modules:
|
|
136
|
-
|
|
137
|
-
- `user.ts`: login, initialization, authentication-related user endpoints.
|
|
138
|
-
- `env.ts`: environment variable endpoints.
|
|
139
|
-
- `config.ts`: config file endpoints.
|
|
140
|
-
- `log.ts`: log endpoints.
|
|
141
|
-
- `cron.ts`: cron/task endpoints.
|
|
142
|
-
- `script.ts`: script file endpoints.
|
|
143
|
-
- `open.ts`: open API/app token endpoints.
|
|
144
|
-
- `dependence.ts`: dependency management endpoints.
|
|
145
|
-
- `system.ts`: system information/settings endpoints.
|
|
146
|
-
- `subscription.ts`: subscription endpoints.
|
|
147
|
-
- `update.ts`: update/check endpoints.
|
|
148
|
-
- `health.ts`: health check endpoints.
|
|
149
|
-
|
|
150
|
-
Route files should stay thin. They should validate input, get a service from `typedi`'s `Container`, call the service, and return `{ code, data, message }` style responses.
|
|
151
|
-
|
|
152
|
-
### Services
|
|
153
|
-
|
|
154
|
-
- `back/services/*`
|
|
155
|
-
|
|
156
|
-
Services contain most business logic. Common examples:
|
|
157
|
-
|
|
158
|
-
- `cron.ts`: create/update/delete/run cron jobs, generate crontab data, manage logs, call scheduler client.
|
|
159
|
-
- `env.ts`: manage environment variables.
|
|
160
|
-
- `config.ts`: read/write config files.
|
|
161
|
-
- `script.ts`: manage script files.
|
|
162
|
-
- `subscription.ts`: manage script subscriptions and repository pulls.
|
|
163
|
-
- `dependence.ts`: install/manage runtime dependencies.
|
|
164
|
-
- `system.ts`: system info and settings.
|
|
165
|
-
- `notify.ts`: notification behavior.
|
|
166
|
-
- `sock.ts`: socket/log stream behavior.
|
|
167
|
-
- `grpc.ts`: gRPC server lifecycle.
|
|
168
|
-
- `http.ts`: HTTP server lifecycle.
|
|
169
|
-
|
|
170
|
-
When changing backend behavior, first find the API route, then follow it into the matching service. In most cases, the service is the right place for behavioral changes.
|
|
171
|
-
|
|
172
|
-
### Data Models
|
|
173
|
-
|
|
174
|
-
- `back/data/index.ts`
|
|
175
|
-
- `back/data/*.ts`
|
|
176
|
-
|
|
177
|
-
The backend uses Sequelize with SQLite. Database storage is configured in `back/data/index.ts`:
|
|
178
|
-
|
|
179
|
-
```text
|
|
180
|
-
data/db/database.sqlite
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Common model files:
|
|
184
|
-
|
|
185
|
-
- `cron.ts`: cron job model.
|
|
186
|
-
- `cronView.ts`: saved cron table views.
|
|
187
|
-
- `env.ts`: environment variable model.
|
|
188
|
-
- `dependence.ts`: dependency model.
|
|
189
|
-
- `open.ts`: open API app/token model.
|
|
190
|
-
- `subscription.ts`: subscription model.
|
|
191
|
-
- `system.ts`: system settings model.
|
|
192
|
-
- `notify.ts`: notification-related data.
|
|
193
|
-
|
|
194
|
-
Model sync and simple column migrations are currently handled in `back/loaders/db.ts`.
|
|
195
|
-
|
|
196
|
-
### Configuration
|
|
197
|
-
|
|
198
|
-
- `back/config/index.ts`
|
|
199
|
-
|
|
200
|
-
This is the central runtime config file. It reads `.env`, establishes `QL_DIR`, and defines important paths:
|
|
201
|
-
|
|
202
|
-
- `dataPath`: runtime data root.
|
|
203
|
-
- `configPath`: config files.
|
|
204
|
-
- `scriptPath`: user scripts.
|
|
205
|
-
- `repoPath`: subscription repositories.
|
|
206
|
-
- `logPath`: task logs.
|
|
207
|
-
- `dbPath`: SQLite database location.
|
|
208
|
-
- `uploadPath`: uploaded files.
|
|
209
|
-
- `shellPath`: shell runtime scripts.
|
|
210
|
-
- `preloadPath`: JS/Python/Shell preload files.
|
|
211
|
-
|
|
212
|
-
Before hardcoding paths, check `back/config/index.ts`.
|
|
213
|
-
|
|
214
|
-
### Scheduling And gRPC
|
|
215
|
-
|
|
216
|
-
- `back/schedule/*`
|
|
217
|
-
- `back/protos/*`
|
|
218
|
-
- `back/services/grpc.ts`
|
|
219
|
-
|
|
220
|
-
The project has two scheduling paths:
|
|
221
|
-
|
|
222
|
-
- Standard crontab-style tasks are persisted and written through backend cron logic.
|
|
223
|
-
- Node/gRPC scheduler logic handles cases such as second-level cron expressions or additional schedules.
|
|
224
|
-
|
|
225
|
-
`back/services/cron.ts` decides whether a task needs the Node scheduler using schedule shape and `extra_schedules`.
|
|
226
|
-
|
|
227
|
-
### Shared Backend Utilities
|
|
228
|
-
|
|
229
|
-
- `back/shared/*`
|
|
230
|
-
- `back/config/util.ts`
|
|
231
|
-
- `back/config/share.ts`
|
|
232
|
-
- `back/config/http.ts`
|
|
233
|
-
|
|
234
|
-
Use these before adding new global helpers. Existing shared code includes:
|
|
235
|
-
|
|
236
|
-
- auth helpers.
|
|
237
|
-
- shared store.
|
|
238
|
-
- log stream manager.
|
|
239
|
-
- task runner helpers.
|
|
240
|
-
- concurrency limits.
|
|
241
|
-
- file locking utilities.
|
|
242
|
-
- HTTP/proxy helpers.
|
|
243
|
-
|
|
244
|
-
## Frontend Architecture
|
|
245
|
-
|
|
246
|
-
### Umi Config
|
|
247
|
-
|
|
248
|
-
- `.umirc.ts`
|
|
249
|
-
|
|
250
|
-
Important behavior:
|
|
251
|
-
|
|
252
|
-
- Dev server proxies API requests to `http://127.0.0.1:5700/`.
|
|
253
|
-
- Frontend build output is `static/dist`.
|
|
254
|
-
- Runtime env script is loaded from `./api/env.js`.
|
|
255
|
-
- `QlBaseUrl` affects frontend public path and routing base.
|
|
256
|
-
|
|
257
|
-
### App Initialization
|
|
258
|
-
|
|
259
|
-
- `src/app.ts`
|
|
260
|
-
|
|
261
|
-
Responsibilities:
|
|
262
|
-
|
|
263
|
-
- Load Chinese and English locale JSON.
|
|
264
|
-
- Determine locale from URL/cookie/localStorage.
|
|
265
|
-
- Set Umi locale.
|
|
266
|
-
- Apply `QlBaseUrl` as public path and router basename.
|
|
267
|
-
|
|
268
|
-
### Layout And Routes
|
|
269
|
-
|
|
270
|
-
- `src/layouts/defaultProps.tsx`
|
|
271
|
-
- `src/layouts/index.tsx`
|
|
272
|
-
|
|
273
|
-
`defaultProps.tsx` defines the main route/menu list. If adding a new page visible in the sidebar, update this file.
|
|
274
|
-
|
|
275
|
-
Current major pages:
|
|
276
|
-
|
|
277
|
-
- `src/pages/crontab`: timed task management.
|
|
278
|
-
- `src/pages/subscription`: subscription management.
|
|
279
|
-
- `src/pages/env`: environment variables.
|
|
280
|
-
- `src/pages/config`: config files.
|
|
281
|
-
- `src/pages/script`: script management.
|
|
282
|
-
- `src/pages/dependence`: dependency management.
|
|
283
|
-
- `src/pages/log`: log management.
|
|
284
|
-
- `src/pages/diff`: diff tool.
|
|
285
|
-
- `src/pages/setting`: system settings.
|
|
286
|
-
- `src/pages/login`: login.
|
|
287
|
-
- `src/pages/initialization`: first-run initialization.
|
|
288
|
-
- `src/pages/error`: error page.
|
|
289
|
-
|
|
290
|
-
### Frontend Utilities
|
|
291
|
-
|
|
292
|
-
- `src/utils/http.tsx`: API request helper.
|
|
293
|
-
- `src/utils/websocket.ts`: socket connection behavior.
|
|
294
|
-
- `src/utils/config.ts`: frontend config helpers.
|
|
295
|
-
- `src/utils/const.ts`: constants.
|
|
296
|
-
- `src/utils/date.ts`: date formatting helpers.
|
|
297
|
-
- `src/utils/init.ts`: initialization helpers.
|
|
298
|
-
- `src/utils/codemirror/*`: CodeMirror integration.
|
|
299
|
-
- `src/utils/monaco/*`: Monaco integration.
|
|
300
|
-
|
|
301
|
-
When changing a page's API behavior, inspect both the page file and `src/utils/http.tsx`.
|
|
302
|
-
|
|
303
|
-
### Components And Styling
|
|
304
|
-
|
|
305
|
-
- `src/components/*`: reusable UI components.
|
|
306
|
-
- `src/pages/**/index.less`: page-level styles.
|
|
307
|
-
- `src/pages/script/index.module.less` and `src/pages/log/index.module.less`: CSS module styles.
|
|
308
|
-
- `src/assets/fonts/*`: bundled fonts.
|
|
309
|
-
- `src/locales/*.json`: i18n text.
|
|
310
|
-
|
|
311
|
-
Follow the existing Ant Design and Ant Design Pro patterns when modifying UI.
|
|
312
|
-
|
|
313
|
-
## Shell Runtime
|
|
314
|
-
|
|
315
|
-
- `shell/task.sh`: task execution path.
|
|
316
|
-
- `shell/otask.sh`: alternate/manual task execution path.
|
|
317
|
-
- `shell/api.sh`: shell-side API helpers.
|
|
318
|
-
- `shell/env.sh`: environment setup.
|
|
319
|
-
- `shell/check.sh`: runtime check helpers.
|
|
320
|
-
- `shell/update.sh`: update helpers.
|
|
321
|
-
- `shell/rmlog.sh`: log cleanup.
|
|
322
|
-
- `shell/share.sh`: shared shell helpers.
|
|
323
|
-
- `shell/preload/*`: preload files injected into JS/Python/Shell task environments.
|
|
324
|
-
|
|
325
|
-
The backend often coordinates task execution, but the actual user script process environment is shaped by files in `shell/`.
|
|
326
|
-
|
|
327
|
-
## Runtime Data Directory
|
|
328
|
-
|
|
329
|
-
- `data/`
|
|
330
|
-
|
|
331
|
-
This directory is runtime state, not just source code. Be careful when modifying or deleting files here.
|
|
332
|
-
|
|
333
|
-
Important subdirectories:
|
|
334
|
-
|
|
335
|
-
- `data/db`: SQLite database.
|
|
336
|
-
- `data/config`: generated and user-edited config files.
|
|
337
|
-
- `data/scripts`: user scripts.
|
|
338
|
-
- `data/repo`: cloned subscription repositories.
|
|
339
|
-
- `data/log`: task logs.
|
|
340
|
-
- `data/upload`: uploaded files.
|
|
341
|
-
- `data/syslog`: system logs.
|
|
342
|
-
- `data/ssh.d`: SSH-related runtime data.
|
|
343
|
-
- `data/dep_cache`: dependency cache, when present.
|
|
344
|
-
|
|
345
|
-
Many bugs that appear as "backend logic" may involve state stored under `data/`.
|
|
346
|
-
|
|
347
|
-
## Docker And Release Files
|
|
348
|
-
|
|
349
|
-
- `docker/Dockerfile`
|
|
350
|
-
- `docker/310.Dockerfile`
|
|
351
|
-
- `docker/docker-compose.yml`
|
|
352
|
-
- `docker/docker-entrypoint.sh`
|
|
353
|
-
- `ecosystem.config.js`
|
|
354
|
-
- `version.yaml`
|
|
355
|
-
|
|
356
|
-
Use these when changing deployment, container startup, PM2 behavior, or release metadata.
|
|
357
|
-
|
|
358
|
-
## Common Modification Map
|
|
359
|
-
|
|
360
|
-
### Add Or Modify A Backend API
|
|
361
|
-
|
|
362
|
-
Typical files:
|
|
363
|
-
|
|
364
|
-
1. Add or update route in `back/api/<module>.ts`.
|
|
365
|
-
2. Add or update service logic in `back/services/<module>.ts`.
|
|
366
|
-
3. Add or update model in `back/data/<module>.ts` if persistence changes.
|
|
367
|
-
4. Add validation with `celebrate`/`Joi` near the route.
|
|
368
|
-
5. Update frontend caller in `src/pages/**` or `src/utils/**`.
|
|
369
|
-
|
|
370
|
-
### Add A New Frontend Page
|
|
371
|
-
|
|
372
|
-
Typical files:
|
|
373
|
-
|
|
374
|
-
1. Create `src/pages/<page>/index.tsx`.
|
|
375
|
-
2. Add styles in `src/pages/<page>/index.less` if needed.
|
|
376
|
-
3. Register route/menu in `src/layouts/defaultProps.tsx`.
|
|
377
|
-
4. Add locale strings in `src/locales/zh-CN.json` and `src/locales/en-US.json`.
|
|
378
|
-
5. Add API calls through the existing request helper.
|
|
379
|
-
|
|
380
|
-
### Change Cron/Task Behavior
|
|
381
|
-
|
|
382
|
-
Start with:
|
|
383
|
-
|
|
384
|
-
- `back/api/cron.ts`
|
|
385
|
-
- `back/services/cron.ts`
|
|
386
|
-
- `back/schedule/*`
|
|
387
|
-
- `shell/task.sh`
|
|
388
|
-
- `shell/otask.sh`
|
|
389
|
-
- `shell/preload/*`
|
|
390
|
-
|
|
391
|
-
Also inspect:
|
|
392
|
-
|
|
393
|
-
- `back/data/cron.ts`
|
|
394
|
-
- `back/validation/schedule.ts`
|
|
395
|
-
- `data/config/crontab.list`
|
|
396
|
-
- `data/log/*`
|
|
397
|
-
|
|
398
|
-
### Change Environment Variable Behavior
|
|
399
|
-
|
|
400
|
-
Start with:
|
|
401
|
-
|
|
402
|
-
- `back/api/env.ts`
|
|
403
|
-
- `back/services/env.ts`
|
|
404
|
-
- `back/data/env.ts`
|
|
405
|
-
- `src/pages/env/index.tsx`
|
|
406
|
-
|
|
407
|
-
Also inspect:
|
|
408
|
-
|
|
409
|
-
- `shell/preload/env.sh`
|
|
410
|
-
- `shell/preload/env.js`
|
|
411
|
-
- `shell/preload/env.py`
|
|
412
|
-
|
|
413
|
-
### Change Script Management
|
|
414
|
-
|
|
415
|
-
Start with:
|
|
416
|
-
|
|
417
|
-
- `back/api/script.ts`
|
|
418
|
-
- `back/services/script.ts`
|
|
419
|
-
- `src/pages/script/index.tsx`
|
|
420
|
-
- `data/scripts/*`
|
|
421
|
-
|
|
422
|
-
### Change Login/Auth/Security
|
|
423
|
-
|
|
424
|
-
Start with:
|
|
425
|
-
|
|
426
|
-
- `back/api/user.ts`
|
|
427
|
-
- `back/services/user.ts`
|
|
428
|
-
- `back/shared/auth.ts`
|
|
429
|
-
- `back/shared/store.ts`
|
|
430
|
-
- `back/loaders/express.ts`
|
|
431
|
-
- `back/token.ts`
|
|
432
|
-
- `src/pages/login/index.tsx`
|
|
433
|
-
- `src/pages/initialization/index.tsx`
|
|
434
|
-
|
|
435
|
-
Be careful with:
|
|
436
|
-
|
|
437
|
-
- JWT behavior.
|
|
438
|
-
- open API token behavior.
|
|
439
|
-
- first-run initialization.
|
|
440
|
-
- platform-specific session limits.
|
|
441
|
-
|
|
442
|
-
### Change Subscription Behavior
|
|
443
|
-
|
|
444
|
-
Start with:
|
|
445
|
-
|
|
446
|
-
- `back/api/subscription.ts`
|
|
447
|
-
- `back/services/subscription.ts`
|
|
448
|
-
- `back/data/subscription.ts`
|
|
449
|
-
- `src/pages/subscription/index.tsx`
|
|
450
|
-
- `data/repo/*`
|
|
451
|
-
|
|
452
|
-
### Change Dependency Management
|
|
453
|
-
|
|
454
|
-
Start with:
|
|
455
|
-
|
|
456
|
-
- `back/api/dependence.ts`
|
|
457
|
-
- `back/services/dependence.ts`
|
|
458
|
-
- `back/data/dependence.ts`
|
|
459
|
-
- `src/pages/dependence/index.tsx`
|
|
460
|
-
- `data/deps`
|
|
461
|
-
- `data/dep_cache`
|
|
462
|
-
|
|
463
|
-
### Change Logs Or Live Log Streaming
|
|
464
|
-
|
|
465
|
-
Start with:
|
|
466
|
-
|
|
467
|
-
- `back/api/log.ts`
|
|
468
|
-
- `back/services/log.ts`
|
|
469
|
-
- `back/services/sock.ts`
|
|
470
|
-
- `back/shared/logStreamManager.ts`
|
|
471
|
-
- `src/pages/log/index.tsx`
|
|
472
|
-
- `src/components/terminal.tsx`
|
|
473
|
-
- `data/log/*`
|
|
474
|
-
|
|
475
|
-
## Coding Conventions
|
|
476
|
-
|
|
477
|
-
Backend:
|
|
478
|
-
|
|
479
|
-
- Prefer adding business logic to services, not route files.
|
|
480
|
-
- Use `typedi` services consistently.
|
|
481
|
-
- Use existing config paths from `back/config/index.ts`.
|
|
482
|
-
- Return API responses in the existing `{ code, data, message }` shape.
|
|
483
|
-
- Use existing utilities before adding new helpers.
|
|
484
|
-
- Preserve current SQLite/Sequelize style unless doing a larger data-layer refactor.
|
|
485
|
-
|
|
486
|
-
Frontend:
|
|
487
|
-
|
|
488
|
-
- Follow existing Umi/React/Ant Design patterns.
|
|
489
|
-
- Keep route/menu changes in `src/layouts/defaultProps.tsx`.
|
|
490
|
-
- Use existing request/WebSocket helpers.
|
|
491
|
-
- Add or update locale strings for visible UI text.
|
|
492
|
-
- Keep page-specific styles near the page.
|
|
493
|
-
|
|
494
|
-
Shell/runtime:
|
|
495
|
-
|
|
496
|
-
- Treat `shell/` as part of production behavior.
|
|
497
|
-
- Test task execution changes with realistic scripts when possible.
|
|
498
|
-
- Be careful with path quoting and environment variable propagation.
|
|
499
|
-
|
|
500
|
-
Data:
|
|
501
|
-
|
|
502
|
-
- Treat `data/` as mutable runtime state.
|
|
503
|
-
- Do not delete runtime state unless explicitly requested.
|
|
504
|
-
- Schema changes should account for existing SQLite databases.
|
|
505
|
-
|
|
506
|
-
## Suggested First Steps For AI Agents
|
|
507
|
-
|
|
508
|
-
When asked to modify behavior:
|
|
509
|
-
|
|
510
|
-
1. Identify whether the change is frontend, backend, shell runtime, data model, or deployment.
|
|
511
|
-
2. Search by feature name in `src/pages`, `back/api`, and `back/services`.
|
|
512
|
-
3. Read the route file and matching service before editing.
|
|
513
|
-
4. If persistence is involved, read the matching `back/data` model and `back/loaders/db.ts`.
|
|
514
|
-
5. If task execution is involved, inspect `shell/` and `back/services/cron.ts`.
|
|
515
|
-
6. Make the smallest scoped change that matches existing patterns.
|
|
516
|
-
7. Run the most relevant check:
|
|
517
|
-
- `pnpm run build:back` for backend TypeScript changes.
|
|
518
|
-
- `pnpm run build:front` for frontend build changes.
|
|
519
|
-
- targeted manual task/API checks for shell and scheduler changes.
|
|
520
|
-
|
|
521
|
-
## Quick Directory Reference
|
|
522
|
-
|
|
523
|
-
```text
|
|
524
|
-
.
|
|
525
|
-
├── back/ Backend TypeScript application
|
|
526
|
-
│ ├── api/ Express route modules
|
|
527
|
-
│ ├── config/ Runtime config, paths, constants, helpers
|
|
528
|
-
│ ├── data/ Sequelize models and SQLite connection
|
|
529
|
-
│ ├── loaders/ Startup initialization and Express setup
|
|
530
|
-
│ ├── middlewares/ Express middlewares
|
|
531
|
-
│ ├── protos/ gRPC proto files and generated TS
|
|
532
|
-
│ ├── schedule/ Scheduler/gRPC client helpers
|
|
533
|
-
│ ├── services/ Business logic services
|
|
534
|
-
│ ├── shared/ Shared backend utilities
|
|
535
|
-
│ └── validation/ Joi validation schemas
|
|
536
|
-
├── src/ Frontend Umi/React application
|
|
537
|
-
│ ├── assets/ Fonts and static frontend assets
|
|
538
|
-
│ ├── components/ Shared UI components
|
|
539
|
-
│ ├── hooks/ Frontend hooks
|
|
540
|
-
│ ├── layouts/ Main layout and menu route config
|
|
541
|
-
│ ├── locales/ i18n JSON
|
|
542
|
-
│ ├── pages/ Feature pages
|
|
543
|
-
│ └── utils/ HTTP, WebSocket, editor, date, and config utilities
|
|
544
|
-
├── shell/ Task runtime shell scripts and preload files
|
|
545
|
-
├── data/ Runtime state: db, logs, scripts, repos, configs
|
|
546
|
-
├── docker/ Docker build and compose files
|
|
547
|
-
├── sample/ Sample scripts and default config templates
|
|
548
|
-
├── static/ Built frontend/backend artifacts
|
|
549
|
-
└── docs/ Project documentation
|
|
550
|
-
```
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Node cron 调度器迁移
|
|
2
|
-
|
|
3
|
-
Node 调度路径使用固定版本 `node-cron@4.6.0`,普通任务(含额外规则)、订阅和系统 cron 共用 `back/shared/cronScheduler.ts`。启动/一次性任务、间隔任务、脚本并发限制和进程执行链路保持原有实现。系统模式只将语义一致的普通五字段规则交给 crond。
|
|
4
|
-
|
|
5
|
-
移除 `node-schedule`、其类型包以及兼容别名 `cron-parser-v4`。保留 `cron-parser@5` 做旧表达式的校验与标准化;计时器和日历推进由 node-cron 管理。
|
|
6
|
-
|
|
7
|
-
## 兼容行为
|
|
8
|
-
|
|
9
|
-
- 保留旧版 1–6 字段补全、五种宏、月份/星期名称、数字起点步长、L 和 #。另外明确新增 `@annually`(等同 `@yearly`)、`@midnight`(等同 `@daily`)、`@minutely`(每分钟第 0 秒)。宏按进程时区解释。`?` 仅允许日期和星期字段;裸 `/N`、H 和其他未列出的宏仍拒绝。
|
|
10
|
-
- 日期与星期同时指定时保留 OR 语义,不采用 node-cron 默认的 AND。两个原生任务分别处理日期和星期,并按计划时间过滤交集,避免重复执行;保留旧解析器的月份全日期范围及全局 nth-week 限制。
|
|
11
|
-
- 原生任务先暂停创建并验证,再替换旧任务。构造失败时销毁已准备的实例并保留旧快照。
|
|
12
|
-
- 进程内迟到的触发通过 `execution:missed` 加入既有执行队列,记录补执行日志。并发和单任务积压上限仍由青龙队列控制;这不提供进程退出期间的持久化补跑或分布式 exactly-once 保证。
|
|
13
|
-
- 标准化结果使用上限 512 条的只读缓存,仅缓存语法,不缓存运行实例或下次执行时间。避免大批相同表达式重复解析导致恢复 RPC 超时。
|
|
14
|
-
- 回调异常记录日志,后续调度继续;取消时调用原生 `destroy()` 释放计时器和注册表。
|
|
15
|
-
- 持久化无效任务在恢复时跳过并记录日志,无效订阅不会产生未处理的启动拒绝。API、导入和执行使用同一套表达式校验。
|
|
16
|
-
|
|
17
|
-
## 复审修复
|
|
18
|
-
|
|
19
|
-
- 移除没有生产调用的 `nextInvocation()` 接口,避免对 OR/# 等过滤规则报告不会实际执行的原生日期。回归测试直接观察实际执行和原生实例状态。
|
|
20
|
-
- 批量注册 RPC 时限为 5 秒加每条规则 5 毫秒,计入额外规则并封顶 120 秒;保留超时后的恢复机制,不立即重放结果不确定的写入。
|
|
21
|
-
- Alpine/系统模式下,数字起点步长(如 `0/5`)、星期包含 `7`、日期步长、日期和星期同时受限的表达式转入 Node 路径。BusyBox 的这些解析或通配语义与旧 Node 解析器不同,不能仅因是纯数字五字段就交给 crond。
|
|
22
|
-
- 这些规则在 `crontab.list` 中仍保留为注释,避免同时被系统和 Node 执行。其他可移植规则仍使用系统 crond。
|
|
23
|
-
|
|
24
|
-
## 夏令时差异
|
|
25
|
-
|
|
26
|
-
采用 node-cron 的当地时间语义:春季跳时不存在的时间跳过,秋季重复小时不再执行第二次。旧 cron-parser 对部分春季时间会顺延,并可能重复秋季高频任务。使用有夏令时的时区时需要考虑该行为变化;Asia/Shanghai 不受影响。回归测试固定 America/New_York 的 2026 年转换日期。
|
|
27
|
-
|
|
28
|
-
## 验证
|
|
29
|
-
|
|
30
|
-
`npm test` 和 `npm run build:back`。
|
|
31
|
-
|
|
32
|
-
- `test/fixtures/legacy-cron.json` 是迁移前使用 node-schedule 2.1.1 / cron-parser 4.9.0 保存的快照:269 条语法判定,18 组日历序列,每组 10 次执行。
|
|
33
|
-
- 真正的 node-cron 实例配合虚拟时钟验证日期/星期 OR、交集去重、闰年、L/#、8 秒迟到补执行、取消释放、回调拒绝和夏令时。
|
|
34
|
-
- 注册构造失败回滚、无效订阅隔离、空表达式立即运行,以及现有调度恢复/503/子进程测试覆盖接入流程。
|
|
35
|
-
- 隔离的正式 Debian 镜像使用实际编译产物验证 10,000 条有效任务和 2 条错误任务的恢复、300 个同时到期的 Python 脚本、并发上限 16 及 HTTP 健康检查。具体结果见本次测试报告;这是生产镜像隔离验证,不是线上长期运行证明。
|
|
36
|
-
|
|
37
|
-
### 本次验收结果(2026-09-27)
|
|
38
|
-
|
|
39
|
-
完整回归 260 通过、3 项原有跳过,后端编译成功。Node 20 生产运行时的 21 项兼容测试通过。隔离镜像中 300/300 脚本完成,无重复或遗漏,最大并发 16,270 个成功及 30 个预设失败均落库;完成耗时 52.36 秒。恢复后健康检查 1,870/1,870 成功,任务列表 38/38 成功。重启恢复阶段另有 50 次健康检查失败。
|
|
40
|
-
|
|
41
|
-
初版重复解析曾导致恢复超过 5 秒 RPC 时限,加入有上限的语法缓存后重跑通过。本次 10,000 个任务共享两个表达式,不能视为一万种复杂表达式的容量保证;实际脚本耗时也不代表纯调度性能。
|
|
42
|
-
|
|
43
|
-
新增宏在 UTC 和 Asia/Shanghai 下验证连续两次实际触发及不提前触发;原有语法快照仅对这三个新增宏允许预期变化。
|
|
44
|
-
|
|
45
|
-
### 复审后验收
|
|
46
|
-
|
|
47
|
-
完整回归 267 通过、3 项原有跳过;Node 20 的 10 项修复回归及 Alpine 镜像的 24 项兼容/宏测试通过。
|
|
48
|
-
|
|
49
|
-
额外使用 9,700 个不同表达式和 300 个同时到期任务验证恢复(另有 2 个无效任务),不再局限于共享两个表达式。300/300 脚本完成,无重复或遗漏,最大并发 16,270 个退出码 0、30 个预设退出码 3 均落库。恢复后健康检查 1,650/1,650 成功、任务列表 33/33 成功;启动恢复阶段另有 260 次健康检查失败,整批脚本耗时 60.27 秒。较大快照恢复仍需等待,不承诺启动阶段始终可用或任意规模都能在时限内恢复。
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# Task startup and notification loading
|
|
2
|
-
|
|
3
|
-
`task` performs shell configuration, status reporting and dependency-path discovery
|
|
4
|
-
before invoking the selected runtime. These costs are separate from cron callback
|
|
5
|
-
latency and time spent waiting for an execution slot.
|
|
6
|
-
|
|
7
|
-
## Dependency-path cache
|
|
8
|
-
|
|
9
|
-
Node scheduling usually starts in `/ql`, while Alpine crond starts in `/root`.
|
|
10
|
-
The pnpm discovery key includes the working directory, npm/pnpm configuration,
|
|
11
|
-
relevant environment and executable metadata. Each key now has its own cached
|
|
12
|
-
record, so alternating scheduler environments do not evict each other.
|
|
13
|
-
|
|
14
|
-
Records expire after 60 seconds. Refreshes share a persistent per-user lock;
|
|
15
|
-
records older than an hour are removed on refresh. Warm lookups do not scan the
|
|
16
|
-
cache directory. The lock is never removed while another process might use it.
|
|
17
|
-
The opt-out `QL_NODE_PATH_CACHE=0`, failed-discovery fallback, and package resolution
|
|
18
|
-
order remain available. This caches the dependency directory, not its contents.
|
|
19
|
-
|
|
20
|
-
## Language startup paths
|
|
21
|
-
|
|
22
|
-
| Invocation | Environment and before hooks | Automatic notification loading |
|
|
23
|
-
| --- | --- | --- |
|
|
24
|
-
| `task script.py` / `.pyc` | Python preload imports generated environment, runs the shell/command before hooks, imports `task_before.py`, then applies account selection | `QLAPI.notify(...)` imports `__ql_notify__` on first call |
|
|
25
|
-
| `task script.js` / `.mjs` / `.ts` | Node preload imports generated environment, runs shell/command before hooks, requires `task_before.js`, then applies account selection | `QLAPI.notify(...)` requires `__ql_notify__.js` on first call |
|
|
26
|
-
| `task script.sh` | Shell sources the generated environment and runs shell before hooks | No automatic Python/Node notification module |
|
|
27
|
-
| Explicit interpreter or other command, e.g. `task python3 script.py` | Retains generated environment and shell before-hook exports; it does not automatically install the Python/Node preload | No automatic notification module unless configured by the caller |
|
|
28
|
-
|
|
29
|
-
TypeScript uses `ts-node-transpile-only`; MJS uses the same Node preload plus the
|
|
30
|
-
ESM loader. There are no separate built-in Ruby, Go, Java or PHP preload modules.
|
|
31
|
-
All these task paths still pass through shared dependency-path setup: non-JS
|
|
32
|
-
scripts and their hooks may themselves call Node or use the QLAPI bridge.
|
|
33
|
-
|
|
34
|
-
The before hooks are deliberately still synchronous: they can export environment
|
|
35
|
-
variables or perform work required by the user's script. Python's preload still
|
|
36
|
-
starts a child shell/Python to capture that environment; Node's preload starts a
|
|
37
|
-
child shell/Node. Node also still loads its gRPC client eagerly. These are remaining
|
|
38
|
-
startup costs, not work performed by the cron library, and are not removed by this
|
|
39
|
-
change.
|
|
40
|
-
|
|
41
|
-
Shell scripts run in a child shell that inherits the wrapper's environment and
|
|
42
|
-
before-hook functions. This lets the wrapper run its after hooks and report the
|
|
43
|
-
exit status even when a script calls `exit`, replaces itself with `exec`, or fails
|
|
44
|
-
under `set -e`. The script's own EXIT trap still runs in the child. Changes made
|
|
45
|
-
inside the script (variables, working directory, functions and shell options)
|
|
46
|
-
do not propagate back to the wrapper or its after hooks.
|
|
47
|
-
|
|
48
|
-
## Lazy notifications
|
|
49
|
-
|
|
50
|
-
Scripts keep calling `QLAPI.notify` with the same arguments. When no notification
|
|
51
|
-
is sent, the notification provider and its channel dependencies are never imported
|
|
52
|
-
by the preload. First use loads the provider; subsequent uses reuse the standard
|
|
53
|
-
Python/Node module cache. JS forwards the receiver and return value, including
|
|
54
|
-
promises, and Python forwards positional and keyword arguments. Import/send errors
|
|
55
|
-
surface at the notification call rather than preventing unrelated scripts from
|
|
56
|
-
obtaining QLAPI during startup. A failed import can be retried after its cause is
|
|
57
|
-
resolved.
|
|
58
|
-
|
|
59
|
-
Provider initialization, including provider configuration reads, now happens at
|
|
60
|
-
first use. A script's explicit `import __ql_notify__`, `require(...)`, or independent
|
|
61
|
-
notification helper still loads that module immediately.
|
|
62
|
-
|
|
63
|
-
## Task timeouts
|
|
64
|
-
|
|
65
|
-
`task -m DURATION ...` also applies to sourced Shell scripts. The timeout worker
|
|
66
|
-
inherits before-hook variables, arrays and functions without serializing them.
|
|
67
|
-
At the deadline, the worker's process group receives TERM, followed by KILL after
|
|
68
|
-
0.5 seconds, so ordinary child processes cannot continue after the timeout.
|
|
69
|
-
Explicit interpreters and other commands use the same mechanism. Processes that
|
|
70
|
-
intentionally create a separate session/process group are outside this boundary.
|
|
71
|
-
The wrapper records status 124 and runs its after hook; concurrent account mode
|
|
72
|
-
retains its existing aggregate status behavior. Zero disables the timeout.
|
|
73
|
-
|
|
74
|
-
Cron executions waiting for a concurrency slot retain their schedule revision.
|
|
75
|
-
Disabling, deleting or replacing that revision prevents its queued executions
|
|
76
|
-
from starting when a slot becomes available. Already running executions retain
|
|
77
|
-
the existing stop behavior. Invalidated callbacks do not count against a new
|
|
78
|
-
revision's limit of five pending/running executions.
|