diff --git a/server/config/config.js b/server/config/config.js index a844a39600..23107c5985 100644 --- a/server/config/config.js +++ b/server/config/config.js @@ -3,7 +3,6 @@ module.exports = { dialect: 'sqlite', storage: process.env.SQLITE_FILE_PATH || './gladys-development.db', logging: false, - operatorsAliases: false, define: { underscored: true, freezeTableName: true, @@ -21,7 +20,6 @@ module.exports = { test: { dialect: 'sqlite', storage: process.env.SQLITE_FILE_PATH || ':memory:', - operatorsAliases: false, logging: false, define: { underscored: true, @@ -40,7 +38,6 @@ module.exports = { production: { dialect: 'sqlite', storage: process.env.SQLITE_FILE_PATH || './gladys-production.db', - operatorsAliases: false, logging: false, define: { underscored: true, diff --git a/server/lib/system/system.shutdown.js b/server/lib/system/system.shutdown.js index 980a04a50f..703a7cb351 100644 --- a/server/lib/system/system.shutdown.js +++ b/server/lib/system/system.shutdown.js @@ -4,8 +4,6 @@ * shutdown(); */ async function shutdown() { - // gracefully shutdown db - await this.sequelize.close(); // exit process.exit(); } diff --git a/server/migrations/20190205063641-create-user.js b/server/migrations/20190205063641-create-user.js index 90a20c00df..d9408447a8 100644 --- a/server/migrations/20190205063641-create-user.js +++ b/server/migrations/20190205063641-create-user.js @@ -101,5 +101,5 @@ module.exports = { await queryInterface.addIndex('t_user', ['role']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_user'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_user'), }; diff --git a/server/migrations/20190206102938-create-location.js b/server/migrations/20190206102938-create-location.js index 9c9bb14c92..b5f38e0c5a 100644 --- a/server/migrations/20190206102938-create-location.js +++ b/server/migrations/20190206102938-create-location.js @@ -45,5 +45,5 @@ module.exports = { await queryInterface.addIndex('t_location', ['user_id']); await queryInterface.addIndex('t_location', ['created_at']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_location'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_location'), }; diff --git a/server/migrations/20190206114851-create-house.js b/server/migrations/20190206114851-create-house.js index fd821aa0e9..6077100a44 100644 --- a/server/migrations/20190206114851-create-house.js +++ b/server/migrations/20190206114851-create-house.js @@ -34,5 +34,5 @@ module.exports = { }, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_house'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_house'), }; diff --git a/server/migrations/20190211033038-create-life-event.js b/server/migrations/20190211033038-create-life-event.js index 696b28cf5b..29ee426380 100644 --- a/server/migrations/20190211033038-create-life-event.js +++ b/server/migrations/20190211033038-create-life-event.js @@ -46,5 +46,5 @@ module.exports = { await queryInterface.addIndex('t_life_event', ['house_id']); await queryInterface.addIndex('t_life_event', ['type']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_life_event'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_life_event'), }; diff --git a/server/migrations/20190211034727-create-room.js b/server/migrations/20190211034727-create-room.js index ad40b462b2..d59d0c71b4 100644 --- a/server/migrations/20190211034727-create-room.js +++ b/server/migrations/20190211034727-create-room.js @@ -38,5 +38,5 @@ module.exports = { await queryInterface.addIndex('t_room', ['house_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_room'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_room'), }; diff --git a/server/migrations/20190211035101-create-device.js b/server/migrations/20190211035101-create-device.js index 8a4dfb7218..4bac19a5f2 100644 --- a/server/migrations/20190211035101-create-device.js +++ b/server/migrations/20190211035101-create-device.js @@ -65,5 +65,5 @@ module.exports = { await queryInterface.addIndex('t_device', ['service_id']); await queryInterface.addIndex('t_device', ['room_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_device'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_device'), }; diff --git a/server/migrations/20190211035238-create-device-feature.js b/server/migrations/20190211035238-create-device-feature.js index e7005cdb0d..f0a6331a73 100644 --- a/server/migrations/20190211035238-create-device-feature.js +++ b/server/migrations/20190211035238-create-device-feature.js @@ -85,5 +85,5 @@ module.exports = { await queryInterface.addIndex('t_device_feature', ['device_id']); await queryInterface.addIndex('t_device_feature', ['category']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_device_feature'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_device_feature'), }; diff --git a/server/migrations/20190211041243-create-device-feature-state.js b/server/migrations/20190211041243-create-device-feature-state.js index f747adda89..f78fb7d341 100644 --- a/server/migrations/20190211041243-create-device-feature-state.js +++ b/server/migrations/20190211041243-create-device-feature-state.js @@ -32,5 +32,5 @@ module.exports = { await queryInterface.addIndex('t_device_feature_state', ['device_feature_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_device_feature_state'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_device_feature_state'), }; diff --git a/server/migrations/20190211042223-create-calendar.js b/server/migrations/20190211042223-create-calendar.js index c8045421d6..9e9aa76d13 100644 --- a/server/migrations/20190211042223-create-calendar.js +++ b/server/migrations/20190211042223-create-calendar.js @@ -66,5 +66,5 @@ module.exports = { await queryInterface.addIndex('t_calendar', ['user_id']); await queryInterface.addIndex('t_calendar', ['service_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_calendar'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_calendar'), }; diff --git a/server/migrations/20190211042644-create-calendar-event.js b/server/migrations/20190211042644-create-calendar-event.js index 1b509b2beb..a9ad8ba49d 100644 --- a/server/migrations/20190211042644-create-calendar-event.js +++ b/server/migrations/20190211042644-create-calendar-event.js @@ -58,5 +58,5 @@ module.exports = { await queryInterface.addIndex('t_calendar_event', ['start']); await queryInterface.addIndex('t_calendar_event', ['end']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_calendar_event'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_calendar_event'), }; diff --git a/server/migrations/20190211043231-create-pod.js b/server/migrations/20190211043231-create-pod.js index 500ba1c105..d4f8fe081e 100644 --- a/server/migrations/20190211043231-create-pod.js +++ b/server/migrations/20190211043231-create-pod.js @@ -37,5 +37,5 @@ module.exports = { await queryInterface.addIndex('t_pod', ['room_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_pod'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_pod'), }; diff --git a/server/migrations/20190211043515-create-service.js b/server/migrations/20190211043515-create-service.js index 7b4fb59dff..bbf668e3f3 100644 --- a/server/migrations/20190211043515-create-service.js +++ b/server/migrations/20190211043515-create-service.js @@ -53,5 +53,5 @@ module.exports = { unique: true, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_service'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_service'), }; diff --git a/server/migrations/20190211043957-create-variable.js b/server/migrations/20190211043957-create-variable.js index 62dd7f9e08..166857746d 100644 --- a/server/migrations/20190211043957-create-variable.js +++ b/server/migrations/20190211043957-create-variable.js @@ -48,5 +48,5 @@ module.exports = { unique: true, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_variable'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_variable'), }; diff --git a/server/migrations/20190211044205-create-script.js b/server/migrations/20190211044205-create-script.js index 631e14b170..e4561f710d 100644 --- a/server/migrations/20190211044205-create-script.js +++ b/server/migrations/20190211044205-create-script.js @@ -30,5 +30,5 @@ module.exports = { }, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_script'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_script'), }; diff --git a/server/migrations/20190211044442-create-area.js b/server/migrations/20190211044442-create-area.js index 6296d5a0bd..e676801ca9 100644 --- a/server/migrations/20190211044442-create-area.js +++ b/server/migrations/20190211044442-create-area.js @@ -42,5 +42,5 @@ module.exports = { }, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_area'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_area'), }; diff --git a/server/migrations/20190211044839-create-dashboard.js b/server/migrations/20190211044839-create-dashboard.js index 59238b6c20..aaaefcd1cd 100644 --- a/server/migrations/20190211044839-create-dashboard.js +++ b/server/migrations/20190211044839-create-dashboard.js @@ -34,5 +34,5 @@ module.exports = { }, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_dashboard'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_dashboard'), }; diff --git a/server/migrations/20190211045110-create-scene.js b/server/migrations/20190211045110-create-scene.js index a7a978eb6d..af1ec3beca 100644 --- a/server/migrations/20190211045110-create-scene.js +++ b/server/migrations/20190211045110-create-scene.js @@ -36,5 +36,5 @@ module.exports = { }, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_scene'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_scene'), }; diff --git a/server/migrations/20190211045641-create-trigger.js b/server/migrations/20190211045641-create-trigger.js index de3a2db968..0c163afd0d 100644 --- a/server/migrations/20190211045641-create-trigger.js +++ b/server/migrations/20190211045641-create-trigger.js @@ -41,5 +41,5 @@ module.exports = { }, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_trigger'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_trigger'), }; diff --git a/server/migrations/20190211050844-trigger_scene.js b/server/migrations/20190211050844-trigger_scene.js index db8f857f05..84d61a5939 100644 --- a/server/migrations/20190211050844-trigger_scene.js +++ b/server/migrations/20190211050844-trigger_scene.js @@ -43,5 +43,5 @@ module.exports = { await queryInterface.addIndex('t_trigger_scene', ['trigger_id']); await queryInterface.addIndex('t_trigger_scene', ['scene_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_trigger_scene'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_trigger_scene'), }; diff --git a/server/migrations/20190211051215-create-message.js b/server/migrations/20190211051215-create-message.js index d71a15cec9..ae1ef37919 100644 --- a/server/migrations/20190211051215-create-message.js +++ b/server/migrations/20190211051215-create-message.js @@ -57,5 +57,5 @@ module.exports = { await queryInterface.addIndex('t_message', ['sender_id']); await queryInterface.addIndex('t_message', ['receiver_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_message'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_message'), }; diff --git a/server/migrations/20190212043623-create-session.js b/server/migrations/20190212043623-create-session.js index a2696eb6f1..ad149b11b9 100644 --- a/server/migrations/20190212043623-create-session.js +++ b/server/migrations/20190212043623-create-session.js @@ -51,5 +51,5 @@ module.exports = { await queryInterface.addIndex('t_session', ['user_id']); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_session'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_session'), }; diff --git a/server/migrations/20190318084429-create-device-param.js b/server/migrations/20190318084429-create-device-param.js index 8727c4f160..b8cef37a47 100644 --- a/server/migrations/20190318084429-create-device-param.js +++ b/server/migrations/20190318084429-create-device-param.js @@ -39,5 +39,5 @@ module.exports = { unique: true, }); }, - down: (queryInterface, Sequelize) => queryInterface.dropTable('t_device_param'), + down: async (queryInterface, Sequelize) => queryInterface.dropTable('t_device_param'), }; diff --git a/server/migrations/20200123094438-add-triggers-attribute.js b/server/migrations/20200123094438-add-triggers-attribute.js index 759aa85917..1f77987639 100644 --- a/server/migrations/20200123094438-add-triggers-attribute.js +++ b/server/migrations/20200123094438-add-triggers-attribute.js @@ -8,5 +8,5 @@ module.exports = { // delete useless trigger_scene table await queryInterface.dropTable('t_trigger_scene'); }, - down: (queryInterface, Sequelize) => {}, + down: async (queryInterface, Sequelize) => {}, }; diff --git a/server/migrations/20200201125436-add-caldav-data.js b/server/migrations/20200201125436-add-caldav-data.js index 1d462f1770..04d1008c2a 100644 --- a/server/migrations/20200201125436-add-caldav-data.js +++ b/server/migrations/20200201125436-add-caldav-data.js @@ -10,5 +10,5 @@ module.exports = { ]); }, - down: (queryInterface, Sequelize) => {}, + down: async (queryInterface, Sequelize) => {}, }; diff --git a/server/migrations/20200207214849-add-calendar-event-url.js b/server/migrations/20200207214849-add-calendar-event-url.js index eb4cd3f1b4..f09b38e375 100644 --- a/server/migrations/20200207214849-add-calendar-event-url.js +++ b/server/migrations/20200207214849-add-calendar-event-url.js @@ -7,5 +7,5 @@ module.exports = { ]); }, - down: (queryInterface, Sequelize) => {}, + down: async (queryInterface, Sequelize) => {}, }; diff --git a/server/migrations/20201128203008-add-color-caldav.js b/server/migrations/20201128203008-add-color-caldav.js index 62926cdca0..0e2e0e0414 100644 --- a/server/migrations/20201128203008-add-color-caldav.js +++ b/server/migrations/20201128203008-add-color-caldav.js @@ -7,5 +7,5 @@ module.exports = { ]); }, - down: (queryInterface, Sequelize) => {}, + down: async (queryInterface, Sequelize) => {}, }; diff --git a/server/migrations/20210129155044-multi-user.js b/server/migrations/20210129155044-multi-user.js index 139b090a9e..7f3f7e3caf 100644 --- a/server/migrations/20210129155044-multi-user.js +++ b/server/migrations/20210129155044-multi-user.js @@ -33,5 +33,5 @@ module.exports = { } }, - down: (queryInterface, Sequelize) => {}, + down: async (queryInterface, Sequelize) => {}, }; diff --git a/server/package-lock.json b/server/package-lock.json index b56a71578e..6399099a82 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -347,15 +347,10 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, - "@types/geojson": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", - "integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w==" - }, "@types/node": { - "version": "12.11.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.11.7.tgz", - "integrity": "sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==" + "version": "14.14.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", + "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==" }, "@types/prop-types": { "version": "15.7.3", @@ -492,6 +487,11 @@ "color-convert": "^1.9.0" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -1577,15 +1577,6 @@ } } }, - "cls-bluebird": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cls-bluebird/-/cls-bluebird-2.1.0.tgz", - "integrity": "sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4=", - "requires": { - "is-bluebird": "^1.0.2", - "shimmer": "^1.1.0" - } - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -2258,9 +2249,9 @@ "dev": true }, "dottie": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.1.tgz", - "integrity": "sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.2.tgz", + "integrity": "sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg==" }, "doublearray": { "version": "0.0.2", @@ -3147,9 +3138,9 @@ }, "dependencies": { "type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.3.0.tgz", + "integrity": "sha512-rgPIqOdfK/4J9FhiVrZ3cveAjRRo5rsQBAIhnylX874y1DX/kEKSVdLsnuHB6l1KTjHyU01VjiMBHgU2adejyg==" } } }, @@ -4093,11 +4084,6 @@ "wide-align": "^1.1.0" } }, - "generic-pool": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.5.0.tgz", - "integrity": "sha512-dEkxmX+egB2o4NR80c/q+xzLLzLX+k68/K8xv81XprD+Sk7ZtP14VugeCz+fUwv5FzpWq40pPtAkzPRqT8ka9w==" - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4614,11 +4600,6 @@ "binary-extensions": "^1.0.0" } }, - "is-bluebird": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bluebird/-/is-bluebird-1.0.2.tgz", - "integrity": "sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI=" - }, "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", @@ -4786,7 +4767,8 @@ "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true }, "is-redirect": { "version": "1.0.0", @@ -4970,15 +4952,30 @@ } }, "js-beautify": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.10.3.tgz", - "integrity": "sha512-wfk/IAWobz1TfApSdivH5PJ0miIHgDoYb1ugSqHcODPmaYu46rYe5FVuIEkhjg8IQiv6rDNPyhsqbsohI/C2vQ==", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.13.5.tgz", + "integrity": "sha512-MsXlH6Z/BiRYSkSRW3clNDqDjSpiSNOiG8xYVUBXt4k0LnGvDhlTGOlHX1VFtAdoLmtwjxMG5qiWKy/g+Ipv5w==", "requires": { "config-chain": "^1.1.12", "editorconfig": "^0.15.3", "glob": "^7.1.3", - "mkdirp": "~0.5.1", - "nopt": "~4.0.1" + "mkdirp": "^1.0.4", + "nopt": "^5.0.0" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "requires": { + "abbrev": "1" + } + } } }, "js-tokens": { @@ -5492,18 +5489,30 @@ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "memoizee": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", - "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", "requires": { - "d": "1", - "es5-ext": "^0.10.45", - "es6-weak-map": "^2.0.2", + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", "event-emitter": "^0.3.5", - "is-promise": "^2.1", - "lru-queue": "0.1", - "next-tick": "1", - "timers-ext": "^0.1.5" + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + }, + "dependencies": { + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + } } }, "memorystream": { @@ -8232,22 +8241,11 @@ "dev": true }, "retry-as-promised": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-2.3.2.tgz", - "integrity": "sha1-zZdO5P2bX+A8vzGHHuSCIcB3N7c=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-3.2.0.tgz", + "integrity": "sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg==", "requires": { - "bluebird": "^3.4.6", - "debug": "^2.6.9" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - } + "any-promise": "^1.3.0" } }, "reusify": { @@ -8413,51 +8411,103 @@ } }, "sequelize": { - "version": "4.44.3", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-4.44.3.tgz", - "integrity": "sha512-r2A4EVDKRCcABcZhY4ItvbcosvMJKpQMooxg/S8ouRFrZzqMPQ9O2thOUfgW59q8ZcEa5ccNeqwg15MCciqPMg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.5.0.tgz", + "integrity": "sha512-owBt8fnzVy8E1OvyCyfCdVk7OOLyPVrBCMEf+CvRReC5oCyo+UqeXCtwaex9L6LM9ifZ1i3TG3sFeM5MgLK0CQ==", "requires": { - "bluebird": "^3.5.0", - "cls-bluebird": "^2.1.0", - "debug": "^3.1.0", - "depd": "^1.1.0", + "debug": "^4.1.1", "dottie": "^2.0.0", - "generic-pool": "3.5.0", "inflection": "1.12.0", - "lodash": "^4.17.1", - "moment": "^2.20.0", - "moment-timezone": "^0.5.14", - "retry-as-promised": "^2.3.2", - "semver": "^5.5.0", - "terraformer-wkt-parser": "^1.1.2", + "lodash": "^4.17.20", + "moment": "^2.26.0", + "moment-timezone": "^0.5.31", + "retry-as-promised": "^3.2.0", + "semver": "^7.3.2", + "sequelize-pool": "^6.0.0", "toposort-class": "^1.0.1", - "uuid": "^3.2.1", - "validator": "^10.4.0", - "wkx": "^0.4.1" + "uuid": "^8.1.0", + "validator": "^10.11.0", + "wkx": "^0.5.0" }, "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, + "moment-timezone": { + "version": "0.5.33", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.33.tgz", + "integrity": "sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==", + "requires": { + "moment": ">= 2.9.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, "sequelize-cli": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-5.5.1.tgz", - "integrity": "sha512-ZM4kUZvY3y14y+Rq3cYxGH7YDJz11jWHcN2p2x7rhAIemouu4CEXr5ebw30lzTBtyXV4j2kTO+nUjZOqzG7k+Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-6.2.0.tgz", + "integrity": "sha512-6WQ2x91hg30dUn66mXHnzvHATZ4pyI1GHSNbS/TNN/vRR4BLRSLijadeMgC8zqmKDsL0VqzVVopJWfJakuP++Q==", "requires": { - "bluebird": "^3.5.3", "cli-color": "^1.4.0", "fs-extra": "^7.0.1", "js-beautify": "^1.8.8", "lodash": "^4.17.5", "resolve": "^1.5.0", - "umzug": "^2.1.0", + "umzug": "^2.3.0", "yargs": "^13.1.0" }, "dependencies": { + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -8467,9 +8517,22 @@ "jsonfile": "^4.0.0", "universalify": "^0.1.0" } + }, + "umzug": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/umzug/-/umzug-2.3.0.tgz", + "integrity": "sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw==", + "requires": { + "bluebird": "^3.7.2" + } } } }, + "sequelize-pool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-6.1.0.tgz", + "integrity": "sha512-4YwEw3ZgK/tY/so+GfnSgXkdwIJJ1I32uZJztIEgZeAO6HMgj64OzySbWLgxj+tXhZCJnzRfkY9gINw8Ft8ZMg==" + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", @@ -8529,11 +8592,6 @@ "rechoir": "^0.6.2" } }, - "shimmer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", - "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" - }, "shx": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz", @@ -9265,23 +9323,6 @@ "execa": "^0.7.0" } }, - "terraformer": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.9.tgz", - "integrity": "sha512-YlmQ1fsMWTkKGDGibCRWgmLzrpDRUr63Q025LJ/taYQ6j1Yb8q9McKF7NBi6ACAyUXO6F/bl9w6v4MY307y5Ag==", - "requires": { - "@types/geojson": "^1.0.0" - } - }, - "terraformer-wkt-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/terraformer-wkt-parser/-/terraformer-wkt-parser-1.2.0.tgz", - "integrity": "sha512-QU3iA54St5lF8Za1jg1oj4NYc8sn5tCZ08aNSWDeGzrsaV48eZk1iAVWasxhNspYBoCqdHuoot1pUTUrE1AJ4w==", - "requires": { - "@types/geojson": "^1.0.0", - "terraformer": "~1.0.5" - } - }, "test-exclude": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", @@ -10054,9 +10095,9 @@ } }, "wkx": { - "version": "0.4.8", - "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.8.tgz", - "integrity": "sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz", + "integrity": "sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==", "requires": { "@types/node": "*" } diff --git a/server/package.json b/server/package.json index 66b9e66536..8b316c030c 100644 --- a/server/package.json +++ b/server/package.json @@ -94,8 +94,8 @@ "path-to-regexp": "^3.0.0", "queue": "^6.0.0", "semver": "^6.1.1", - "sequelize": "^4.42.0", - "sequelize-cli": "^5.5.1", + "sequelize": "^6.5.0", + "sequelize-cli": "^6.2.0", "set-value": "^3.0.2", "sqlite3": "^4.0.6", "tracer": "^0.9.8", diff --git a/server/seeders/20190205070000-house.js b/server/seeders/20190205070000-house.js index bf67cdb465..fcbd810460 100644 --- a/server/seeders/20190205070000-house.js +++ b/server/seeders/20190205070000-house.js @@ -23,5 +23,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_house', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_house', null, {}), }; diff --git a/server/seeders/20190205071039-demo-user.js b/server/seeders/20190205071039-demo-user.js index e1c74a5dcb..174ea59cbc 100644 --- a/server/seeders/20190205071039-demo-user.js +++ b/server/seeders/20190205071039-demo-user.js @@ -44,5 +44,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_user', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_user', null, {}), }; diff --git a/server/seeders/20190211053203-demo-location.js b/server/seeders/20190211053203-demo-location.js index 1a9a89d0d1..aca7ee772f 100644 --- a/server/seeders/20190211053203-demo-location.js +++ b/server/seeders/20190211053203-demo-location.js @@ -15,5 +15,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_location', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_location', null, {}), }; diff --git a/server/seeders/20190219041452-message.js b/server/seeders/20190219041452-message.js index 05be12d7ba..605e9fac47 100644 --- a/server/seeders/20190219041452-message.js +++ b/server/seeders/20190219041452-message.js @@ -17,5 +17,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_message', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_message', null, {}), }; diff --git a/server/seeders/20190226025926-service.js b/server/seeders/20190226025926-service.js index 78a310cc61..a4011feb73 100644 --- a/server/seeders/20190226025926-service.js +++ b/server/seeders/20190226025926-service.js @@ -18,5 +18,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_service', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_service', null, {}), }; diff --git a/server/seeders/20190226025931-variable.js b/server/seeders/20190226025931-variable.js index c53b6ead3a..1830b781cd 100644 --- a/server/seeders/20190226025931-variable.js +++ b/server/seeders/20190226025931-variable.js @@ -41,5 +41,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_variable', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_variable', null, {}), }; diff --git a/server/seeders/20190227043234-scene.js b/server/seeders/20190227043234-scene.js index b55a369ba7..d92879e5fc 100644 --- a/server/seeders/20190227043234-scene.js +++ b/server/seeders/20190227043234-scene.js @@ -26,5 +26,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_scene', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_scene', null, {}), }; diff --git a/server/seeders/20190227081653-room.js b/server/seeders/20190227081653-room.js index 6b61762dfe..f3adaf9977 100644 --- a/server/seeders/20190227081653-room.js +++ b/server/seeders/20190227081653-room.js @@ -15,5 +15,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_room', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_room', null, {}), }; diff --git a/server/seeders/20190227081656-device.js b/server/seeders/20190227081656-device.js index a123566ccf..c8dada0dc1 100644 --- a/server/seeders/20190227081656-device.js +++ b/server/seeders/20190227081656-device.js @@ -37,5 +37,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_device', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_device', null, {}), }; diff --git a/server/seeders/20190227081700-device-feature.js b/server/seeders/20190227081700-device-feature.js index 9daf740be0..bdd1946e83 100644 --- a/server/seeders/20190227081700-device-feature.js +++ b/server/seeders/20190227081700-device-feature.js @@ -99,5 +99,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_device_feature', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_device_feature', null, {}), }; diff --git a/server/seeders/20190401042124-session.js b/server/seeders/20190401042124-session.js index 6b484b5dc3..a33d830b66 100644 --- a/server/seeders/20190401042124-session.js +++ b/server/seeders/20190401042124-session.js @@ -91,5 +91,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_session', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_session', null, {}), }; diff --git a/server/seeders/20190403081927-calendar.js b/server/seeders/20190403081927-calendar.js index 5a17859f95..cc8c15ab95 100644 --- a/server/seeders/20190403081927-calendar.js +++ b/server/seeders/20190403081927-calendar.js @@ -19,5 +19,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_calendar', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_calendar', null, {}), }; diff --git a/server/seeders/20190403081933-calendar-event.js b/server/seeders/20190403081933-calendar-event.js index 1e2dd1fb57..f2bb381703 100644 --- a/server/seeders/20190403081933-calendar-event.js +++ b/server/seeders/20190403081933-calendar-event.js @@ -31,5 +31,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_calendar_event', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_calendar_event', null, {}), }; diff --git a/server/seeders/20190416085240-device-param.js b/server/seeders/20190416085240-device-param.js index 983f1a0bb7..5acb1e8f03 100644 --- a/server/seeders/20190416085240-device-param.js +++ b/server/seeders/20190416085240-device-param.js @@ -15,5 +15,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_device_param', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_device_param', null, {}), }; diff --git a/server/seeders/20190506074218-dashboard.js b/server/seeders/20190506074218-dashboard.js index 6a1a2af14d..a24378b022 100644 --- a/server/seeders/20190506074218-dashboard.js +++ b/server/seeders/20190506074218-dashboard.js @@ -19,5 +19,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_dashboard', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_dashboard', null, {}), }; diff --git a/server/seeders/20190507083413-area.js b/server/seeders/20190507083413-area.js index 45a6754333..3e4d18da03 100644 --- a/server/seeders/20190507083413-area.js +++ b/server/seeders/20190507083413-area.js @@ -18,5 +18,5 @@ module.exports = { {}, ), - down: (queryInterface, Sequelize) => queryInterface.bulkDelete('t_area', null, {}), + down: async (queryInterface, Sequelize) => queryInterface.bulkDelete('t_area', null, {}), };