diff --git a/.docker-mongo/Dockerfile b/.docker-mongo/Dockerfile index 567b09c7730f..19368e8a7201 100644 --- a/.docker-mongo/Dockerfile +++ b/.docker-mongo/Dockerfile @@ -1,4 +1,4 @@ -FROM node:12.16.1-buster-slim +FROM node:12.18.3-buster-slim LABEL maintainer="buildmaster@rocket.chat" diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 4594afe41539..e67d24769078 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:12.16.1-buster-slim +FROM node:12.18.3-buster-slim LABEL maintainer="buildmaster@rocket.chat" diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 4f9dc9ea20cc..59e1fd89d816 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -30,10 +30,10 @@ jobs: echo "github.event_name: ${{ github.event_name }}" cat $GITHUB_EVENT_PATH - - name: Use Node.js 12.16.1 + - name: Use Node.js 12.18.3 uses: actions/setup-node@v1 with: - node-version: "12.16.1" + node-version: "12.18.3" - uses: actions/checkout@v2 @@ -175,7 +175,7 @@ jobs: strategy: matrix: - node-version: ["12.16.1"] + node-version: ["12.18.3"] mongodb-version: ["3.4", "3.6", "4.0"] steps: @@ -290,10 +290,10 @@ jobs: path: ~/.meteor key: ${{ runner.OS }}-meteor-${{ hashFiles('.meteor/release') }}-${{ hashFiles('.github/workflows/build_and_test.yml') }} - - name: Use Node.js 12.16.1 + - name: Use Node.js 12.18.3 uses: actions/setup-node@v1 with: - node-version: "12.16.1" + node-version: "12.18.3" - name: Install Meteor run: | diff --git a/.meteor/packages b/.meteor/packages index 7447d19c9698..2a2c903bbd21 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -9,17 +9,17 @@ accounts-facebook@1.3.2 accounts-github@1.4.3 accounts-google@1.3.3 accounts-meteor-developer@1.4.2 -accounts-password@1.6.0 +accounts-password@1.6.2 accounts-twitter@1.4.2 blaze-html-templates check@1.3.1 -ddp-rate-limiter@1.0.7 +ddp-rate-limiter@1.0.9 ddp-common@1.4.0 dynamic-import@0.5.2 ecmascript@0.14.3 typescript@3.7.6 ejson@1.1.1 -email@1.2.3 +email@2.0.0 fastclick@1.0.13 http@1.4.2 jquery@1.11.10 @@ -70,7 +70,7 @@ littledata:synced-cron edgee:slingshot jalik:ufs-local@1.0.2 -accounts-base@1.6.0 +accounts-base@1.7.0 accounts-oauth@1.2.0 autoupdate@1.6.0 babel-compiler@7.5.3 diff --git a/.meteor/release b/.meteor/release index 3ea26528c096..a94c167a5703 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.10.2 +METEOR@1.11 diff --git a/.meteor/versions b/.meteor/versions index 67b22e07d1c2..f6ad8cbe3539 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,10 +1,10 @@ -accounts-base@1.6.0 +accounts-base@1.7.0 accounts-facebook@1.3.2 accounts-github@1.4.3 accounts-google@1.3.3 accounts-meteor-developer@1.4.2 accounts-oauth@1.2.0 -accounts-password@1.6.1 +accounts-password@1.6.2 accounts-twitter@1.4.2 aldeed:simple-schema@1.5.4 allow-deny@1.1.0 @@ -27,7 +27,7 @@ dandv:caret-position@2.1.1 ddp@1.4.0 ddp-client@2.3.3 ddp-common@1.4.0 -ddp-rate-limiter@1.0.8 +ddp-rate-limiter@1.0.9 ddp-server@2.3.2 deepwell:bootstrap-datepicker2@1.3.0 deps@1.0.12 @@ -36,11 +36,11 @@ dispatch:run-as-user@1.1.1 dynamic-import@0.5.2 ecmascript@0.14.3 ecmascript-runtime@0.7.0 -ecmascript-runtime-client@0.10.0 -ecmascript-runtime-server@0.9.0 +ecmascript-runtime-client@0.11.0 +ecmascript-runtime-server@0.10.0 edgee:slingshot@0.7.1 ejson@1.1.1 -email@1.2.3 +email@2.0.0 es5-shim@4.8.0 facebook-oauth@1.7.0 facts-base@1.0.1 @@ -97,7 +97,7 @@ mystor:device-detection@0.2.0 nimble:restivus@0.8.12 nooitaf:colors@1.1.2_1 npm-bcrypt@0.9.3 -npm-mongo@3.7.1 +npm-mongo@3.8.0 oauth@1.3.0 oauth1@1.3.0 oauth2@1.3.0 diff --git a/.snapcraft/resources/preparenode b/.snapcraft/resources/preparenode index 4af07dea1c3d..fd21f70493e3 100755 --- a/.snapcraft/resources/preparenode +++ b/.snapcraft/resources/preparenode @@ -1,6 +1,6 @@ #!/bin/bash -node_version="v12.16.1" +node_version="v12.18.3" unamem="$(uname -m)" if [[ $unamem == *aarch64* ]]; then diff --git a/app/livechat/server/lib/Helper.js b/app/livechat/server/lib/Helper.js index 4f7d4be897f0..42b6e890da1f 100644 --- a/app/livechat/server/lib/Helper.js +++ b/app/livechat/server/lib/Helper.js @@ -136,10 +136,16 @@ export const createLivechatSubscription = (rid, name, guest, agent) => { return Subscriptions.insert(subscriptionData); }; -export const createLivechatQueueView = () => { +export const createLivechatQueueView = async () => { const { mongo } = MongoInternals.defaultRemoteCollectionDriver(); - mongo.db.createCollection('view_livechat_queue_status', { // name of the view to create + // recreate the view on every startup + const list = await mongo.db.listCollections({ name: 'view_livechat_queue_status' }).toArray(); + if (list.length > 0) { + await mongo.db.dropCollection('view_livechat_queue_status'); + } + + await mongo.db.createCollection('view_livechat_queue_status', { // name of the view to create viewOn: 'rocketchat_room', // name of source collection from which to create the view pipeline: [ { diff --git a/package-lock.json b/package-lock.json index 9de6d5341428..de3fb6b6b264 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5041,6 +5041,11 @@ "uuid": "^3.2.1" }, "dependencies": { + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" + }, "typescript": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", @@ -17890,7 +17895,7 @@ }, "chownr": { "version": "1.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true, "optional": true @@ -17925,7 +17930,7 @@ }, "debug": { "version": "4.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "optional": true, @@ -17956,7 +17961,7 @@ }, "fs-minipass": { "version": "1.2.5", - "resolved": "", + "resolved": false, "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, @@ -17990,7 +17995,7 @@ }, "glob": { "version": "7.1.3", - "resolved": "", + "resolved": false, "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "optional": true, @@ -18022,7 +18027,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": "", + "resolved": false, "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, @@ -18043,7 +18048,7 @@ }, "inherits": { "version": "2.0.3", - "resolved": "", + "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true, "optional": true @@ -18091,7 +18096,7 @@ }, "minipass": { "version": "2.3.5", - "resolved": "", + "resolved": false, "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, "optional": true, @@ -18102,7 +18107,7 @@ }, "minizlib": { "version": "1.2.1", - "resolved": "", + "resolved": false, "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "dev": true, "optional": true, @@ -18122,7 +18127,7 @@ }, "ms": { "version": "2.1.1", - "resolved": "", + "resolved": false, "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true, "optional": true @@ -18136,7 +18141,7 @@ }, "needle": { "version": "2.3.0", - "resolved": "", + "resolved": false, "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "dev": true, "optional": true, @@ -18148,7 +18153,7 @@ }, "node-pre-gyp": { "version": "0.12.0", - "resolved": "", + "resolved": false, "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "dev": true, "optional": true, @@ -18178,14 +18183,14 @@ }, "npm-bundled": { "version": "1.0.6", - "resolved": "", + "resolved": false, "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", - "resolved": "", + "resolved": false, "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "dev": true, "optional": true, @@ -18265,7 +18270,7 @@ }, "process-nextick-args": { "version": "2.0.0", - "resolved": "", + "resolved": false, "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true @@ -18310,7 +18315,7 @@ }, "rimraf": { "version": "2.6.3", - "resolved": "", + "resolved": false, "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "optional": true, @@ -18341,7 +18346,7 @@ }, "semver": { "version": "5.7.0", - "resolved": "", + "resolved": false, "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true, "optional": true @@ -18401,7 +18406,7 @@ }, "tar": { "version": "4.4.8", - "resolved": "", + "resolved": false, "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "dev": true, "optional": true, @@ -18441,7 +18446,7 @@ }, "yallist": { "version": "3.0.3", - "resolved": "", + "resolved": false, "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true, "optional": true