diff --git a/extra/compile-install-script.ps1 b/extra/compile-install-script.ps1 new file mode 100644 index 00000000..4b25b55a --- /dev/null +++ b/extra/compile-install-script.ps1 @@ -0,0 +1 @@ +docker run -it --rm -v ${pwd}:/app louislam/batsh /usr/bin/batsh bash --output ./install.sh ./extra/install.batsh \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5956149b..c3fbf063 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "uptime-kuma", - "version": "1.0.10", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -966,24 +966,24 @@ "dev": true }, "@vue/compiler-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.1.5.tgz", - "integrity": "sha512-TXBhFinoBaXKDykJzY26UEuQU1K07FOp/0Ie+OXySqqk0bS0ZO7Xvl7UmiTUPYcLrWbxWBR7Bs/y55AI0MNc2Q==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.1.tgz", + "integrity": "sha512-UEJf2ZGww5wGVdrWIXIZo04KdJFGPmI2bHRUsBZ3AdyCAqJ5ykRXKOBn1OR1hvA2YzimudOEyHM+DpbBv91Kww==", "requires": { "@babel/parser": "^7.12.0", "@babel/types": "^7.12.0", - "@vue/shared": "3.1.5", + "@vue/shared": "3.2.1", "estree-walker": "^2.0.1", "source-map": "^0.6.1" } }, "@vue/compiler-dom": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.1.5.tgz", - "integrity": "sha512-ZsL3jqJ52OjGU/YiT/9XiuZAmWClKInZM2aFJh9gnsAPqOrj2JIELMbkIFpVKR/CrVO/f2VxfPiiQdQTr65jcQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.1.tgz", + "integrity": "sha512-tXg8tkPb3j54zNfWqoao9T1JI41yWPz8TROzmif/QNNA46eq8/SRuRsBd36i47GWaz7mh+yg3vOJ87/YBjcMyQ==", "requires": { - "@vue/compiler-core": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/compiler-core": "3.2.1", + "@vue/shared": "3.2.1" } }, "@vue/compiler-sfc": { @@ -1089,36 +1089,36 @@ "integrity": "sha512-44fPrrN1cqcs6bFkT0C+yxTM6PZXLbR+ESh1U1j8UD22yO04gXvxH62HApMjLbS3WqJO/iCNC+CYT+evPQh2EQ==" }, "@vue/reactivity": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", - "integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.1.tgz", + "integrity": "sha512-4Lja2KmyiKvuraDed6dXK2A6+r/7x7xGDA7vVR2Aqc8hQVu0+FWeVX+IBfiVOSpbZXFlHLNmCBFkbuWLQSlgxg==", "requires": { - "@vue/shared": "3.1.5" + "@vue/shared": "3.2.1" } }, "@vue/runtime-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.1.5.tgz", - "integrity": "sha512-YQbG5cBktN1RowQDKA22itmvQ+b40f0WgQ6CXK4VYoYICAiAfu6Cc14777ve8zp1rJRGtk5oIeS149TOculrTg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.1.tgz", + "integrity": "sha512-IsgelRM/5hYeRhz5+ECi66XvYDdjG2t4lARjHvCXw5s9Q4N6uIbjLMwtLzAWRxYf3/y258BrD+ehxAi943ScJg==", "requires": { - "@vue/reactivity": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/reactivity": "3.2.1", + "@vue/shared": "3.2.1" } }, "@vue/runtime-dom": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.1.5.tgz", - "integrity": "sha512-tNcf3JhVR0RfW0kw1p8xZgv30nvX8Y9rsz7eiQ0dHe273sfoCngAG0y4GvMaY4Xd8FsjUwFedd4suQ8Lu8meXg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.1.tgz", + "integrity": "sha512-bUAHUSe49A5wYdHQ8wsLU1CMPXaG2fRuv2661mx/6Q9+20QxglT3ss8ZeL6AVRu16JNJMcdvTTsNpbnMbVc/lQ==", "requires": { - "@vue/runtime-core": "3.1.5", - "@vue/shared": "3.1.5", + "@vue/runtime-core": "3.2.1", + "@vue/shared": "3.2.1", "csstype": "^2.6.8" } }, "@vue/shared": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", - "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.1.tgz", + "integrity": "sha512-INN92dVBNgd0TW9BqfQQKx/HWGCHhUUbAV5EZ5FgSCiEdwuZsJbGt1mdnaD9IxGhpiyOjP2ClxGG8SFp7ELcWg==" }, "abbrev": { "version": "1.1.1", @@ -6805,13 +6805,13 @@ } }, "vue": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.1.5.tgz", - "integrity": "sha512-Ho7HNb1nfDoO+HVb6qYZgeaobt1XbY6KXFe4HGs1b9X6RhkWG/113n4/SrtM1LUclM6OrP/Se5aPHHvAPG1iVQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.1.tgz", + "integrity": "sha512-0jhXluF5mzTAK5bXw/8yq4McvsI8HwEWI4cnQwJeN8NYGRbwh9wwuE4FNv1Kej9pxBB5ajTNsWr0M6DPs5EJZg==", "requires": { - "@vue/compiler-dom": "3.1.5", - "@vue/runtime-dom": "3.1.5", - "@vue/shared": "3.1.5" + "@vue/compiler-dom": "3.2.1", + "@vue/runtime-dom": "3.2.1", + "@vue/shared": "3.2.1" } }, "vue-confirm-dialog": { diff --git a/package.json b/package.json index dda21438..0f8929b5 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dev": "vite --host", "start": "npm run start-server", "start-server": "node server/server.js", + "start-demo-server": "set NODE_ENV=demo && node server/server.js", "update": "", "build": "vite build", "vite-preview-dist": "vite preview --host", @@ -22,7 +23,8 @@ "setup": "git checkout 1.1.0 && npm install && npm run build", "update-version": "node extra/update-version.js", "mark-as-nightly": "node extra/mark-as-nightly.js", - "reset-password": "node extra/reset-password.js" + "reset-password": "node extra/reset-password.js", + "compile-install-script": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command ./extra/compile-install-script.ps1" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.36", @@ -51,7 +53,7 @@ "@louislam/sqlite3": "^5.0.3", "tcp-ping": "^0.1.1", "v-pagination-3": "^0.1.6", - "vue": "^3.1.5", + "vue": "^3.2.1", "vue-confirm-dialog": "^1.0.2", "vue-multiselect": "^3.0.0-alpha.2", "vue-router": "^4.0.10", diff --git a/server/model/monitor.js b/server/model/monitor.js index 2520c282..4c667342 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -11,6 +11,7 @@ const { tcping, ping, checkCertificate, checkStatusCode } = require("../util-ser const { R } = require("redbean-node"); const { BeanModel } = require("redbean-node/dist/bean-model"); const { Notification } = require("../notification") +const version = require("../package.json").version; /** * status: @@ -110,10 +111,10 @@ class Monitor extends BeanModel { // Use Custom agent to disable session reuse // https://github.com/nodejs/node/issues/3940 let res = await axios.get(this.url, { - timeout: 15000, + timeout: this.interval * 1000 * 0.8, headers: { "Accept": "*/*", - "User-Agent": "Uptime-Kuma", + "User-Agent": "Uptime-Kuma/" + version, }, httpsAgent: new https.Agent({ maxCachedSessions: 0,