@whyour/qinglong 2.21.0 → 2.23.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/.dockerignore +13 -0
- package/.env.example +7 -0
- package/AGENTS.md +2 -2
- package/README-en.md +24 -0
- package/README.md +24 -0
- package/back/protos/api.proto +9 -1
- package/back/protos/cron.proto +8 -1
- package/deploy/kubernetes/README.md +81 -0
- package/deploy/kubernetes/base/kustomization.yaml +5 -0
- package/deploy/kubernetes/base/qinglong.yaml +95 -0
- package/deploy/kubernetes/overlays/example/kustomization.yaml +10 -0
- package/docker/Dockerfile +31 -12
- package/docker/Dockerfile.310 +31 -12
- package/docker/Dockerfile.debian +22 -14
- package/docker/Dockerfile.debian310 +24 -14
- package/docker/build-manifest.cjs +28 -0
- package/docker/verify-build.cjs +49 -0
- package/docs/development/node-cron-migration.md +49 -0
- package/docs/development/task-startup.md +78 -0
- package/docs/releases/2.22.0-validation.md +49 -0
- package/docs/releases/2.22.0.md +62 -0
- package/docs/releases/2.23.0.md +33 -0
- package/docs/script-history.md +53 -0
- package/ecosystem.config.js +10 -1
- package/package.json +19 -13
- package/sample/config.sample.sh +17 -2
- package/sample/notify.js +118 -0
- package/sample/notify.py +93 -0
- package/scripts/benchmark-execution.cjs +96 -0
- package/scripts/benchmark-script-history.cjs +39 -0
- package/scripts/publish-static.sh +34 -0
- package/scripts/sync-static.sh +20 -0
- package/scripts/wait-for-mirror.sh +214 -0
- package/scripts/write-build-info.cjs +27 -0
- package/shell/api.sh +96 -83
- package/shell/check.sh +59 -19
- package/shell/lang/en.sh +6 -0
- package/shell/lang/zh.sh +6 -0
- package/shell/node_path_cache.sh +136 -0
- package/shell/otask.sh +17 -10
- package/shell/preload/sitecustomize.js +11 -3
- package/shell/preload/sitecustomize.py +4 -2
- package/shell/share.sh +27 -10
- package/shell/start.sh +6 -3
- package/shell/task-timeout.sh +63 -0
- package/shell/task.sh +21 -9
- package/shell/update.sh +104 -98
- package/shell/upgrade.cjs +8 -0
- package/static/build/api/clientIp.js +42 -0
- package/static/build/api/config.js +9 -21
- package/static/build/api/cron.js +39 -3
- package/static/build/api/dashboard.js +50 -6
- package/static/build/api/env.js +17 -16
- package/static/build/api/health.js +2 -2
- package/static/build/api/index.js +4 -0
- package/static/build/api/log.js +39 -19
- package/static/build/api/open.js +2 -1
- package/static/build/api/retention.js +63 -0
- package/static/build/api/script.js +172 -25
- package/static/build/api/subscription.js +19 -8
- package/static/build/api/system.js +66 -12
- package/static/build/api/user.js +75 -15
- package/static/build/app.js +63 -54
- package/static/build/bootstrap/database.js +51 -0
- package/static/build/config/const.js +2 -0
- package/static/build/config/grpcCerts.js +93 -44
- package/static/build/config/index.js +0 -4
- package/static/build/config/share.js +5 -4
- package/static/build/config/subscription.js +19 -11
- package/static/build/config/util.js +142 -45
- package/static/build/data/cron.js +1 -0
- package/static/build/data/notify.js +18 -1
- package/static/build/data/sock.js +1 -0
- package/static/build/loaders/app.js +8 -6
- package/static/build/loaders/db.js +5 -35
- package/static/build/loaders/deps.js +30 -22
- package/static/build/loaders/express.js +46 -32
- package/static/build/loaders/initData.js +26 -33
- package/static/build/loaders/initFile.js +1 -1
- package/static/build/loaders/initTask.js +14 -3
- package/static/build/loaders/server.js +1 -1
- package/static/build/loaders/sock.js +72 -6
- package/static/build/middlewares/monitoring.js +12 -33
- package/static/build/middlewares/protectedPathCase.js +17 -0
- package/static/build/middlewares/uniqueConstraintError.js +15 -0
- package/static/build/protos/api.js +78 -2
- package/static/build/protos/cron.js +83 -5
- package/static/build/protos/health.js +1 -1
- package/static/build/schedule/addCron.js +67 -19
- package/static/build/schedule/api.js +5 -2
- package/static/build/schedule/client.js +56 -6
- package/static/build/schedule/delCron.js +11 -1
- package/static/build/schedule/health.js +72 -7
- package/static/build/schedule/setConcurrency.js +27 -0
- package/static/build/services/config.js +5 -43
- package/static/build/services/cron.js +389 -174
- package/static/build/services/dependence.js +66 -18
- package/static/build/services/env.js +1 -1
- package/static/build/services/grpc.js +4 -3
- package/static/build/services/health.js +4 -7
- package/static/build/services/http.js +9 -3
- package/static/build/services/log.js +2 -3
- package/static/build/services/metrics.js +46 -14
- package/static/build/services/notify.js +73 -5
- package/static/build/services/open.js +106 -31
- package/static/build/services/retention.js +123 -0
- package/static/build/services/schedule.js +77 -43
- package/static/build/services/script.js +4 -5
- package/static/build/services/scriptHistory.js +30 -0
- package/static/build/services/sshKey.js +39 -14
- package/static/build/services/subscription.js +161 -87
- package/static/build/services/system.js +116 -43
- package/static/build/services/user.js +255 -37
- package/static/build/shared/auth.js +22 -3
- package/static/build/shared/authMutation.js +17 -0
- package/static/build/shared/childProcess.js +82 -0
- package/static/build/shared/clientIp.js +27 -0
- package/static/build/shared/cronCommand.js +17 -0
- package/static/build/shared/cronSchedule.js +101 -0
- package/static/build/shared/cronScheduler.js +73 -0
- package/static/build/shared/errors.js +9 -0
- package/static/build/shared/fileAccess.js +60 -0
- package/static/build/shared/i18n.js +63 -4
- package/static/build/shared/logPath.js +15 -0
- package/static/build/shared/logReader.js +85 -0
- package/static/build/shared/logStreamManager.js +80 -60
- package/static/build/shared/loginThrottle.js +45 -0
- package/static/build/shared/pLimit.js +22 -8
- package/static/build/shared/password.js +30 -0
- package/static/build/shared/retention.js +58 -0
- package/static/build/shared/runCron.js +39 -17
- package/static/build/shared/schedulerMutationLock.js +44 -0
- package/static/build/shared/schedulerReadiness.js +82 -0
- package/static/build/shared/schemaMigrations.js +58 -0
- package/static/build/shared/scriptHistory.js +445 -0
- package/static/build/shared/shellQuote.js +11 -0
- package/static/build/shared/startupProcess.js +48 -0
- package/static/build/shared/store.js +7 -0
- package/static/build/shared/subscriptionMutationLock.js +34 -0
- package/static/build/shared/subscriptionPath.js +41 -0
- package/static/build/shared/subscriptionStorage.js +98 -0
- package/static/build/shared/trustProxy.js +119 -0
- package/static/build/shared/utils.js +2 -1
- package/static/build/token.js +3 -14
- package/static/build/validation/schedule.js +6 -12
- package/static/dist/{1885.e1ea09f6.async.js → 1885.b8f427bf.async.js} +1 -1
- package/static/dist/2031.6af40025.async.js +1 -0
- package/static/dist/2693.51c2636b.async.js +1 -0
- package/static/dist/{2890.9e373f5b.async.js → 2890.add55e85.async.js} +1 -1
- package/static/dist/2901.2ca95295.async.js +1 -0
- package/static/dist/292.264757f0.async.js +1 -0
- package/static/dist/3512.95e41255.async.js +1 -0
- package/static/dist/445.a65ff63b.async.js +1 -0
- package/static/dist/4736.1d2b5cb6.async.js +1 -0
- package/static/dist/{6013.4e38de36.async.js → 6013.db535339.async.js} +1 -1
- package/static/dist/6212.9e6d9913.async.js +1 -0
- package/static/dist/{6339.ab305e96.async.js → 6431.4603ad0e.async.js} +1 -1
- package/static/dist/{6872.42f939f1.async.js → 6872.a503ef55.async.js} +1 -1
- package/static/dist/7231.f7e5b668.async.js +1 -0
- package/static/dist/{7355.f9f263d8.async.js → 7355.fca746f5.async.js} +1 -1
- package/static/dist/{7508.7dcee91c.async.js → 7508.d90eac63.async.js} +1 -1
- package/static/dist/{7984.594296a5.async.js → 7984.eaac7402.async.js} +1 -1
- package/static/dist/8844.a0fef08e.async.js +1 -0
- package/static/dist/index.html +2 -2
- package/static/dist/layouts__index.633d3553.async.js +1 -0
- package/static/dist/preload_helper.01fcd534.js +1 -0
- package/static/dist/{src__pages__config__index.a22ff7dc.async.js → src__pages__config__index.9aba4054.async.js} +1 -1
- package/static/dist/src__pages__crontab__detail.86b2eebb.async.js +1 -0
- package/static/dist/src__pages__crontab__index.ae4e06f2.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.0b8cce8c.async.js → src__pages__crontab__logModal.930535e2.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.a2c8fdcc.async.js +1 -0
- package/static/dist/src__pages__crontab__viewCreateModal.7b4f9cbe.async.js +1 -0
- package/static/dist/src__pages__crontab__viewManageModal.cd454ea0.async.js +1 -0
- package/static/dist/src__pages__dashboard__index.243c5a35.async.js +1 -0
- package/static/dist/src__pages__dashboard__taskResultModal.7795d6e1.async.js +1 -0
- package/static/dist/src__pages__dependence__index.874d501f.async.js +1 -0
- package/static/dist/src__pages__dependence__logModal.154efe7a.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.0fa8b421.async.js +1 -0
- package/static/dist/src__pages__diff__index.b94e5dc5.async.js +1 -0
- package/static/dist/src__pages__env__editNameModal.c13d47d2.async.js +1 -0
- package/static/dist/src__pages__env__index.fd6fd2b0.async.js +1 -0
- package/static/dist/src__pages__env__modal.4d71adb3.async.js +1 -0
- package/static/dist/src__pages__error__index.aae50c94.async.js +1 -0
- package/static/dist/src__pages__initialization__index.82a2e967.async.js +1 -0
- package/static/dist/src__pages__log__index.71250e0d.async.js +1 -0
- package/static/dist/{src__pages__login__index.8c813eb1.async.js → src__pages__login__index.a0fd5ed8.async.js} +1 -1
- package/static/dist/src__pages__script__editModal.afabf073.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.789ad87b.async.js +1 -0
- package/static/dist/src__pages__script__historyDrawer.8c58d958.async.js +1 -0
- package/static/dist/src__pages__script__historyDrawer.a449193a.chunk.css +1 -0
- package/static/dist/src__pages__script__index.ab360776.chunk.css +1 -0
- package/static/dist/src__pages__script__index.fc575945.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.0ab029e7.async.js +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__script__setting.35ad4f02.async.js +1 -0
- package/static/dist/src__pages__setting__appModal.7eaeb9d3.async.js +1 -0
- package/static/dist/src__pages__setting__checkUpdate.d175b154.async.js +1 -0
- package/static/dist/src__pages__setting__clientIp.3a8711ed.async.js +1 -0
- package/static/dist/src__pages__setting__dependence.9c0f749b.async.js +1 -0
- package/static/dist/src__pages__setting__index.cb397741.async.js +1 -0
- package/static/dist/src__pages__setting__loginLog.e0a1f54d.async.js +1 -0
- package/static/dist/src__pages__setting__notification.2ffe4e5a.async.js +1 -0
- package/static/dist/src__pages__setting__other.3d0b8492.async.js +1 -0
- package/static/dist/{src__pages__setting__progress.8823ac90.async.js → src__pages__setting__progress.2ccae3d7.async.js} +1 -1
- package/static/dist/src__pages__setting__security.e2d71ebb.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.b3046955.async.js +1 -0
- package/static/dist/src__pages__subscription__index.43086a06.async.js +1 -0
- package/static/dist/src__pages__subscription__logModal.cdba5139.async.js +1 -0
- package/static/dist/src__pages__subscription__modal.30868ba8.async.js +1 -0
- package/static/dist/{umi.ca04a019.js → umi.3a24a9fa.js} +1 -1
- package/test/back/advisory-input-security.test.cjs +416 -0
- package/test/back/auth-security.test.cjs +74 -0
- package/test/back/build-provenance.test.cjs +150 -0
- package/test/back/code-scanning-security.test.cjs +189 -0
- package/test/back/cron-log-name.test.cjs +110 -0
- package/test/back/cron-macros.test.cjs +51 -0
- package/test/back/cron-schedule-compatibility.test.cjs +69 -0
- package/test/back/cron-scheduler-routing.test.cjs +59 -0
- package/test/back/cron-validation.test.cjs +45 -0
- package/test/back/dashboard-failures.test.cjs +173 -0
- package/test/back/database-bootstrap.test.cjs +193 -0
- package/test/back/dependence-cache-status.test.cjs +125 -0
- package/test/back/deprecated-file-routes.test.cjs +82 -0
- package/test/back/draft-path-security.test.cjs +235 -0
- package/test/back/ecosystem.test.cjs +28 -0
- package/test/back/env-import-security.test.cjs +91 -0
- package/test/back/env-name-parsing.test.cjs +96 -0
- package/test/back/execution-lifecycle.test.cjs +236 -0
- package/test/back/file-access-scope.test.cjs +180 -0
- package/test/back/file-access-security.test.cjs +47 -0
- package/test/back/fileTreeListing.test.cjs +57 -0
- package/test/back/grpc-cron-response.test.cjs +60 -0
- package/test/back/grpc-mtls-security.test.cjs +136 -0
- package/test/back/http-exclusive-listen.test.cjs +31 -0
- package/test/back/http-security.test.cjs +313 -0
- package/test/back/legacy-cron-recovery.test.cjs +76 -0
- package/test/back/linux-mirror-result.test.cjs +176 -0
- package/test/back/listen-security.test.cjs +68 -0
- package/test/back/log-path-security.test.cjs +158 -0
- package/test/back/logReader.test.cjs +72 -0
- package/test/back/manual-execution.test.cjs +85 -0
- package/test/back/manual-stop-claim.test.cjs +220 -0
- package/test/back/metrics.test.cjs +34 -0
- package/test/back/mirror-status.test.cjs +257 -0
- package/test/back/monitoring.test.cjs +73 -0
- package/test/back/node-cron-migration.test.cjs +65 -0
- package/test/back/node-path-cache.test.cjs +202 -0
- package/test/back/node-path-lock.test.cjs +182 -0
- package/test/back/npm-publication.test.cjs +70 -0
- package/test/back/preload-lazy-notify.test.cjs +168 -0
- package/test/back/primary-apm.test.cjs +24 -0
- package/test/back/process-exit-state.test.cjs +81 -0
- package/test/back/process-stop-signal.test.cjs +77 -0
- package/test/back/protected-path-case.test.cjs +58 -0
- package/test/back/qlServiceLogCommand.test.cjs +128 -0
- package/test/back/queued-cron-invalidation.test.cjs +98 -0
- package/test/back/restart-instance-recovery.test.cjs +116 -0
- package/test/back/retention.test.cjs +131 -0
- package/test/back/role-loading.test.cjs +118 -0
- package/test/back/schedule-health.test.cjs +86 -0
- package/test/back/scheduler-bulk-recovery.test.cjs +40 -0
- package/test/back/scheduler-concurrency.test.cjs +411 -0
- package/test/back/scheduler-file-lock.test.cjs +51 -0
- package/test/back/scheduler-mutation.test.cjs +312 -0
- package/test/back/scheduler-readiness.test.cjs +85 -0
- package/test/back/scheduler-reconciliation.test.cjs +206 -0
- package/test/back/scheduler-rpc-timeout.test.cjs +49 -0
- package/test/back/schema-migrations.test.cjs +127 -0
- package/test/back/script-file-access.test.cjs +210 -0
- package/test/back/script-history-api.test.cjs +551 -0
- package/test/back/script-history.test.cjs +383 -0
- package/test/back/shell-api-parsing.test.cjs +184 -0
- package/test/back/shell-translation-output.test.cjs +16 -0
- package/test/back/shell-upgrade.test.cjs +312 -0
- package/test/back/shellApiToken.test.cjs +151 -0
- package/test/back/sock-polling.test.cjs +297 -0
- package/test/back/sock-security.test.cjs +72 -0
- package/test/back/ssh-config-home.test.cjs +113 -0
- package/test/back/start-env-preservation.test.cjs +53 -0
- package/test/back/static-mirror-trigger.test.cjs +441 -0
- package/test/back/static-mirror.test.cjs +179 -0
- package/test/back/stop-failure-feedback.test.cjs +158 -0
- package/test/back/stop-race.test.cjs +171 -0
- package/test/back/subscription-cleanup.test.cjs +53 -0
- package/test/back/subscription-mutation-lock.test.cjs +83 -0
- package/test/back/subscription-review-regression.test.cjs +607 -0
- package/test/back/subscription-stop-state.test.cjs +66 -0
- package/test/back/subscription-storage-regression.test.cjs +553 -0
- package/test/back/system-dependence-cache.test.cjs +127 -0
- package/test/back/system-export-history.test.cjs +119 -0
- package/test/back/systemTokenRenewal.test.cjs +497 -0
- package/test/back/task-shell-lifecycle.test.cjs +194 -0
- package/test/back/task-time.test.cjs +116 -0
- package/test/back/unique-constraint-error.test.cjs +72 -0
- package/test/back/upgrade-guards.test.cjs +285 -0
- package/test/back/upgrade-lifecycle.test.cjs +288 -0
- package/test/back/upgrade-transaction.test.cjs +133 -0
- package/test/back/user-api.test.cjs +99 -0
- package/test/back/user-security.test.cjs +349 -0
- package/test/back/worker-apm.test.cjs +84 -0
- package/test/back/wpush-grpc.test.cjs +116 -0
- package/test/fixtures/legacy-cron.json +1371 -0
- package/test/front/cron-log-pagination.test.cjs +214 -0
- package/test/front/diff-file-routing.test.cjs +126 -0
- package/test/front/http-auth.test.cjs +152 -0
- package/test/front/http-error.test.cjs +29 -0
- package/test/front/script-history-save.test.cjs +121 -0
- package/test/helpers/load-security-module.cjs +42 -0
- package/test/helpers/upgrade-fixture.cjs +30 -0
- package/version.yaml +14 -34
- package/CLAUDE.md +0 -43
- package/static/dist/1147.c420132e.async.js +0 -1
- package/static/dist/134.54df9e38.async.js +0 -1
- package/static/dist/2096.6d98fd12.async.js +0 -1
- package/static/dist/2208.f7ba3dfa.async.js +0 -1
- package/static/dist/2286.164bb089.async.js +0 -1
- package/static/dist/3191.63263871.async.js +0 -1
- package/static/dist/4859.6592cebb.async.js +0 -1
- package/static/dist/4902.555f92ab.async.js +0 -1
- package/static/dist/5520.ff2cfd6b.async.js +0 -1
- package/static/dist/6431.c50479be.async.js +0 -1
- package/static/dist/6707.801b886b.async.js +0 -1
- package/static/dist/8826.2447a104.async.js +0 -1
- package/static/dist/layouts__index.a7a2bfe0.async.js +0 -1
- package/static/dist/preload_helper.0431c0f3.js +0 -1
- package/static/dist/src__pages__crontab__detail.b9c36808.async.js +0 -1
- package/static/dist/src__pages__crontab__index.fed99fd0.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.f7041c7c.async.js +0 -1
- package/static/dist/src__pages__crontab__viewCreateModal.4d589f66.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.0e317746.async.js +0 -1
- package/static/dist/src__pages__dashboard__index.b30f2f47.async.js +0 -1
- package/static/dist/src__pages__dependence__index.3d87ceac.async.js +0 -1
- package/static/dist/src__pages__dependence__logModal.0681830b.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.11124896.async.js +0 -1
- package/static/dist/src__pages__diff__index.013b7c75.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.5d264b25.async.js +0 -1
- package/static/dist/src__pages__env__index.baa27d4e.async.js +0 -1
- package/static/dist/src__pages__env__modal.7f2ef1bc.async.js +0 -1
- package/static/dist/src__pages__error__index.f156b45e.async.js +0 -1
- package/static/dist/src__pages__initialization__index.e96d4ba8.async.js +0 -1
- package/static/dist/src__pages__log__index.e0978bae.async.js +0 -1
- package/static/dist/src__pages__script__editModal.cbf4ec0e.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.3e7e100d.async.js +0 -1
- package/static/dist/src__pages__script__index.2765d1b8.async.js +0 -1
- package/static/dist/src__pages__script__index.60b6f827.chunk.css +0 -1
- package/static/dist/src__pages__script__renameModal.5e987ef5.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.3f9d23d6.async.js +0 -1
- package/static/dist/src__pages__script__setting.a535793a.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.251cd14f.async.js +0 -1
- package/static/dist/src__pages__setting__checkUpdate.46efe057.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.8a7a9529.async.js +0 -1
- package/static/dist/src__pages__setting__index.cc85fdfb.async.js +0 -1
- package/static/dist/src__pages__setting__loginLog.cea6056c.async.js +0 -1
- package/static/dist/src__pages__setting__notification.390fc905.async.js +0 -1
- package/static/dist/src__pages__setting__other.b22d2165.async.js +0 -1
- package/static/dist/src__pages__setting__security.598720a8.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.67406721.async.js +0 -1
- package/static/dist/src__pages__subscription__index.d0ab2abc.async.js +0 -1
- package/static/dist/src__pages__subscription__logModal.3864b37f.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.3562c670.async.js +0 -1
- /package/static/dist/{4859.1b962b29.chunk.css → 292.1b962b29.chunk.css} +0 -0
|
@@ -45,11 +45,11 @@ const util_1 = require("../config/util");
|
|
|
45
45
|
const open_1 = __importDefault(require("../services/open"));
|
|
46
46
|
const store_1 = require("../shared/store");
|
|
47
47
|
const logger_1 = __importDefault(require("./logger"));
|
|
48
|
-
const
|
|
48
|
+
const client_1 = __importDefault(require("../schedule/client"));
|
|
49
49
|
const runningInstance_1 = require("../data/runningInstance");
|
|
50
50
|
const i18n_1 = require("../shared/i18n");
|
|
51
51
|
exports.default = async () => {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
53
53
|
const cronService = typedi_1.Container.get(cron_2.default);
|
|
54
54
|
const envService = typedi_1.Container.get(env_1.default);
|
|
55
55
|
const dependenceService = typedi_1.Container.get(dependence_1.default);
|
|
@@ -57,20 +57,7 @@ exports.default = async () => {
|
|
|
57
57
|
const userService = typedi_1.Container.get(user_1.default);
|
|
58
58
|
const openService = typedi_1.Container.get(open_1.default);
|
|
59
59
|
// 初始化增加系统配置
|
|
60
|
-
|
|
61
|
-
where: { name: 'system' },
|
|
62
|
-
}))) === null || _a === void 0 ? void 0 : _a.get({ plain: true });
|
|
63
|
-
if (!systemApp) {
|
|
64
|
-
systemApp = await open_2.AppModel.create({
|
|
65
|
-
name: 'system',
|
|
66
|
-
scopes: ['crons', 'system', 'dashboard'],
|
|
67
|
-
client_id: (0, util_1.createRandomString)(12, 12),
|
|
68
|
-
client_secret: (0, util_1.createRandomString)(24, 24),
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
else if (!systemApp.scopes.includes('dashboard')) {
|
|
72
|
-
await open_2.AppModel.update({ scopes: [...systemApp.scopes, 'dashboard'] }, { where: { name: 'system' } });
|
|
73
|
-
}
|
|
60
|
+
await openService.initializeSystemApp();
|
|
74
61
|
const [systemConfig] = await system_1.SystemModel.findOrCreate({
|
|
75
62
|
where: { type: system_1.AuthDataType.systemConfig },
|
|
76
63
|
});
|
|
@@ -118,22 +105,22 @@ exports.default = async () => {
|
|
|
118
105
|
}, 5000);
|
|
119
106
|
};
|
|
120
107
|
// 初始化更新 linux/python/nodejs 镜像源配置
|
|
121
|
-
if ((
|
|
108
|
+
if ((_a = systemConfig.info) === null || _a === void 0 ? void 0 : _a.pythonMirror) {
|
|
122
109
|
systemService.updatePythonMirror({
|
|
123
|
-
pythonMirror: (
|
|
110
|
+
pythonMirror: (_b = systemConfig.info) === null || _b === void 0 ? void 0 : _b.pythonMirror,
|
|
124
111
|
});
|
|
125
112
|
}
|
|
126
|
-
if ((
|
|
113
|
+
if ((_c = systemConfig.info) === null || _c === void 0 ? void 0 : _c.linuxMirror) {
|
|
127
114
|
systemService.updateLinuxMirror({
|
|
128
|
-
linuxMirror: (
|
|
115
|
+
linuxMirror: (_d = systemConfig.info) === null || _d === void 0 ? void 0 : _d.linuxMirror,
|
|
129
116
|
}, undefined, () => installDependencies());
|
|
130
117
|
}
|
|
131
118
|
else {
|
|
132
119
|
installDependencies();
|
|
133
120
|
}
|
|
134
|
-
if ((
|
|
121
|
+
if ((_e = systemConfig.info) === null || _e === void 0 ? void 0 : _e.nodeMirror) {
|
|
135
122
|
systemService.updateNodeMirror({
|
|
136
|
-
nodeMirror: (
|
|
123
|
+
nodeMirror: (_f = systemConfig.info) === null || _f === void 0 ? void 0 : _f.nodeMirror,
|
|
137
124
|
});
|
|
138
125
|
}
|
|
139
126
|
// 初始化新增默认全部任务视图
|
|
@@ -152,7 +139,11 @@ exports.default = async () => {
|
|
|
152
139
|
// 初始化更新所有任务状态为空闲
|
|
153
140
|
await cron_1.CrontabModel.update({ status: cron_1.CrontabStatus.idle }, { where: {} });
|
|
154
141
|
// 清空所有运行中的实例记录(服务重启后进程已不存在)
|
|
155
|
-
await runningInstance_1.RunningInstanceModel.update({
|
|
142
|
+
await runningInstance_1.RunningInstanceModel.update({
|
|
143
|
+
status: runningInstance_1.InstanceStatus.stopped,
|
|
144
|
+
finished_at: Math.floor(Date.now() / 1000),
|
|
145
|
+
// The previous process's exit code cannot be recovered after a restart.
|
|
146
|
+
}, { where: { status: runningInstance_1.InstanceStatus.running } });
|
|
156
147
|
// 初始化时执行一次所有的 ql repo 任务
|
|
157
148
|
cron_1.CrontabModel.findAll({
|
|
158
149
|
where: {
|
|
@@ -206,24 +197,26 @@ exports.default = async () => {
|
|
|
206
197
|
}
|
|
207
198
|
}
|
|
208
199
|
});
|
|
209
|
-
//
|
|
210
|
-
|
|
211
|
-
|
|
200
|
+
// 初始化语言(必须在 autosave_crontab 之前)
|
|
201
|
+
const lang = ((_g = systemConfig.info) === null || _g === void 0 ? void 0 : _g.lang) || (0, i18n_1.systemLang)();
|
|
202
|
+
(0, i18n_1.setLang)(lang);
|
|
203
|
+
// 确保 lang_env.sh 存在
|
|
212
204
|
try {
|
|
213
205
|
const langEnvExist = await (0, util_1.fileExist)(config_1.default.langEnvFile);
|
|
214
206
|
if (!langEnvExist) {
|
|
215
|
-
const lang = ((_h = systemConfig.info) === null || _h === void 0 ? void 0 : _h.lang) || 'zh';
|
|
216
207
|
await (0, promises_1.writeFile)(config_1.default.langEnvFile, `export QL_LANG='${lang}'\n`);
|
|
217
208
|
}
|
|
218
209
|
}
|
|
219
|
-
catch (
|
|
220
|
-
|
|
210
|
+
catch (_h) { }
|
|
211
|
+
// 初始化保存一次ck和定时任务数据
|
|
212
|
+
client_1.default.readiness.configure(async () => {
|
|
213
|
+
await cronService.autosave_crontab(true);
|
|
214
|
+
await systemService.restoreCronConcurrency();
|
|
215
|
+
});
|
|
216
|
+
await client_1.default.readiness.recover();
|
|
221
217
|
await envService.set_envs();
|
|
222
218
|
const authInfo = await userService.getAuthInfo();
|
|
223
|
-
const apps = await openService.findApps();
|
|
224
219
|
await store_1.shareStore.updateAuthInfo(authInfo);
|
|
225
|
-
|
|
226
|
-
await store_1.shareStore.updateApps(apps);
|
|
227
|
-
}
|
|
220
|
+
await openService.refreshApps();
|
|
228
221
|
};
|
|
229
222
|
//# sourceMappingURL=initData.js.map
|
|
@@ -11,6 +11,9 @@ const sshKey_1 = __importDefault(require("../services/sshKey"));
|
|
|
11
11
|
const config_1 = __importDefault(require("../config"));
|
|
12
12
|
const util_1 = require("../config/util");
|
|
13
13
|
const path_1 = require("path");
|
|
14
|
+
const i18n_1 = require("../shared/i18n");
|
|
15
|
+
const logger_1 = __importDefault(require("./logger"));
|
|
16
|
+
const subscriptionPath_1 = require("../shared/subscriptionPath");
|
|
14
17
|
exports.default = async () => {
|
|
15
18
|
const systemService = typedi_1.Container.get(system_1.default);
|
|
16
19
|
const scheduleService = typedi_1.Container.get(schedule_1.default);
|
|
@@ -22,9 +25,10 @@ exports.default = async () => {
|
|
|
22
25
|
if (await (0, util_1.fileExist)(tokenFile)) {
|
|
23
26
|
tokenCommand = `node ${tokenFile}`;
|
|
24
27
|
}
|
|
28
|
+
tokenCommand += ' --renew';
|
|
25
29
|
const cron = {
|
|
26
30
|
id: NaN,
|
|
27
|
-
name: '生成token',
|
|
31
|
+
name: (0, i18n_1.t)('生成token'),
|
|
28
32
|
command: tokenCommand,
|
|
29
33
|
runOrigin: 'system',
|
|
30
34
|
};
|
|
@@ -38,7 +42,7 @@ exports.default = async () => {
|
|
|
38
42
|
if (data.info.logRemoveFrequency) {
|
|
39
43
|
const rmlogCron = {
|
|
40
44
|
id: data.id,
|
|
41
|
-
name: '删除日志',
|
|
45
|
+
name: (0, i18n_1.t)('删除日志'),
|
|
42
46
|
command: `ql rmlog ${data.info.logRemoveFrequency}`,
|
|
43
47
|
runOrigin: 'system',
|
|
44
48
|
};
|
|
@@ -56,7 +60,14 @@ exports.default = async () => {
|
|
|
56
60
|
await subscriptionService.setSshConfig();
|
|
57
61
|
const subs = await subscriptionService.list();
|
|
58
62
|
for (const sub of subs) {
|
|
59
|
-
|
|
63
|
+
try {
|
|
64
|
+
const doc = sub.get({ plain: true });
|
|
65
|
+
(0, subscriptionPath_1.assertSubscriptionAlias)(doc.alias);
|
|
66
|
+
await subscriptionService.handleTask(doc, !sub.is_disabled);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
logger_1.default.warn('跳过订阅 %s 的无效定时配置: %s', sub.id, error);
|
|
70
|
+
}
|
|
60
71
|
}
|
|
61
72
|
};
|
|
62
73
|
//# sourceMappingURL=initTask.js.map
|
|
@@ -7,7 +7,7 @@ const logger_1 = __importDefault(require("./logger"));
|
|
|
7
7
|
const sock_1 = __importDefault(require("./sock"));
|
|
8
8
|
exports.default = async ({ server }) => {
|
|
9
9
|
await (0, sock_1.default)({ server });
|
|
10
|
-
logger_1.default.info('
|
|
10
|
+
logger_1.default.info('[boot] Sock loaded');
|
|
11
11
|
process.on('uncaughtException', (error) => {
|
|
12
12
|
logger_1.default.error('Uncaught exception:', error);
|
|
13
13
|
});
|
|
@@ -11,23 +11,89 @@ const store_1 = require("../shared/store");
|
|
|
11
11
|
const auth_1 = require("../shared/auth");
|
|
12
12
|
const config_1 = __importDefault(require("../config"));
|
|
13
13
|
exports.default = async ({ server }) => {
|
|
14
|
-
const echo = sockjs_1.default.createServer({
|
|
14
|
+
const echo = sockjs_1.default.createServer({
|
|
15
|
+
prefix: `${config_1.default.baseUrl}/api/ws`,
|
|
16
|
+
log: () => { },
|
|
17
|
+
});
|
|
15
18
|
const sockService = typedi_1.Container.get(sock_1.default);
|
|
19
|
+
const sessions = new Map();
|
|
20
|
+
let sessionTimer;
|
|
21
|
+
let checking = false;
|
|
22
|
+
const checkSessions = async () => {
|
|
23
|
+
if (checking || sessions.size === 0)
|
|
24
|
+
return;
|
|
25
|
+
checking = true;
|
|
26
|
+
// Connections accepted during this read must not use an older snapshot.
|
|
27
|
+
const batch = [...sessions];
|
|
28
|
+
try {
|
|
29
|
+
const current = await store_1.shareStore.getAuthInfo();
|
|
30
|
+
// Reuse validation only within this synchronous check of one auth snapshot.
|
|
31
|
+
const validated = new Map();
|
|
32
|
+
for (const [conn, { token, platform }] of batch) {
|
|
33
|
+
if (!sessions.has(conn))
|
|
34
|
+
continue;
|
|
35
|
+
let platforms = validated.get(token);
|
|
36
|
+
if (!platforms) {
|
|
37
|
+
platforms = new Map();
|
|
38
|
+
validated.set(token, platforms);
|
|
39
|
+
}
|
|
40
|
+
let valid = platforms.get(platform);
|
|
41
|
+
if (valid === undefined) {
|
|
42
|
+
valid = (0, auth_1.isValidToken)(current, token, platform, config_1.default.jwt.secret);
|
|
43
|
+
platforms.set(platform, valid);
|
|
44
|
+
}
|
|
45
|
+
if (!valid)
|
|
46
|
+
conn.close('401');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (_a) {
|
|
50
|
+
for (const [conn] of batch) {
|
|
51
|
+
if (sessions.has(conn))
|
|
52
|
+
conn.close('401');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
checking = false;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
16
59
|
echo.on('connection', async (conn) => {
|
|
17
60
|
if (!conn.headers || !conn.url || !conn.pathname) {
|
|
18
61
|
conn.close('404');
|
|
62
|
+
return;
|
|
19
63
|
}
|
|
20
|
-
|
|
64
|
+
let closed = false;
|
|
65
|
+
conn.on('close', () => {
|
|
66
|
+
closed = true;
|
|
67
|
+
sessions.delete(conn);
|
|
68
|
+
sockService.removeClient(conn);
|
|
69
|
+
if (sessions.size === 0 && sessionTimer) {
|
|
70
|
+
clearInterval(sessionTimer);
|
|
71
|
+
sessionTimer = undefined;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
let authInfo;
|
|
75
|
+
try {
|
|
76
|
+
authInfo = await store_1.shareStore.getAuthInfo();
|
|
77
|
+
}
|
|
78
|
+
catch (_a) {
|
|
79
|
+
if (!closed)
|
|
80
|
+
conn.close('401');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (closed)
|
|
84
|
+
return;
|
|
21
85
|
const platform = (0, util_1.getPlatform)(conn.headers['user-agent'] || '') || 'desktop';
|
|
22
86
|
const headerToken = conn.url.replace(`${conn.pathname}?token=`, '');
|
|
23
|
-
if ((0, auth_1.isValidToken)(authInfo, headerToken, platform)) {
|
|
87
|
+
if ((0, auth_1.isValidToken)(authInfo, headerToken, platform, config_1.default.jwt.secret)) {
|
|
24
88
|
sockService.addClient(conn);
|
|
89
|
+
sessions.set(conn, { token: headerToken, platform });
|
|
90
|
+
if (!sessionTimer) {
|
|
91
|
+
sessionTimer = setInterval(checkSessions, 1000);
|
|
92
|
+
sessionTimer.unref();
|
|
93
|
+
}
|
|
25
94
|
conn.on('data', (message) => {
|
|
26
95
|
conn.write(message);
|
|
27
96
|
});
|
|
28
|
-
conn.on('close', function () {
|
|
29
|
-
sockService.removeClient(conn);
|
|
30
|
-
});
|
|
31
97
|
return;
|
|
32
98
|
}
|
|
33
99
|
conn.close('404');
|
|
@@ -3,28 +3,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.monitoringMiddleware = void 0;
|
|
7
7
|
const logger_1 = __importDefault(require("../loaders/logger"));
|
|
8
8
|
const perf_hooks_1 = require("perf_hooks");
|
|
9
9
|
const metrics_1 = require("../services/metrics");
|
|
10
|
-
const
|
|
10
|
+
const UNMONITORED_PATH_SUFFIXES = ['/api/health', '/open/health'];
|
|
11
|
+
const HTTP_METRIC_SAMPLE_INTERVAL = 10;
|
|
12
|
+
let requestSampleOffset = 0;
|
|
11
13
|
const monitoringMiddleware = (req, res, next) => {
|
|
14
|
+
if (UNMONITORED_PATH_SUFFIXES.some((path) => req.path.endsWith(path))) {
|
|
15
|
+
return next();
|
|
16
|
+
}
|
|
12
17
|
const start = perf_hooks_1.performance.now();
|
|
13
18
|
const originalEnd = res.end;
|
|
14
19
|
res.end = function (chunk, encoding, cb) {
|
|
15
20
|
const duration = perf_hooks_1.performance.now() - start;
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
statusCode: res.statusCode,
|
|
21
|
-
timestamp: Date.now(),
|
|
22
|
-
platform: req.platform,
|
|
23
|
-
};
|
|
24
|
-
requestMetrics.push(metric);
|
|
25
|
-
metrics_1.metricsService.record('http_request', duration, Object.assign({ method: req.method, path: req.path, statusCode: res.statusCode.toString() }, (req.platform && { platform: req.platform })));
|
|
26
|
-
if (requestMetrics.length > 1000) {
|
|
27
|
-
requestMetrics.shift();
|
|
21
|
+
const shouldSample = requestSampleOffset === 0;
|
|
22
|
+
requestSampleOffset =
|
|
23
|
+
(requestSampleOffset + 1) % HTTP_METRIC_SAMPLE_INTERVAL;
|
|
24
|
+
if (shouldSample) {
|
|
25
|
+
metrics_1.metricsService.record('http_request', duration, Object.assign({ method: req.method, path: req.path, statusCode: res.statusCode.toString() }, (req.platform && { platform: req.platform })));
|
|
28
26
|
}
|
|
29
27
|
if (duration > 1000) {
|
|
30
28
|
logger_1.default.warn(`Slow request detected: ${req.method} ${req.path} took ${duration.toFixed(2)}ms`);
|
|
@@ -34,23 +32,4 @@ const monitoringMiddleware = (req, res, next) => {
|
|
|
34
32
|
next();
|
|
35
33
|
};
|
|
36
34
|
exports.monitoringMiddleware = monitoringMiddleware;
|
|
37
|
-
const getMetrics = () => {
|
|
38
|
-
return {
|
|
39
|
-
totalRequests: requestMetrics.length,
|
|
40
|
-
averageDuration: requestMetrics.reduce((acc, curr) => acc + curr.duration, 0) /
|
|
41
|
-
requestMetrics.length,
|
|
42
|
-
requestsByMethod: requestMetrics.reduce((acc, curr) => {
|
|
43
|
-
acc[curr.method] = (acc[curr.method] || 0) + 1;
|
|
44
|
-
return acc;
|
|
45
|
-
}, {}),
|
|
46
|
-
requestsByPlatform: requestMetrics.reduce((acc, curr) => {
|
|
47
|
-
if (curr.platform) {
|
|
48
|
-
acc[curr.platform] = (acc[curr.platform] || 0) + 1;
|
|
49
|
-
}
|
|
50
|
-
return acc;
|
|
51
|
-
}, {}),
|
|
52
|
-
recentRequests: requestMetrics.slice(-10),
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
exports.getMetrics = getMetrics;
|
|
56
35
|
//# sourceMappingURL=monitoring.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function protectedPathCase(req, res, next) {
|
|
4
|
+
const originalPath = req.path;
|
|
5
|
+
const normalizedPath = originalPath.toLowerCase();
|
|
6
|
+
if (originalPath !== normalizedPath &&
|
|
7
|
+
(normalizedPath.startsWith('/api/') ||
|
|
8
|
+
normalizedPath.startsWith('/open/'))) {
|
|
9
|
+
return res.status(400).json({
|
|
10
|
+
code: 400,
|
|
11
|
+
message: 'Invalid path format',
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return next();
|
|
15
|
+
}
|
|
16
|
+
exports.default = protectedPathCase;
|
|
17
|
+
//# sourceMappingURL=protectedPathCase.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sequelize_1 = require("sequelize");
|
|
4
|
+
const i18n_1 = require("../shared/i18n");
|
|
5
|
+
// Handle the database constraint itself so concurrent writes are covered too.
|
|
6
|
+
const uniqueConstraintError = (err, req, res, next) => {
|
|
7
|
+
if (!(err instanceof sequelize_1.UniqueConstraintError))
|
|
8
|
+
return next(err);
|
|
9
|
+
// Constraint details can contain environment values or application credentials.
|
|
10
|
+
res
|
|
11
|
+
.status(409)
|
|
12
|
+
.json({ code: 409, message: (0, i18n_1.t)('资源已存在,请检查重复的名称或值') });
|
|
13
|
+
};
|
|
14
|
+
exports.default = uniqueConstraintError;
|
|
15
|
+
//# sourceMappingURL=uniqueConstraintError.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.6.1
|
|
5
|
-
// protoc v3.
|
|
5
|
+
// protoc v3.17.3
|
|
6
6
|
// source: back/protos/api.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.ApiClient = exports.ApiService = exports.SystemNotifyRequest = exports.NotificationInfo = exports.CronDetailResponse = exports.CronDetailRequest = exports.CronResponse = exports.CronsResponse = exports.RunCronsRequest = exports.DisableCronsRequest = exports.EnableCronsRequest = exports.GetCronByIdRequest = exports.GetCronsRequest = exports.DeleteCronsRequest = exports.UpdateCronRequest = exports.CreateCronRequest = exports.CronItem = exports.ExtraScheduleItem = exports.Response = exports.EnvResponse = exports.EnvsResponse = exports.GetEnvByIdRequest = exports.UpdateEnvNamesRequest = exports.EnableEnvsRequest = exports.DisableEnvsRequest = exports.MoveEnvRequest = exports.DeleteEnvsRequest = exports.UpdateEnvRequest = exports.CreateEnvRequest = exports.GetEnvsRequest = exports.EnvItem = exports.notificationModeToJSON = exports.notificationModeFromJSON = exports.NotificationMode = exports.protobufPackage = void 0;
|
|
@@ -33,6 +33,8 @@ var NotificationMode;
|
|
|
33
33
|
NotificationMode[NotificationMode["chronocat"] = 18] = "chronocat";
|
|
34
34
|
NotificationMode[NotificationMode["ntfy"] = 19] = "ntfy";
|
|
35
35
|
NotificationMode[NotificationMode["wxPusherBot"] = 20] = "wxPusherBot";
|
|
36
|
+
NotificationMode[NotificationMode["wxPusherSpt"] = 21] = "wxPusherSpt";
|
|
37
|
+
NotificationMode[NotificationMode["wpush"] = 22] = "wpush";
|
|
36
38
|
NotificationMode[NotificationMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
39
|
})(NotificationMode || (exports.NotificationMode = NotificationMode = {}));
|
|
38
40
|
function notificationModeFromJSON(object) {
|
|
@@ -100,6 +102,12 @@ function notificationModeFromJSON(object) {
|
|
|
100
102
|
case 20:
|
|
101
103
|
case "wxPusherBot":
|
|
102
104
|
return NotificationMode.wxPusherBot;
|
|
105
|
+
case 21:
|
|
106
|
+
case "wxPusherSpt":
|
|
107
|
+
return NotificationMode.wxPusherSpt;
|
|
108
|
+
case 22:
|
|
109
|
+
case "wpush":
|
|
110
|
+
return NotificationMode.wpush;
|
|
103
111
|
case -1:
|
|
104
112
|
case "UNRECOGNIZED":
|
|
105
113
|
default:
|
|
@@ -151,6 +159,10 @@ function notificationModeToJSON(object) {
|
|
|
151
159
|
return "ntfy";
|
|
152
160
|
case NotificationMode.wxPusherBot:
|
|
153
161
|
return "wxPusherBot";
|
|
162
|
+
case NotificationMode.wxPusherSpt:
|
|
163
|
+
return "wxPusherSpt";
|
|
164
|
+
case NotificationMode.wpush:
|
|
165
|
+
return "wpush";
|
|
154
166
|
case NotificationMode.UNRECOGNIZED:
|
|
155
167
|
default:
|
|
156
168
|
return "UNRECOGNIZED";
|
|
@@ -2495,6 +2507,10 @@ function createBaseNotificationInfo() {
|
|
|
2495
2507
|
wxPusherBotAppToken: undefined,
|
|
2496
2508
|
wxPusherBotTopicIds: undefined,
|
|
2497
2509
|
wxPusherBotUids: undefined,
|
|
2510
|
+
wxPusherSptList: undefined,
|
|
2511
|
+
wpushApiKey: undefined,
|
|
2512
|
+
wpushChannel: undefined,
|
|
2513
|
+
wpushTopicCode: undefined,
|
|
2498
2514
|
};
|
|
2499
2515
|
}
|
|
2500
2516
|
exports.NotificationInfo = {
|
|
@@ -2706,6 +2722,18 @@ exports.NotificationInfo = {
|
|
|
2706
2722
|
if (message.wxPusherBotUids !== undefined) {
|
|
2707
2723
|
writer.uint32(546).string(message.wxPusherBotUids);
|
|
2708
2724
|
}
|
|
2725
|
+
if (message.wxPusherSptList !== undefined) {
|
|
2726
|
+
writer.uint32(562).string(message.wxPusherSptList);
|
|
2727
|
+
}
|
|
2728
|
+
if (message.wpushApiKey !== undefined) {
|
|
2729
|
+
writer.uint32(570).string(message.wpushApiKey);
|
|
2730
|
+
}
|
|
2731
|
+
if (message.wpushChannel !== undefined) {
|
|
2732
|
+
writer.uint32(578).string(message.wpushChannel);
|
|
2733
|
+
}
|
|
2734
|
+
if (message.wpushTopicCode !== undefined) {
|
|
2735
|
+
writer.uint32(586).string(message.wpushTopicCode);
|
|
2736
|
+
}
|
|
2709
2737
|
return writer;
|
|
2710
2738
|
},
|
|
2711
2739
|
decode(input, length) {
|
|
@@ -3198,6 +3226,34 @@ exports.NotificationInfo = {
|
|
|
3198
3226
|
message.wxPusherBotUids = reader.string();
|
|
3199
3227
|
continue;
|
|
3200
3228
|
}
|
|
3229
|
+
case 70: {
|
|
3230
|
+
if (tag !== 562) {
|
|
3231
|
+
break;
|
|
3232
|
+
}
|
|
3233
|
+
message.wxPusherSptList = reader.string();
|
|
3234
|
+
continue;
|
|
3235
|
+
}
|
|
3236
|
+
case 71: {
|
|
3237
|
+
if (tag !== 570) {
|
|
3238
|
+
break;
|
|
3239
|
+
}
|
|
3240
|
+
message.wpushApiKey = reader.string();
|
|
3241
|
+
continue;
|
|
3242
|
+
}
|
|
3243
|
+
case 72: {
|
|
3244
|
+
if (tag !== 578) {
|
|
3245
|
+
break;
|
|
3246
|
+
}
|
|
3247
|
+
message.wpushChannel = reader.string();
|
|
3248
|
+
continue;
|
|
3249
|
+
}
|
|
3250
|
+
case 73: {
|
|
3251
|
+
if (tag !== 586) {
|
|
3252
|
+
break;
|
|
3253
|
+
}
|
|
3254
|
+
message.wpushTopicCode = reader.string();
|
|
3255
|
+
continue;
|
|
3256
|
+
}
|
|
3201
3257
|
}
|
|
3202
3258
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3203
3259
|
break;
|
|
@@ -3289,6 +3345,10 @@ exports.NotificationInfo = {
|
|
|
3289
3345
|
? globalThis.String(object.wxPusherBotTopicIds)
|
|
3290
3346
|
: undefined,
|
|
3291
3347
|
wxPusherBotUids: isSet(object.wxPusherBotUids) ? globalThis.String(object.wxPusherBotUids) : undefined,
|
|
3348
|
+
wxPusherSptList: isSet(object.wxPusherSptList) ? globalThis.String(object.wxPusherSptList) : undefined,
|
|
3349
|
+
wpushApiKey: isSet(object.wpushApiKey) ? globalThis.String(object.wpushApiKey) : undefined,
|
|
3350
|
+
wpushChannel: isSet(object.wpushChannel) ? globalThis.String(object.wpushChannel) : undefined,
|
|
3351
|
+
wpushTopicCode: isSet(object.wpushTopicCode) ? globalThis.String(object.wpushTopicCode) : undefined,
|
|
3292
3352
|
};
|
|
3293
3353
|
},
|
|
3294
3354
|
toJSON(message) {
|
|
@@ -3500,13 +3560,25 @@ exports.NotificationInfo = {
|
|
|
3500
3560
|
if (message.wxPusherBotUids !== undefined) {
|
|
3501
3561
|
obj.wxPusherBotUids = message.wxPusherBotUids;
|
|
3502
3562
|
}
|
|
3563
|
+
if (message.wxPusherSptList !== undefined) {
|
|
3564
|
+
obj.wxPusherSptList = message.wxPusherSptList;
|
|
3565
|
+
}
|
|
3566
|
+
if (message.wpushApiKey !== undefined) {
|
|
3567
|
+
obj.wpushApiKey = message.wpushApiKey;
|
|
3568
|
+
}
|
|
3569
|
+
if (message.wpushChannel !== undefined) {
|
|
3570
|
+
obj.wpushChannel = message.wpushChannel;
|
|
3571
|
+
}
|
|
3572
|
+
if (message.wpushTopicCode !== undefined) {
|
|
3573
|
+
obj.wpushTopicCode = message.wpushTopicCode;
|
|
3574
|
+
}
|
|
3503
3575
|
return obj;
|
|
3504
3576
|
},
|
|
3505
3577
|
create(base) {
|
|
3506
3578
|
return exports.NotificationInfo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
3507
3579
|
},
|
|
3508
3580
|
fromPartial(object) {
|
|
3509
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44;
|
|
3581
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48;
|
|
3510
3582
|
const message = createBaseNotificationInfo();
|
|
3511
3583
|
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : 0;
|
|
3512
3584
|
message.gotifyUrl = (_b = object.gotifyUrl) !== null && _b !== void 0 ? _b : undefined;
|
|
@@ -3577,6 +3649,10 @@ exports.NotificationInfo = {
|
|
|
3577
3649
|
message.wxPusherBotAppToken = (_42 = object.wxPusherBotAppToken) !== null && _42 !== void 0 ? _42 : undefined;
|
|
3578
3650
|
message.wxPusherBotTopicIds = (_43 = object.wxPusherBotTopicIds) !== null && _43 !== void 0 ? _43 : undefined;
|
|
3579
3651
|
message.wxPusherBotUids = (_44 = object.wxPusherBotUids) !== null && _44 !== void 0 ? _44 : undefined;
|
|
3652
|
+
message.wxPusherSptList = (_45 = object.wxPusherSptList) !== null && _45 !== void 0 ? _45 : undefined;
|
|
3653
|
+
message.wpushApiKey = (_46 = object.wpushApiKey) !== null && _46 !== void 0 ? _46 : undefined;
|
|
3654
|
+
message.wpushChannel = (_47 = object.wpushChannel) !== null && _47 !== void 0 ? _47 : undefined;
|
|
3655
|
+
message.wpushTopicCode = (_48 = object.wpushTopicCode) !== null && _48 !== void 0 ? _48 : undefined;
|
|
3580
3656
|
return message;
|
|
3581
3657
|
},
|
|
3582
3658
|
};
|