From 70a4da37f386bc677667b9192b513f1784a78eea Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 9 Jul 2018 22:15:05 +0200 Subject: [PATCH 001/356] 0.1.0 initial fixes and checks and introduces options object with logger and userAgent --- alexa-remote.js | 80 +++++++++++++++++++++++++++++-------------------- package.json | 7 +++-- 2 files changed, 51 insertions(+), 36 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index b69583a2..a2449a73 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1,18 +1,31 @@ +/* jshint -W097 */ +/* jshint -W030 */ +/* jshint strict: false */ +/* jslint node: true */ +/* jslint esversion: 6 */ "use strict"; -let https = require('https'); +const https = require('https'); +const querystring = require('querystring'); -function AlexaRemote (cookie, csrf) { +const defaultUserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0'; + +function AlexaRemote (cookie, csrf, _options) { if (!(this instanceof AlexaRemote)) return new AlexaRemote (cookie, csrf); this.serialNumbers = {}; this.names = {}; this.friendlyNames = {}; this.devices = undefined; + this._options = _options; + this._options.userAgent = this._options.userAgent || defaultUserAgent; this.setCookie = function (_cookie, _csrf) { cookie = _cookie; - if (_csrf) return csrf = _csrf; + if (_csrf) { + csrf = _csrf; + return; + } let ar = cookie.match(/csrf=([^;]+)/); if (!ar || ar.length < 2) ar = cookie.match(/csrf=([^;]+)/); if (!csrf && ar && ar.length >= 2) { @@ -50,10 +63,10 @@ function AlexaRemote (cookie, csrf) { this.setCookie(cookie, opts.csrf); if (!csrf) return callback && callback('no csrf found'); this.prepare(callback); - }) + }); }; - this.prepare = function (callback) { + this.prepare = function (callback) { this.getAccount((err, result) => { if (!err && result && Array.isArray(result)) { result.forEach ((account) => { @@ -63,7 +76,7 @@ function AlexaRemote (cookie, csrf) { } function getNotifications(cb) { - if (opts.notifications) return self.getNotifications(function(err, res) { cb (!err && res ? res.notifications : null) }); + if (opts.notifications) return self.getNotifications(function(err, res) { cb (!err && res ? res.notifications : null); }); cb(null); } @@ -104,14 +117,14 @@ function AlexaRemote (cookie, csrf) { device.notifications.push(noti); noti.set = self.changeNotification.bind(self, noti); } - }) + }); } if (Array.isArray (wakeWords)) wakeWords.forEach ((o) => { if (o.deviceSerialNumber === device.serialNumber && typeof o.wakeWord === 'string') { device.wakeWord = o.wakeWord.toLowerCase(); } - }) + }); }); this.ownerCustomerId = Object.keys(customerIds)[0]; @@ -128,20 +141,20 @@ function AlexaRemote (cookie, csrf) { self[on ? 'connectBluetooth' : 'disconnectBluetooth'] (self.serialNumbers[bt.deviceSerialNumber], d.address, cb); }; d.unpaire = function (val, cb) { - self.unpaireBluetooth (device, d.address, cb); - } - }) + self.unpaireBluetooth (self.serialNumbers[bt.deviceSerialNumber], d.address, cb); + }; + }); } }); callback && callback(); - }) + }); } else { callback && callback (); } - }) - }) - }) + }); + }); + }); }); return this; }; @@ -149,7 +162,7 @@ function AlexaRemote (cookie, csrf) { let alexaCookie; this.generateCookie = function (email, password, callback) { if (!alexaCookie) alexaCookie = require('alexa-cookie'); - alexaCookie(email, password, callback); + alexaCookie(email, password, self._options, callback); }; this.timestamp = this.now = function () { @@ -162,9 +175,9 @@ function AlexaRemote (cookie, csrf) { host: baseUrl, path: '', method: 'GET', - timeout:10000, + timeout: 10000, headers: { - 'User-Agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36', + 'User-Agent' : self._options.userAgent, 'Content-Type': 'text/plain', //'Content-Type': 'application/json', //'Connection': 'keep-alive', // new @@ -193,7 +206,8 @@ function AlexaRemote (cookie, csrf) { options.headers [n] = flags.headers[n]; }); - let req = https.request(options, function getDevices(res) { + self._options.logger && self._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(options, null, 2)); + let req = https.request(options, (res) => { let body  = ""; res.on('data', function(chunk) { @@ -204,12 +218,13 @@ function AlexaRemote (cookie, csrf) { let ret; if (typeof callback === 'function') { - if(!body) return callback.length >= 2 && callback('no body', null); + if(!body) return callback.length >= 2 && callback(new Error('no body'), null); try { ret = JSON.parse(body); } catch(e) { - if (callback.length >= 2) return callback ('no JSON', body); + if (callback.length >= 2) return callback (new Error('no JSON'), body); } + self._options.logger && self._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); if (callback.length >= 2) return callback (null, ret); callback(ret); } @@ -218,14 +233,14 @@ function AlexaRemote (cookie, csrf) { req.on('error', function(e) { if(typeof callback === 'function' && callback.length >= 2) { - return callback (e.message, null); + return callback (e, null); } }); if (flags && flags.data) { req.write(flags.data); } req.end(); - } + }; } AlexaRemote.prototype.getDevices = function (callback) { @@ -271,7 +286,7 @@ AlexaRemote.prototype.getList = function (serialOrName, listType, options, callb &completed=${options.completed || false} &type=${listType} &deviceSerialNumber=${dev.serialNumber} - &deviceType=${deviceType} + &deviceType=${dev.deviceType} &_=%t`, callback); }; @@ -326,7 +341,7 @@ AlexaRemote.prototype.changeNotification = function (notification, state) { date.setMinutes(date / 60 ^ 60); date.setSeconds(date ^ 60); notification.alarmTime = date.getTime(); - notification.originalTime = `${_00 (data.getHours ())}:${_00 (date.getMinutes ())}:${_00 (date.getSeconds ())}.000`; + notification.originalTime = `${_00 (date.getHours ())}:${_00 (date.getMinutes ())}:${_00 (date.getSeconds ())}.000`; break; } let flags = { @@ -334,7 +349,7 @@ AlexaRemote.prototype.changeNotification = function (notification, state) { method: 'PUT' }; this.httpsGet (`https://alexa.amazon.de/api/notifications/${notification.id}`, function(err, res) { - callback(err, res); + //callback(err, res); TODO }, flags ); @@ -445,7 +460,7 @@ AlexaRemote.prototype.getConversations = function (options, callback) { callback = options; options = undefined; } - if (opntions === undefined) options = {}; + if (options === undefined) options = {}; if (options.latest === undefined) options.latest = true; if (options.includeHomegroup === undefined) options.includeHomegroup = true; if (options.unread === undefined) options.unread = false; @@ -458,7 +473,7 @@ AlexaRemote.prototype.getConversations = function (options, callback) { &includeHomegroup=${options.includeHomegroup} &unread=${options.unread} &modifiedSinceDate=${options.modifiedSinceDate} - &includeUserName=${includeUserName}true`, + &includeUserName=${options.includeUserName}`, function (err, result) { callback (err, result); }); @@ -675,14 +690,14 @@ AlexaRemote.prototype.getHomeGroup = function (callback) { function test () { AlexaRemote.prototype.getFeatureAlertLocation = function (callback) { - alexa.httpsGet (`https://alexa.amazon.de/api/feature-alert-location?`, callback) + alexa.httpsGet (`https://alexa.amazon.de/api/feature-alert-location?`, callback); }; let alexa = AlexaRemote ().init (cookie, function () { alexa.getHomeGroup (function (err, res) { res = res; - }) + }); // alexa.getPlayer('wohnzimmer', function(err, res) { // res = res; // }) @@ -717,7 +732,7 @@ function test () { alexa.setTunein ('Wohnzimmer', res.browseList[0].id, alexa.ownerCustomerId, function (err, res) { res = res; }); - }) + }); // alexa.getDeviceStatusList((ret) => { // ret = ret; // }) @@ -747,7 +762,7 @@ AlexaRemote.prototype.getSmarthomeDevices = function (callback) { return callback('invalid JSON'); } if (!res.locationDetails) return callback('locationDetails not found'); - callback (err, res.locationDetails) + callback (err, res.locationDetails); }); }; @@ -824,4 +839,3 @@ AlexaRemote.prototype.deleteDevice = function (serialOrName, callback) { }; module.exports = AlexaRemote; - diff --git a/package.json b/package.json index 513a8b15..15cb623f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote", - "version": "0.0.24", + "version": "0.1.0", "description": "Remote Control for amazon echo devices", "author": { "name": "soef", @@ -21,8 +21,9 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie": "^0.0.20", - "https": "^1.0.0" + "alexa-cookie": "Apollon77/alexa-cookie", + "https": "^1.0.0", + "querystring": "^0.2.0" }, "devDependencies": { "mocha": "^2.3.4", From 389b6e37f401351f27782eea1c13ebe809a71fe5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 9 Jul 2018 23:12:54 +0200 Subject: [PATCH 002/356] add authentication check to init --- alexa-remote.js | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index a2449a73..720c3b44 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -43,8 +43,10 @@ function AlexaRemote (cookie, csrf, _options) { opts = cookie; cookie = opts.cookie; } - function helper(callback) { + function getCookie(callback) { if (!opts.cookie && opts.password && opts.email) { + self._options.logger && self._options.logger('Alexa-Remote: No cookie, but email and password, generate cookie'); + opts.cookieJustCreated = true; self.generateCookie(opts.email, opts.password, function(err, res) { if (!err && res) { cookie = res.cookie; @@ -55,14 +57,25 @@ function AlexaRemote (cookie, csrf, _options) { }); return; } + self._options.logger && self._options.logger('Alexa-Remote: cookie was provided'); callback(); } - helper(() => { + + getCookie(() => { if (opts.baseUrl) baseUrl = opts.baseUrl; if(typeof callback === 'function') callback = callback.bind(this); - this.setCookie(cookie, opts.csrf); - if (!csrf) return callback && callback('no csrf found'); - this.prepare(callback); + self.setCookie(cookie, opts.csrf); + if (!csrf) return callback && callback(new Error('no csrf found')); + this.checkAuthentication((authenticated) => { + self._options.logger && self._options.logger('Alexa-Remote: Authentication checked: ' + authenticated); + if (! authenticated && !opts.cookieJustCreated && opts.password && opts.email) { + self._options.logger && self._options.logger('Alexa-Remote: Cookie was set, but authentication invalid, retry ith email/password ...'); + delete opts.cookie; + delete opts.csrf; + return this.init(opts, callback); + } + this.prepare(callback); + }); }); }; @@ -243,6 +256,16 @@ function AlexaRemote (cookie, csrf, _options) { }; } +AlexaRemote.prototype.checkAuthentication = function (callback) { + this.httpsGet ('/api/bootstrap?version=0', function (err, res) { + if (res && res.authentication && res.authentication.authenticated !== undefined) { + return callback(res.authentication.authenticated); + } + return callback(false); + }); +}; + + AlexaRemote.prototype.getDevices = function (callback) { this.httpsGet ('/api/devices-v2/device?cached=true&_=%t', callback); }; From dee9dab12b953c86bdcc3b186882b886e4f1edc2 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 9 Jul 2018 23:20:55 +0200 Subject: [PATCH 003/356] changes --- alexa-remote.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 720c3b44..2babe5fa 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -10,14 +10,19 @@ const querystring = require('querystring'); const defaultUserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0'; -function AlexaRemote (cookie, csrf, _options) { +function AlexaRemote (cookie, csrf) { if (!(this instanceof AlexaRemote)) return new AlexaRemote (cookie, csrf); this.serialNumbers = {}; this.names = {}; this.friendlyNames = {}; this.devices = undefined; - this._options = _options; + if (typeof cookie === 'object') { + this._options = cookie; + } + else { + this._options = {}; + } this._options.userAgent = this._options.userAgent || defaultUserAgent; this.setCookie = function (_cookie, _csrf) { From ee2d493e4559ca0a4553a3c92b44384b460b09d7 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 10 Jul 2018 11:15:57 +0200 Subject: [PATCH 004/356] 0.1.0 docs --- alexa-remote.js | 2 +- readme.md | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 2babe5fa..df69c54d 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -52,7 +52,7 @@ function AlexaRemote (cookie, csrf) { if (!opts.cookie && opts.password && opts.email) { self._options.logger && self._options.logger('Alexa-Remote: No cookie, but email and password, generate cookie'); opts.cookieJustCreated = true; - self.generateCookie(opts.email, opts.password, function(err, res) { + self.generateCookie(opts.email, opts.password, opts, function(err, res) { if (!err && res) { cookie = res.cookie; opts.csrf = res.csrf; diff --git a/readme.md b/readme.md index b22e3c70..b4400f13 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,9 @@ -## alexa-remote +# alexa-remote Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN. -Early code version. +Early code version. -```js -let Alexa = require('alexa-remote2'); -let alexa = new Alexa(); - -/***************************************************************/ -// see: https://www.gehrig.info/alexa/Alexa.html -// cookie starts with x-amzn-dat and ends with =" csrf=12345780 -let cookie = 'x-amzn-dat.../ /...=" csrf=12345780'; - -alexa.init({ - cookie: cookie, // cookie if already known, else can be generated using email/password - email: '...', // optional, amazon email for login to get new cookie - password: '...', // optional, amazon password for login to get new cookie - bluetooth: true, - logger: console.log, // optional - alexaServiceHost: 'layla.amazon.de', // optional, e.g. "pitangui.amazon.com" for amazon.com, default is "layla.amazon.de" - userAgent: '...', // optional, override used user-Agent for all Requests and Cookie determination - acceptLanguage: '...', // optional, override Accept-Language-Header for cookie determination - amazonPage: '...', // optional, override Amazon-Login-Page for cookie determination and referer for requests - useWsMqtt: true // optional, true to use the Websocket/MQTT direct push connection - }, - function (err) { - if (err) { - console.log (err); - return; - } - for (let deviceSerial of Object.keys(alexa.serialNumbers)) { - console.log (deviceSerial); - } - } -); -```` +## Example + +see example folder + ## Thanks: Partly based on [Amazon Alexa Remote Control](http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html) (PLAIN shell) and [alexa-remote-control](https://github.com/thorsten-gehrig/alexa-remote-control) and [OpenHab-Addon](https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol) @@ -55,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.0.0 (2018-12-02) +* (Apollon77) upgrade amazon-cookie lib to 2.0 + ### 1.0.3 (2018-11-17) * (Apollon77) upgrade amazon-cookie lib * (Apollon77) better handle ws errors and upgrade ws version to still support nodejs 6 From 3ab0fd5bfa07566a227874a12425fd1333b00352 Mon Sep 17 00:00:00 2001 From: 586837r <586837r@gmail.com> Date: Thu, 6 Dec 2018 16:37:21 +0100 Subject: [PATCH 034/356] sendSequenceCommand fix callback --- alexa-remote.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index c2cd8e7a..736b9ee1 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1382,14 +1382,14 @@ class AlexaRemote extends EventEmitter { } sendSequenceCommand(serialOrName, command, value, callback) { - let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); - if (typeof value === 'function') { callback = value; value = null; } + let dev = this.find(serialOrName); + if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + let seqCommandObj; if (typeof command === 'object') { seqCommandObj = command.sequence || command; From 18c3d38aa7c0d38d6e0561e24db28dee31a47b91 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Jan 2019 23:28:31 +0100 Subject: [PATCH 035/356] add logging and smaller stuff --- alexa-remote.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 736b9ee1..46948780 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -112,6 +112,7 @@ class AlexaRemote extends EventEmitter { return callback(null); } self._options.logger && self._options.logger('Alexa-Remote: former registration data exist, try refresh'); + self._options.logger && self._options.logger(JSON.stringify(self._options.formerRegistrationData)); self.refreshCookie(function(err, res) { if (err || !res) { self._options.logger && self._options.logger('Alexa-Remote: Error from refreshing cookies'); @@ -1382,14 +1383,14 @@ class AlexaRemote extends EventEmitter { } sendSequenceCommand(serialOrName, command, value, callback) { + let dev = this.find(serialOrName); + if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (typeof value === 'function') { callback = value; value = null; } - let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); - let seqCommandObj; if (typeof command === 'object') { seqCommandObj = command.sequence || command; From e5209d0af22015bd5b8d80b0a6e7c3ffebc92e33 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 12 Jan 2019 23:49:00 +0100 Subject: [PATCH 036/356] 2.1.0 new sequence commands --- alexa-remote.js | 77 +++++++++++++++++++++++++++++++++++++++++++++++-- package.json | 4 +-- readme.md | 3 ++ 3 files changed, 80 insertions(+), 4 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 46948780..19516a5b 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1308,13 +1308,26 @@ class AlexaRemote extends EventEmitter { } seqNode.operationPayload.value = value; break; + case 'deviceStop': + seqNode.type = 'Alexa.DeviceControls.Stop'; + seqNode.operationPayload.devices = [ + { + "deviceSerialNumber": "ALEXA_CURRENT_DSN", + "deviceType": "ALEXA_CURRENT_DEVICE_TYPE" + } + ] + seqNode.operationPayload.isAssociatedDevice = false; + delete seqNode.operationPayload.deviceType; + delete seqNode.operationPayload.deviceSerialNumber; + delete seqNode.operationPayload.locale; + break; case 'speak': seqNode.type = 'Alexa.Speak'; if (typeof value !== 'string') value = String(value); if (!this._options.amazonPage || !this._options.amazonPage.endsWith('.com')) { value = value.replace(/([^0-9]?[0-9]+)\.([0-9]+[^0-9])?/g, '$1,$2'); } - value = value + /*value = value .replace(/Â|À|Å|Ã/g, 'A') .replace(/á|â|à|å|ã/g, 'a') .replace(/Ä/g, 'Ae') @@ -1340,7 +1353,8 @@ class AlexaRemote extends EventEmitter { .replace(/ž/, 'z') .replace(/&/, 'und') .replace(/[^-a-zA-Z0-9_,.?! ]/g,'') - .replace(/ /g,'_'); + .replace(/ /g,'_');*/ + value = value.replace(/[ ]+/g, ' '); if (value.length === 0) { return callback && callback(new Error('Can not speak empty string', null)); } @@ -1349,6 +1363,64 @@ class AlexaRemote extends EventEmitter { } seqNode.operationPayload.textToSpeak = value; break; + case 'notification': + seqNode.type = 'Alexa.Notifications.SendMobilePush'; + if (typeof value !== 'string') value = String(value); + if (value.length === 0) { + return callback && callback(new Error('Can not notify empty string', null)); + } + seqNode.operationPayload.notificationMessage = value; + seqNode.operationPayload.alexaUrl = '#v2/behaviors'; + seqNode.operationPayload.title = 'ioBroker'; + delete seqNode.operationPayload.deviceType; + delete seqNode.operationPayload.deviceSerialNumber; + delete seqNode.operationPayload.locale; + break; + case 'announcement': + case 'ssml': + seqNode.type = 'AlexaAnnouncement'; + if (typeof value !== 'string') value = String(value); + if (command === 'announcement') { + if (!this._options.amazonPage || !this._options.amazonPage.endsWith('.com')) { + value = value.replace(/([^0-9]?[0-9]+)\.([0-9]+[^0-9])?/g, '$1,$2'); + } + value = value.replace(/[ ]+/g, ' '); + if (value.length === 0) { + return callback && callback(new Error('Can not speak empty string', null)); + } + } + else if (command === 'ssml') { + if (!value.startsWith('')) { + return callback && callback(new Error('Vlue needs to be a valid SSML XML string', null)); + } + } + seqNode.operationPayload.expireAfter = 'PT5S'; + seqNode.operationPayload.content = [ + { + "locale": "de-DE", + "display": { + "title": "ioBroker", + "body": value + }, + "speak": { + "type": (command === 'ssml') ? 'ssml' : 'text', + "value": value + } + } + ]; + seqNode.operationPayload.target = { + "customerId": "ALEXA_CUSTOMER_ID", + "devices": [ + { + "deviceSerialNumber": "ALEXA_CURRENT_DSN", + "deviceTypeId": "ALEXA_CURRENT_DEVICE_TYPE" + } + ] + } + delete seqNode.operationPayload.deviceType; + delete seqNode.operationPayload.deviceSerialNumber; + delete seqNode.operationPayload.locale; + break; default: return; } @@ -1408,6 +1480,7 @@ class AlexaRemote extends EventEmitter { 'status': 'ENABLED' }; reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceType":"ALEXA_CURRENT_DEVICE_TYPE"/g, `"deviceType":"${dev.deviceType}"`); + reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceTypeId":"ALEXA_CURRENT_DEVICE_TYPE"/g, `"deviceTypeId":"${dev.deviceType}"`); reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceSerialNumber":"ALEXA_CURRENT_DSN"/g, `"deviceSerialNumber":"${dev.serialNumber}"`); reqObj.sequenceJson = reqObj.sequenceJson.replace(/"customerId":"ALEXA_CUSTOMER_ID"/g, `"customerId":"${dev.deviceOwnerCustomerId}"`); reqObj.sequenceJson = reqObj.sequenceJson.replace(/"locale":"ALEXA_CURRENT_LOCALE"/g, `"locale":"de-DE"`); diff --git a/package.json b/package.json index ff39aad2..aef14d52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.0.0", + "version": "2.1.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^2.0.0", + "alexa-cookie2": "^2.0.1", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^6.1.2", diff --git a/readme.md b/readme.md index c5e228de..96727d49 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.1.0 (2019-01-12) +* (Apollon77) add new sequenceCommands "deviceStop", "notification", "announcement" and finally "ssml" + ### 2.0.0 (2018-12-02) * (Apollon77) upgrade amazon-cookie lib to 2.0 From 126b946d3440926cc25e48d41ac1df2102bcd1e5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 14 Jan 2019 10:30:39 +0100 Subject: [PATCH 037/356] fix wakeword handling and summary sanitizing and smaller stuff --- alexa-remote.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 19516a5b..0436481d 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -218,7 +218,7 @@ class AlexaRemote extends EventEmitter { initWakewords(callback) { this.getWakeWords((err, wakeWords) => { - if (err || !wakeWords || !Array.isArray(wakeWords)) return callback && callback(); + if (err || !wakeWords || !Array.isArray(wakeWords.wakeWords)) return callback && callback(); wakeWords.wakeWords.forEach((o) => { let device = this.find(o.deviceSerialNumber); @@ -1096,11 +1096,14 @@ class AlexaRemote extends EventEmitter { } } if (!o.description) continue; + o.description.summary = (o.description.summary || '').trim (); if (options.filter) { - o.description.summary = (o.description.summary || '').trim (); switch (o.description.summary) { case 'stopp': case 'alexa': + case 'echo': + case 'computer': + case 'amazon': case ',': case '': continue; @@ -1110,8 +1113,8 @@ class AlexaRemote extends EventEmitter { o.deviceSerialNumber = res.sourceDeviceIds[i].serialNumber; if (!this.serialNumbers[o.deviceSerialNumber]) continue; o.name = this.serialNumbers[o.deviceSerialNumber].accountName; - let wakeWord = this.serialNumbers[o.deviceSerialNumber]; - if (wakeWord) wakeWord = wakeWord.wakeWord; + const dev = this.find(o.deviceSerialNumber); + let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; if (wakeWord && o.description.summary.startsWith(wakeWord)) { o.description.summary = o.description.summary.substr(wakeWord.length).trim(); } @@ -1315,7 +1318,7 @@ class AlexaRemote extends EventEmitter { "deviceSerialNumber": "ALEXA_CURRENT_DSN", "deviceType": "ALEXA_CURRENT_DEVICE_TYPE" } - ] + ]; seqNode.operationPayload.isAssociatedDevice = false; delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; @@ -1416,7 +1419,7 @@ class AlexaRemote extends EventEmitter { "deviceTypeId": "ALEXA_CURRENT_DEVICE_TYPE" } ] - } + }; delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; delete seqNode.operationPayload.locale; From e401c4d7f163645cba2a21e850f9f3071d46d949 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 14 Jan 2019 23:00:35 +0100 Subject: [PATCH 038/356] add calendarToday, calendarTomorrow and calendarNext --- alexa-remote.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/alexa-remote.js b/alexa-remote.js index 0436481d..cba2389c 100644 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1303,6 +1303,15 @@ class AlexaRemote extends EventEmitter { case 'tellstory': seqNode.type = 'Alexa.TellStory.Play'; break; + case 'calendarToday': + seqNode.type = 'Alexa.Calendar.PlayToday'; + break; + case 'calendarTomorrow': + seqNode.type = 'Alexa.Calendar.PlayTomorrow'; + break; + case 'calendarNext': + seqNode.type = 'Alexa.Calendar.PlayNext'; + break; case 'volume': seqNode.type = 'Alexa.DeviceControls.Volume'; value = ~~value; From 21bc1ae1c36335af7615cabe14695f340314f79b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 14 Jan 2019 23:54:27 +0100 Subject: [PATCH 039/356] readme and version update preps --- package.json | 2 +- readme.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index aef14d52..0ea7ae44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.1.0", + "version": "2.2.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 96727d49..a2c82c97 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,10 @@ Thank you for that work. ## Changelog: +### 2.2.0 (2019-01-xx) +* (Apollon77) add new sequenceCommands "calendarNext", "calendarToday", "calendarTomorrow" +* (Apollon77) fix wake word handling and history sanitizing + ### 2.1.0 (2019-01-12) * (Apollon77) add new sequenceCommands "deviceStop", "notification", "announcement" and finally "ssml" From 21aca84670e1983df3f88bd31c11b3b6088932ef Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 21 Jun 2019 01:17:48 +0200 Subject: [PATCH 040/356] fix readme --- alexa-remote.js | 38 ++++++++++++++++++++++++++++++++------ alexa-wsmqtt.js | 4 ++-- package.json | 10 +++++----- readme.md | 7 +++++++ 4 files changed, 46 insertions(+), 13 deletions(-) mode change 100644 => 100755 alexa-remote.js diff --git a/alexa-remote.js b/alexa-remote.js old mode 100644 new mode 100755 index cba2389c..ea69278e --- a/alexa-remote.js +++ b/alexa-remote.js @@ -87,7 +87,7 @@ class AlexaRemote extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote: Use as Base-URL: ' + this.baseUrl); this._options.alexaServiceHost = this.baseUrl; if (this._options.refreshCookieInterval !== 0) { - this._options.refreshCookieInterval = this._options.refreshCookieInterval || 7*24*60*1000; // Auto Refresh after 7 days + this._options.refreshCookieInterval = this._options.refreshCookieInterval || 7*24*60*60*1000; // Auto Refresh after 7 days } const self = this; @@ -440,6 +440,30 @@ class AlexaRemote extends EventEmitter { mediaReferenceId: payload.mediaReferenceId }); return; + case 'PUSH_MEDIA_PROGRESS_CHANGE': + /* + { + "destinationUserId": "A2Z2SH760RV43M", + "progress": { + "mediaProgress": 899459, + "mediaLength": 0 + }, + "dopplerId": { + "deviceSerialNumber": "G2A0V7048513067J", + "deviceType": "A18O6U1UQFJ0XK" + }, + "mediaReferenceId": "c4a72dbe-ef6b-42b7-8104-0766aa32386f:1" + } + */ + this.emit('ws-media-progress-change', { + destinationUserId: payload.destinationUserId, + deviceSerialNumber: payload.dopplerId.deviceSerialNumber, + deviceType: payload.dopplerId.deviceType, + mediaReferenceId: payload.mediaReferenceId, + mediaProgress: payload.progress.mediaProgress, + mediaLength: payload.progress.mediaLength + }); + return; case 'PUSH_VOLUME_CHANGE': /* { @@ -1403,23 +1427,25 @@ class AlexaRemote extends EventEmitter { } else if (command === 'ssml') { if (!value.startsWith('')) { - return callback && callback(new Error('Vlue needs to be a valid SSML XML string', null)); + return callback && callback(new Error('Value needs to be a valid SSML XML string', null)); } } seqNode.operationPayload.expireAfter = 'PT5S'; seqNode.operationPayload.content = [ { "locale": "de-DE", - "display": { - "title": "ioBroker", - "body": value - }, "speak": { "type": (command === 'ssml') ? 'ssml' : 'text', "value": value } } ]; + if (command !== 'ssml') { + seqNode.operationPayload.content.display = { + "title": "ioBroker", + "body": value + }; + } seqNode.operationPayload.target = { "customerId": "ALEXA_CUSTOMER_ID", "devices": [ diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index aead3ffc..ef4b3389 100644 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -107,8 +107,8 @@ class AlexaWsMqtt extends EventEmitter { this.emit('disconnect', false, 'Too many failed retries. Check cookie and data'); return; } - let retryDelay = this.errorRetryCounter * 60 + 5; - if (retryDelay > 3600) retryDelay = 3600; + let retryDelay = this.errorRetryCounter * 5 + 5; + if (retryDelay > 60) retryDelay = 60; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Retry Connection in ' + retryDelay + 's'); this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); this.reconnectTimeout = setTimeout(() => { diff --git a/package.json b/package.json index 0ea7ae44..a89d19c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.2.0", + "version": "2.3.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -25,15 +25,15 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^2.0.1", + "alexa-cookie2": "^2.1.0", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^6.1.2", + "ws": "^6.2.1", "extend": "^3.0.2" }, "devDependencies": { - "mocha": "^2.3.4", - "chai": "^3.4.1" + "mocha": "^6.1.4", + "chai": "^4.2.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha" diff --git a/readme.md b/readme.md index a2c82c97..625634da 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,13 @@ Thank you for that work. ## Changelog: +### 2.3.0 (2019-06-20) +* (Apollon77) use alexa-cookie lib 2.1 with latest adoptions to Amazon changes (Cookie CSRF was missing) +* (Apollon77) fixed default cookie refresh interval +* (Apollon77) When Speak via SSML is done this is not send as card value +* (Apollon77) add PUSH_MEDIA_PROGRESS_CHANGE to known WS-MQTT topics +* (Apollon77) change WS reconnection logic to try once per minute + ### 2.2.0 (2019-01-xx) * (Apollon77) add new sequenceCommands "calendarNext", "calendarToday", "calendarTomorrow" * (Apollon77) fix wake word handling and history sanitizing From 7eb38f3bf5d0a6259c5ebbe4a9e120fc2fe43e78 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 21 Jun 2019 09:47:50 +0200 Subject: [PATCH 041/356] 2.3.1 alexa-remote and adapter usage --- alexa-remote.js | 5 +++++ package.json | 2 +- readme.md | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index ea69278e..a0713147 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -52,11 +52,16 @@ class AlexaRemote extends EventEmitter { return this.setCookie(_cookie.cookie); } + if (!this.cookie || typeof this.cookie !== 'string') return; let ar = this.cookie.match(/csrf=([^;]+)/); if (!ar || ar.length < 2) ar = this.cookie.match(/csrf=([^;]+)/); if (!this.csrf && ar && ar.length >= 2) { this.csrf = ar[1]; } + if (!this.csrf) { + this.cookie = null; + return; + } this._options.csrf = this.csrf; this._options.cookie = this.cookie; } diff --git a/package.json b/package.json index a89d19c7..674ae0ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.0", + "version": "2.3.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 625634da..e9db4268 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.3.1 (2019-06-21) +* (Apollon77) optimize handling for missing csrf cases + ### 2.3.0 (2019-06-20) * (Apollon77) use alexa-cookie lib 2.1 with latest adoptions to Amazon changes (Cookie CSRF was missing) * (Apollon77) fixed default cookie refresh interval From c3f5cada21f58e89a87c43349874e7960c815798 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 21 Jun 2019 17:52:47 +0200 Subject: [PATCH 042/356] 2.3.2 to fix ssml --- alexa-remote.js | 10 ++++------ package.json | 2 +- readme.md | 3 +++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index a0713147..86cec48e 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1439,18 +1439,16 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.content = [ { "locale": "de-DE", + "display": { + "title": "ioBroker", + "body": value.replace(/<[^>]+>/g, '') + }, "speak": { "type": (command === 'ssml') ? 'ssml' : 'text', "value": value } } ]; - if (command !== 'ssml') { - seqNode.operationPayload.content.display = { - "title": "ioBroker", - "body": value - }; - } seqNode.operationPayload.target = { "customerId": "ALEXA_CUSTOMER_ID", "devices": [ diff --git a/package.json b/package.json index 674ae0ea..6bc77d61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.1", + "version": "2.3.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index e9db4268..3a312156 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.3.2 (2019-06-21) +* (Apollon77) fix ssml + ### 2.3.1 (2019-06-21) * (Apollon77) optimize handling for missing csrf cases From ac663de95eb82de0ba66c4a8ad2f880d1a06b4d7 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 23 Jun 2019 16:38:27 +0200 Subject: [PATCH 043/356] 2.3.3 --- alexa-remote.js | 42 ++++++++++++++++++++++++------------------ package.json | 2 +- readme.md | 3 +++ 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 86cec48e..c94a7063 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -142,7 +142,10 @@ class AlexaRemote extends EventEmitter { return callback && callback(err); } if (!this.csrf) return callback && callback(new Error('no csrf found')); - this.checkAuthentication((authenticated) => { + this.checkAuthentication((authenticated, err) => { + if (err) { + return callback && callback(new Error('Error while checking Authentication: ' + err)); + } this._options.logger && this._options.logger('Alexa-Remote: Authentication checked: ' + authenticated); if (! authenticated && !this._options.cookieJustCreated) { this._options.logger && this._options.logger('Alexa-Remote: Cookie was set, but authentication invalid'); @@ -654,26 +657,26 @@ class AlexaRemote extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote: No authentication check needed (time elapsed ' + (new Date().getTime() - this.lastAuthCheck) + ')'); return this.httpsGetCall(path, callback, flags); } - this.checkAuthentication((authenticated) => { + this.checkAuthentication((authenticated, err) => { if (authenticated) { this._options.logger && this._options.logger('Alexa-Remote: Authentication check successfull'); this.lastAuthCheck = new Date().getTime(); return this.httpsGetCall(path, callback, flags); } - if (this._options.email && this.options.password) { - this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error, but email and password, get new cookie'); - delete this._options.csrf; - delete this._options.cookie; - this.init(this._options, function(err) { - if (err) { - this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error and renew unsuccessfull. STOP'); - return callback(new Error('Cookie invalid, Renew unsuccessfull')); - } - return this.httpsGet(path, callback, flags); - }); + else if (err && authenticated === null) { + this._options.logger && this._options.logger('Alexa-Remote: Authentication check returned error: ' + err + '. Still try request'); + return this.httpsGetCall(path, callback, flags); } - this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error and no email and password. STOP'); - callback(new Error('Cookie invalid')); + this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error, try re-init'); + delete this._options.csrf; + delete this._options.cookie; + this.init(this._options, function(err) { + if (err) { + this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error and renew unsuccessfull. STOP'); + return callback(new Error('Cookie invalid, Renew unsuccessfull')); + } + return this.httpsGet(path, callback, flags); + }); }); } @@ -751,7 +754,7 @@ class AlexaRemote extends EventEmitter { }); req.on('error', function(e) { - if(typeof callback === 'function'/* && callback.length >= 2*/) { + if (typeof callback === 'function'/* && callback.length >= 2*/) { return callback (e, null); } }); @@ -766,9 +769,12 @@ class AlexaRemote extends EventEmitter { checkAuthentication(callback) { this.httpsGetCall ('/api/bootstrap?version=0', function (err, res) { if (res && res.authentication && res.authentication.authenticated !== undefined) { - return callback(res.authentication.authenticated); + return callback(res.authentication.authenticated, err); + } + if (err) { + return callback(null, err); } - return callback(false); + callback(false, err); }); } diff --git a/package.json b/package.json index 6bc77d61..52e4525b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.2", + "version": "2.3.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 3a312156..083bb999 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.3.3 (2019-06-23) +* (Apollon77) change authentication check to hopefully better handle DNS or other "Network unavailable" errors + ### 2.3.2 (2019-06-21) * (Apollon77) fix ssml From 62f6413b4b67a0f31397e0916fdab43367924667 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 25 Jun 2019 23:24:14 +0200 Subject: [PATCH 044/356] 2.4.3 of adapter, 2.3.4 of lib --- alexa-remote.js | 4 ++-- package.json | 2 +- readme.md | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index c94a7063..605847b4 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -468,8 +468,8 @@ class AlexaRemote extends EventEmitter { deviceSerialNumber: payload.dopplerId.deviceSerialNumber, deviceType: payload.dopplerId.deviceType, mediaReferenceId: payload.mediaReferenceId, - mediaProgress: payload.progress.mediaProgress, - mediaLength: payload.progress.mediaLength + mediaProgress: payload.progress ? payload.progress.mediaProgress : null, + mediaLength: payload.progress ? payload.progress.mediaLength : null }); return; case 'PUSH_VOLUME_CHANGE': diff --git a/package.json b/package.json index 52e4525b..94525619 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.3", + "version": "2.3.4", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 083bb999..183f127f 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.3.4 (2019-06-25) +* (Apollon77) fix potential error on PUSH_MEDIA_PROGRESS_CHANGE push infos + ### 2.3.3 (2019-06-23) * (Apollon77) change authentication check to hopefully better handle DNS or other "Network unavailable" errors From 4830241d3e5f4deafa89feb927e75c63ff8c8d5c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 1 Jul 2019 17:26:44 +0200 Subject: [PATCH 045/356] 2.3.5 --- alexa-remote.js | 2 +- package.json | 2 +- readme.md | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 605847b4..6c53e86e 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -771,7 +771,7 @@ class AlexaRemote extends EventEmitter { if (res && res.authentication && res.authentication.authenticated !== undefined) { return callback(res.authentication.authenticated, err); } - if (err) { + if (err && !err.message.includes('no body')) { return callback(null, err); } callback(false, err); diff --git a/package.json b/package.json index 94525619..f3773573 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.4", + "version": "2.3.5", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 183f127f..b1c7e424 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.3.5 (2019-07-01) +* (Apollon77) fix special case on authentication check + ### 2.3.4 (2019-06-25) * (Apollon77) fix potential error on PUSH_MEDIA_PROGRESS_CHANGE push infos From 1976f8e98c9b568d013704eaeefd3a3cd2ebefd6 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 5 Jul 2019 19:19:23 +0200 Subject: [PATCH 046/356] fixes https://github.com/Apollon77/ioBroker.alexa2/issues/267 --- alexa-remote.js | 2 +- package.json | 2 +- readme.md | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 6c53e86e..a144baad 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -143,7 +143,7 @@ class AlexaRemote extends EventEmitter { } if (!this.csrf) return callback && callback(new Error('no csrf found')); this.checkAuthentication((authenticated, err) => { - if (err) { + if (err && authenticated === null) { return callback && callback(new Error('Error while checking Authentication: ' + err)); } this._options.logger && this._options.logger('Alexa-Remote: Authentication checked: ' + authenticated); diff --git a/package.json b/package.json index f3773573..aabc2026 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.5", + "version": "2.3.6", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index b1c7e424..3a036487 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.3.6 (2019-07-05) +* (Apollon77) fix (finally) special case on authentication check + ### 2.3.5 (2019-07-01) * (Apollon77) fix special case on authentication check From e4cc074248e14df19a9729739c6a5f2b3ea2a99b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 6 Jul 2019 23:40:43 +0200 Subject: [PATCH 047/356] 2.3.7 --- alexa-remote.js | 1 + package.json | 2 +- readme.md | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index a144baad..0b2703a3 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -151,6 +151,7 @@ class AlexaRemote extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote: Cookie was set, but authentication invalid'); delete this._options.cookie; delete this._options.csrf; + delete this._options.localCookie; return this.init(this._options, callback); } this.lastAuthCheck = new Date().getTime(); diff --git a/package.json b/package.json index aabc2026..33abdb8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.6", + "version": "2.3.7", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 3a036487..5bfa7934 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.3.7 (2019-07-06) +* (Apollon77) fix (finally) special case on authentication check + ### 2.3.6 (2019-07-05) * (Apollon77) fix (finally) special case on authentication check From 2d6b8be02891d0a10ed4774136976eda7f5a2cf9 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 21 Jul 2019 18:40:42 +0200 Subject: [PATCH 048/356] lib 2.4.0 and adapter 2.6.0 with support for text messaging --- alexa-remote.js | 77 ++++++++++++++++++++++++++++++++++++++++--------- package.json | 5 ++-- readme.md | 3 ++ 3 files changed, 69 insertions(+), 16 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 0b2703a3..009b8fa5 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -10,6 +10,7 @@ const querystring = require('querystring'); const os = require('os'); const extend = require('extend'); const AlexaWsMqtt = require('./alexa-wsmqtt.js'); +const uuidv1 = require('uuid/v1'); const EventEmitter = require('events'); @@ -1174,7 +1175,35 @@ class AlexaRemote extends EventEmitter { } getAccount(callback) { - this.httpsGet (`https://alexa-comms-mobile-service.amazon.com/accounts`, callback); + this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/accounts`, callback); + } + + getContacts(options, callback) { + if (typeof options === 'function') { + callback = options; + options = undefined; + } + if (options === undefined) options = {}; + if (options.includePreferencesByLevel === undefined) options.includePreferencesByLevel = 'HomeGroup'; + if (options.includeNonAlexaContacts === undefined) options.includeNonAlexaContacts = true; + if (options.includeHomeGroupMembers === undefined) options.includeHomeGroupMembers = true; + if (options.bulkImportOnly === undefined) options.bulkImportOnly = false; + if (options.includeBlockStatus === undefined) options.includeBlockStatus = false; + if (options.dedupeMode === undefined) options.dedupeMode = 'RemoveCloudOnlyContactDuplicates'; + if (options.homeGroupId === undefined) options.homeGroupId = ''; + + this.httpsGet ( + `https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/contacts + ?includePreferencesByLevel=${options.includePreferencesByLevel} + &includeNonAlexaContacts=${options.includeNonAlexaContacts} + &includeHomeGroupMembers=${options.includeHomeGroupMembers} + &bulkImportOnly=${options.bulkImportOnly} + &includeBlockStatus=${options.includeBlockStatus} + &dedupeMode=${options.dedupeMode} + &homeGroupId=${options.homeGroupId}`, + function (err, result) { + callback (err, result); + }); } getConversations(options, callback) { @@ -1190,7 +1219,7 @@ class AlexaRemote extends EventEmitter { if (options.includeUserName === undefined) options.includeUserName = true; this.httpsGet ( - `https://alexa-comms-mobile-service.amazon.com/users/${this.commsId}/conversations + `https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations ?latest=${options.latest} &includeHomegroup=${options.includeHomegroup} &unread=${options.unread} @@ -1611,28 +1640,48 @@ class AlexaRemote extends EventEmitter { } sendTextMessage(conversationId, text, callback) { - let o = { + // [{ + // "conversationId": "amzn1.comms.messaging.id.conversationV2~e48ea7a9-b358-44fa-9be4-e45ae6a37c6a", + // "clientMessageId": "36772d6a-c2ba-4294-955f-afc3336a444c", + // "messageId": 1.001, + // "time": "2019-07-18T21:32:26.863Z", + // "sender": "amzn1.comms.id.person.amzn1~amzn1.account.AEQ4CW5IVBICJ5PQNYI5RYKBSDXQ", + // "type": "message/text", + // "payload": { + // "text": "Test atest" + // }, + // "status": 1 + // }] + + let message = [{ + conversationId: 'amzn1.comms.messaging.id.conversationV2~' + uuidv1(), + clientMessageId: uuidv1(), + messageId: 0.001, + time: new Date().toISOString(), + sender: this.commsId, type: 'message/text', payload: { text: text - } - }; + }, + status: 1 + }]; - this.httpsGet (`https://alexa-comms-mobile-service.amazon.com/users/${this.commsId}/conversations/${conversationId}/messages`, + this.httpsGet(`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}/messages`, callback, { method: 'POST', - data: JSON.stringify (o), - headers: { - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' - } - // Content-Type: application/x-www-form-urlencoded; - // charset=UTF-8',#\r\n - // Referer: https://alexa.amazon.de/spa/index.html' + data: JSON.stringify (message) } ); } + deleteConversation(conversationId, callback) { + let flags = { + method: 'DELETE' + }; + this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}`, callback, flags); + } + setList(serialOrName, listType, value, callback) { let dev = this.find(serialOrName); if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); @@ -1666,7 +1715,7 @@ class AlexaRemote extends EventEmitter { } getHomeGroup(callback) { - this.httpsGet (`https://alexa-comms-mobile-service.amazon.com/users/${this.commsId}/identities?includeUserName=true`, callback); + this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/identities?includeUserName=true`, callback); } getDevicePreferences(callback) { diff --git a/package.json b/package.json index 33abdb8b..e86d41f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.3.7", + "version": "2.4.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -29,7 +29,8 @@ "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^6.2.1", - "extend": "^3.0.2" + "extend": "^3.0.2", + "uuid": "^3.3.2" }, "devDependencies": { "mocha": "^6.1.4", diff --git a/readme.md b/readme.md index 5bfa7934..0c4d251a 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.4.0 (2019-07-21) +* (Apollon77) Finalize methods and logix to send and read and delete messages and what's needed for this + ### 2.3.7 (2019-07-06) * (Apollon77) fix (finally) special case on authentication check From 2f6ef46ed44c81af3f946f171c68d841512f4cee Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 21 Jul 2019 23:11:57 +0200 Subject: [PATCH 049/356] alexa-remote lib 2.5.0, adapter 2.6.0 finalize --- alexa-remote.js | 41 ++++++++++++++++++++++++++++++++--------- package.json | 2 +- readme.md | 3 +++ 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 009b8fa5..496d593d 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1339,12 +1339,23 @@ class AlexaRemote extends EventEmitter { ); } - createSequenceNode(command, value, callback) { + createSequenceNode(command, value, serialOrName, callback) { + if (typeof serialOrName === 'function') { + callback = serialOrName; + serialOrName = undefined; + } + let deviceSerialNumber = 'ALEXA_CURRENT_DSN'; + let deviceType= 'ALEXA_CURRENT_DEVICE_TYPE'; + if (serialOrName && !Array.isArray(serialOrName)) { + const currDevice = this.find(serialOrName); + deviceSerialNumber = currDevice.serialNumber; + deviceType = currDevice.deviceType; + } const seqNode = { '@type': 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode', 'operationPayload': { - 'deviceType': 'ALEXA_CURRENT_DEVICE_TYPE', - 'deviceSerialNumber': 'ALEXA_CURRENT_DSN', + 'deviceType': deviceType, + 'deviceSerialNumber': deviceSerialNumber, 'locale': 'ALEXA_CURRENT_LOCALE', 'customerId':'ALEXA_CUSTOMER_ID' } @@ -1389,8 +1400,8 @@ class AlexaRemote extends EventEmitter { seqNode.type = 'Alexa.DeviceControls.Stop'; seqNode.operationPayload.devices = [ { - "deviceSerialNumber": "ALEXA_CURRENT_DSN", - "deviceType": "ALEXA_CURRENT_DEVICE_TYPE" + "deviceSerialNumber": deviceSerialNumber, + "deviceType": deviceType } ]; seqNode.operationPayload.isAssociatedDevice = false; @@ -1489,11 +1500,23 @@ class AlexaRemote extends EventEmitter { "customerId": "ALEXA_CUSTOMER_ID", "devices": [ { - "deviceSerialNumber": "ALEXA_CURRENT_DSN", - "deviceTypeId": "ALEXA_CURRENT_DEVICE_TYPE" + "deviceSerialNumber": deviceSerialNumber, + "deviceTypeId": deviceType } ] }; + if (serialOrName && Array.isArray(serialOrName)) { + seqNode.operationPayload.target.devices = []; + serialOrName.forEach((deviceId) => { + const currDevice = this.find(deviceId); + if (!currDevice) return; + seqNode.operationPayload.target.devices.push({ + "deviceSerialNumber": currDevice.serialNumber, + "deviceTypeId": currDevice.deviceType + }); + }); + } + delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; delete seqNode.operationPayload.locale; @@ -1513,7 +1536,7 @@ class AlexaRemote extends EventEmitter { let nodes = []; for (let command of commands) { - const commandNode = this.createSequenceNode(command.command, command.value, callback); + const commandNode = this.createSequenceNode(command.command, command.value, command.device ? command.device : serialOrName, callback); if (commandNode) nodes.push(commandNode); } @@ -1532,7 +1555,7 @@ class AlexaRemote extends EventEmitter { } sendSequenceCommand(serialOrName, command, value, callback) { - let dev = this.find(serialOrName); + let dev = this.find(Array.isArray(serialOrName) ? serialOrName[0] : serialOrName); if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); if (typeof value === 'function') { diff --git a/package.json b/package.json index e86d41f1..a652a296 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.4.0", + "version": "2.5.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 0c4d251a..afcc7b5b 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.5.0 (2019-07-21) +* (Apollon77) enhance announce/ssml to allow send to multiple devices using one command + ### 2.4.0 (2019-07-21) * (Apollon77) Finalize methods and logix to send and read and delete messages and what's needed for this From 6bea808c38e8b242f65ff03caab982946f2b20d1 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 21 Jul 2019 23:15:52 +0200 Subject: [PATCH 050/356] alexa-remote lib 2.5.1, adapter 2.6.0 finalize --- alexa-wsmqtt.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 alexa-wsmqtt.js diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js old mode 100644 new mode 100755 index ef4b3389..1415eedd --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -94,7 +94,7 @@ class AlexaWsMqtt extends EventEmitter { this.pingPongInterval = null; } if (this.pongTimeout) { - clearInterval(this.pongTimeout); + clearTimeout(this.pongTimeout); this.pongTimeout = null; } if (code === 4001 && reason.startsWith('before - Could not find any')) { // code = 40001, reason = "before - Could not find any vali" diff --git a/package.json b/package.json index a652a296..a9a3d530 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.5.0", + "version": "2.5.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From e7494467f2ef2df6b10a69d2fbc99861089220c2 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 22 Jul 2019 22:48:28 +0200 Subject: [PATCH 051/356] alexa-remote 2.5.3 and alexa2 2.6.1 --- alexa-remote.js | 3 +++ package.json | 2 +- readme.md | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 496d593d..77fab552 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -956,6 +956,9 @@ class AlexaRemote extends EventEmitter { if (notification.type !== 'Timer') { value = new Date(value); notification.alarmTime = value.getTime(); + if (value.getTime() > new Date().getTime()) { + notification.originalDate = `${value.getFullYear()}-${_00(value.getMonth() + 1)}-${_00(value.getDate())}`; + } notification.originalTime = `${_00 (value.getHours ())}:${_00 (value.getMinutes ())}:${_00 (value.getSeconds ())}.000`; } /*else { diff --git a/package.json b/package.json index a9a3d530..04c778ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.5.1", + "version": "2.5.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index afcc7b5b..5435467e 100644 --- a/readme.md +++ b/readme.md @@ -27,7 +27,10 @@ Thank you for that work. ## Changelog: -### 2.5.0 (2019-07-21) +### 2.5.3 (2019-07-22) +* (Apollon77) also allow Reminders in Future >+1 day + +### 2.5.0/1 (2019-07-21) * (Apollon77) enhance announce/ssml to allow send to multiple devices using one command ### 2.4.0 (2019-07-21) From f49c278fcf5d551ce4284d0c1aa6f41c798a9483 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 8 Aug 2019 09:35:40 +0200 Subject: [PATCH 052/356] 2.5.4 --- alexa-remote.js | 16 ++++++++-------- package.json | 2 +- readme.md | 3 +++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 77fab552..616afcd0 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1745,11 +1745,11 @@ class AlexaRemote extends EventEmitter { } getDevicePreferences(callback) { - this.httpsGet ('https://alexa.amazon.de/api/device-preferences?cached=true&_=%t', callback); + this.httpsGet ('/api/device-preferences?cached=true&_=%t', callback); } getSmarthomeDevices(callback) { - this.httpsGet ('https://alexa.amazon.de/api/phoenix?_=%t', function (err, res) { + this.httpsGet ('/api/phoenix?_=%t', function (err, res) { if (err || !res || !res.networkDetail) return callback(err, res); try { res = JSON.parse(res.networkDetail); @@ -1762,7 +1762,7 @@ class AlexaRemote extends EventEmitter { } getSmarthomeGroups(callback) { - this.httpsGet ('https://alexa.amazon.de/api/phoenix/group?_=%t', callback); + this.httpsGet ('/api/phoenix/group?_=%t', callback); } getSmarthomeEntities(callback) { @@ -1799,7 +1799,7 @@ class AlexaRemote extends EventEmitter { deviceType: dev.deviceType, //deviceOwnerCustomerId: oo.deviceOwnerCustomerId }; - this.httpsGet (`https://alexa.amazon.de/api/devices-v2/device/${dev.serialNumber}`, + this.httpsGet (`/api/devices-v2/device/${dev.serialNumber}`, callback, { method: 'PUT', @@ -1813,7 +1813,7 @@ class AlexaRemote extends EventEmitter { method: 'DELETE' //data: JSON.stringify (o), }; - this.httpsGet (`https://alexa.amazon.de/api/phoenix/appliance/${smarthomeDevice}`, callback, flags); + this.httpsGet (`/api/phoenix/appliance/${smarthomeDevice}`, callback, flags); } deleteSmarthomeGroup(smarthomeGroup, callback) { @@ -1821,7 +1821,7 @@ class AlexaRemote extends EventEmitter { method: 'DELETE' //data: JSON.stringify (o), }; - this.httpsGet (`https://alexa.amazon.de/api/phoenix/group/${smarthomeGroup}`, callback, flags); + this.httpsGet (`/api/phoenix/group/${smarthomeGroup}`, callback, flags); } deleteAllSmarthomeDevices(callback) { @@ -1948,7 +1948,7 @@ class AlexaRemote extends EventEmitter { bluetoothDeviceClass: 'OTHER' }) }; - this.httpsGet (`https://alexa.amazon.de/api/bluetooth/unpair-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); + this.httpsGet (`/api/bluetooth/unpair-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); } deleteDevice(serialOrName, callback) { @@ -1961,7 +1961,7 @@ class AlexaRemote extends EventEmitter { deviceType: dev.deviceType }) }; - this.httpsGet (`https://alexa.amazon.de/api/devices/device/${dev.serialNumber}?deviceType=${dev.deviceType}`, callback, flags); + this.httpsGet (`/api/devices/device/${dev.serialNumber}?deviceType=${dev.deviceType}`, callback, flags); } } diff --git a/package.json b/package.json index 04c778ee..e19b9372 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.5.3", + "version": "2.5.4", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 5435467e..e898294b 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.5.4 (2019-08-08) +* (Apollon77) make sure amazon domains are used as configured instead of "amazon.de" sometimes + ### 2.5.3 (2019-07-22) * (Apollon77) also allow Reminders in Future >+1 day From 49e6d43cae71038c11f5867446c8c7d2f8551591 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 9 Aug 2019 08:39:57 +0200 Subject: [PATCH 053/356] 2.5.5, closes #50 --- alexa-wsmqtt.js | 2 +- package.json | 2 +- readme.md | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 1415eedd..d8033829 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -15,7 +15,7 @@ class AlexaWsMqtt extends EventEmitter { this.stop = false; let serialArr = null; this.cookie = cookie; - if (cookie) serialArr = cookie.match(/ubid-acbde=([^;]+);/); + if (cookie) serialArr = cookie.match(/ubid-[a-z]+=([^;]+);/); if (!serialArr || !serialArr[1]) { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Cookie incomplete : ' + JSON.stringify(serialArr)); return undefined; diff --git a/package.json b/package.json index e19b9372..92545926 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.5.4", + "version": "2.5.5", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index e898294b..80377373 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 2.5.5 (2019-08-09) +* (Apollon77) user different mqtt regex to hopefully support other countries better + ### 2.5.4 (2019-08-08) * (Apollon77) make sure amazon domains are used as configured instead of "amazon.de" sometimes From 2c6b8cd7b52a8322ef1e08cb810592dd13812108 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2019 04:22:42 +0000 Subject: [PATCH 054/356] Bump ws from 6.2.1 to 7.2.0 Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 7.2.0. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/6.2.1...7.2.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92545926..acea6604 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "alexa-cookie2": "^2.1.0", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^6.2.1", + "ws": "^7.2.0", "extend": "^3.0.2", "uuid": "^3.3.2" }, From d815e6af8a67bef4b3124512e02ef86f151d4b07 Mon Sep 17 00:00:00 2001 From: Zefau Date: Sat, 30 Nov 2019 14:03:41 +0100 Subject: [PATCH 055/356] added functionalities for Lists --- alexa-remote.js | 218 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 149 insertions(+), 69 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 616afcd0..2426340e 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -343,6 +343,9 @@ class AlexaRemote extends EventEmitter { this.emit('ws-unknown-message', incomingMsg); }); this.alexaWsMqtt.on('command', (command, payload) => { + + this.emit('command', { 'command': command, 'payload': payload }); + switch(command) { case 'PUSH_DOPPLER_CONNECTION_CHANGE': /* @@ -611,10 +614,28 @@ class AlexaRemote extends EventEmitter { this.emit('ws-device-activity', activity); }); return; - case 'PUSH_TODO_CHANGE': + + case 'PUSH_TODO_CHANGE': // does not exist? + case 'PUSH_LIST_CHANGE': // does not exist? case 'PUSH_LIST_ITEM_CHANGE': - case 'PUSH_LIST_CHANGE': - + /* + { + destinationUserId:'A12XXXXXWISGT', + listId:'YW16bjEuYWNjb3VudC5BRzJGWEpGWE5DRDZNVzNRSUdFM0xLWkZCWFhRLVRBU0s=', + eventName:'itemCreated', + version:1, + listItemId:'c6852978-bb79-44dc-b7e5-8f5e577432cf' + } + */ + this.emit('ws-todo-change', { + destinationUserId: payload.destinationUserId, + eventType: payload.eventName, // itemCreated, itemUpdated (including checked ToDo), itemDeleted + listId: payload.listId, + listItemVersion: payload.version, + listItemId: payload.listItemId + }); + return; + case 'PUSH_MICROPHONE_STATE': case 'PUSH_DELETE_DOPPLER_ACTIVITIES': break; @@ -683,6 +704,7 @@ class AlexaRemote extends EventEmitter { } httpsGetCall(path, callback, flags = {}) { + let options = { host: this.baseUrl, path: '', @@ -727,9 +749,10 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers['Content-Type']; delete logOptions.headers.Referer; delete logOptions.headers.Origin; - this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT') ? 'and data=' + flags.data : '')); - let req = https.request(options, (res) => { - let body  = ''; + this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); + + let req = https.request(options, (res) => { + let body = ''; res.on('data', (chunk) => { body += chunk; @@ -737,19 +760,22 @@ class AlexaRemote extends EventEmitter { res.on('end', () => { let ret; + if (typeof callback === 'function') { - if (!body) { + if (!body) { // Method 'DELETE' may return HTTP STATUS 200 without body this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); - return callback/*.length >= 2*/ && callback(new Error('no body'), null); + return res.statusCode.toString().substr(0,1) == '2' ? callback(null, { 'success': true }) : callback(new Error('no body'), null); } + try { ret = JSON.parse(body); } catch(e) { this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); - if (callback/*.length >= 2*/) return callback (new Error('no JSON'), body); + return callback (new Error('no JSON'), body); } + this._options.logger && this._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); - if (callback/*.length >= 2*/) return callback (null, ret); + return callback (null, ret); callback(ret); } }); @@ -760,9 +786,11 @@ class AlexaRemote extends EventEmitter { return callback (e, null); } }); + if (flags && flags.data) { req.write(flags.data); } + req.end(); } @@ -812,42 +840,121 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`/api/np/player?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); } - getList(serialOrName, listType, options, callback) { - let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); - + getLists(callback) { + this.httpsGet ('/api/namedLists?_=%t', (err, res) => callback && callback(err, res && res.lists)); + } + + getList(listId, callback) { + this.httpsGet ('/api/namedLists/' + listId + '?_=%t', callback); + } + + /** + * Get items from a list. + * + * @param {String} listId List ID to retrieve items from + * @param {Object} [options] additional options to filter items + * @param {String} [options.startTime] filter items regarding start time + * @param {String} [options.endTime] filter items regarding end time + * @param {String} [options.completed] filter items regarding completion + * @param {String} [options.listIds] list IDs + * + */ + getListItems(listId, options, callback) { + + // get function params if (typeof options === 'function') { callback = options; options = {}; } - this.httpsGet (` - /api/todos?size=${options.size || 100} - &startTime=${options.startTime || ''} - &endTime=${options.endTime || ''} - &completed=${options.completed || false} - &type=${listType} - &deviceSerialNumber=${dev.serialNumber} - &deviceType=${dev.deviceType} - &_=%t`, - callback); - } - - getLists(serialOrName, options, callback) { - let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); - - this.getList(dev, 'TASK', options, function(err, res) { - let ret = {}; - if (!err && res) { - ret.tasks = res; - } - this.getList(dev, 'SHOPPING_ITEM', options, function(err, res) { - ret.shoppingItems = res; - callback && callback(null, ret); - }); - }); - } - + + // get params by options + let params = ''; + for (let option in options) { + params += '&' + option + '=' + options[option]; + } + + // send request + this.httpsGet ('/api/namedLists/' + listId + '/items?_=%t' + params, (err, res) => callback && callback(err, res && res.list)); + } + + addListItem(listId, options, callback) { + + // get function params + if (typeof options === 'string') { + options = { 'value': options }; + } + + // request options + let request = { + 'method': 'POST', + 'data': JSON.stringify({ + 'listId': listId, + 'createdDateTime': new Date().getTime(), + 'completed': false, + ...options + }) + }; + + // send request + this.httpsGet ('/api/namedLists/' + listId + '/item', callback, request); + } + + updateListItem(listId, listItem, options, callback) { + + // providing a version is mandatory + if (typeof options !== 'object' || !options.version || !options.value) { + let errors = []; + + if (!options.version && callback) { + errors.push('Providing the current version via options is mandatory!'); + } + + if (!options.value && callback) { + errors.push('Providing a new value (description) via options is mandatory!'); + } + + callback && callback(errors); + return false; + } + + // request options + let request = { + 'method': 'PUT', + 'data': JSON.stringify({ + 'listId': listId, + 'id': listItem, + 'updatedDateTime': new Date().getTime(), + ...options + }) + }; + + // send request + this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); + } + + deleteListItem(listId, listItem, callback) { + + // data + let data = JSON.stringify({ + 'listId': listId, + 'id': listItem, + 'value': '' // must be provided, but value doesn't matter + }); + + // request options + let request = { + 'method': 'DELETE', + 'data': data, + 'headers': { + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + }; + + // send request + this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); + } + getWakeWords(callback) { this.httpsGet (`/api/wake-word?_=%t`, callback); } @@ -1708,33 +1815,6 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}`, callback, flags); } - setList(serialOrName, listType, value, callback) { - let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); - - let o = { - type: listType, - text: value, - createdDate: new Date().getTime(), - complete: false, - deleted: false - }; - - this.httpsGet (`/api/todos?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, - callback, - { - method: 'POST', - data: JSON.stringify (o), - headers: { - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' - } - // Content-Type: application/x-www-form-urlencoded; - // charset=UTF-8',#\r\n - // Referer: https://alexa.amazon.de/spa/index.html' - } - ); - } - setReminder(serialOrName, timestamp, label, callback) { const notification = this.createNotificationObject(serialOrName, 'Reminder', label, new Date(timestamp)); this.createNotification(notification, callback); From b07ed6fe52c3e18ed77a1b306e93c6609e52cccd Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 30 Nov 2019 14:34:34 +0100 Subject: [PATCH 056/356] 2.6.0 --- .gitignore | 1 + .npmignore | 4 +- package-lock.json | 612 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 11 +- readme.md | 4 + 5 files changed, 624 insertions(+), 8 deletions(-) create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index b8c7c006..ca22b764 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,4 @@ $RECYCLE.BIN/ *.lnk .idea +.github \ No newline at end of file diff --git a/.npmignore b/.npmignore index a5abe61d..399c8cb5 100644 --- a/.npmignore +++ b/.npmignore @@ -2,4 +2,6 @@ Gruntfile.js tasks node_modules .git -.idea \ No newline at end of file +.idea +.github +package-lock.json \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..e639aa7d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,612 @@ +{ + "name": "alexa-remote2", + "version": "2.6.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "alexa-cookie2": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.0.tgz", + "integrity": "sha512-2TGvAEklc4f3PPpVbotmb2wsZ+BD/EUwhlgsQk7NXWxy+8oz3tzNANus+EmrOZLygdV3pZcOzZ3hBiCZuKIXaQ==", + "requires": { + "cookie": "^0.4.0", + "express": "^4.17.1", + "http-proxy-middleware": "^0.20.0", + "http-proxy-response-rewrite": "^0.0.1", + "https": "^1.0.0", + "querystring": "^0.2.0" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "bufferhelper": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/bufferhelper/-/bufferhelper-0.2.1.tgz", + "integrity": "sha1-+nSjhXJKWOJC8ErWZGwjZvg7kT4=" + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "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" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eventemitter3": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "follow-redirects": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", + "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "requires": { + "debug": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http-proxy": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", + "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-middleware": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.20.0.tgz", + "integrity": "sha512-dNJAk71nEJhPiAczQH9hGvE/MT9kEs+zn2Dh+Hi94PGZe1GluQirC7mw5rdREUtWx6qGS1Gu0bZd4qEAg+REgw==", + "requires": { + "http-proxy": "^1.17.0", + "is-glob": "^4.0.1", + "lodash": "^4.17.14", + "micromatch": "^4.0.2" + } + }, + "http-proxy-response-rewrite": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-response-rewrite/-/http-proxy-response-rewrite-0.0.1.tgz", + "integrity": "sha512-smtaa2sKgiWrP9c9W+/MFzgjeh3A4zsQOLh1S3rp1NsmNYIVO07AlWUnhoUnMZIuxY6+3v7OS5NlDGX2I2DWBQ==", + "requires": { + "bufferhelper": "^0.2.1", + "concat-stream": "^1.5.1" + } + }, + "https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz", + "integrity": "sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q=" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.42.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", + "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==" + }, + "mime-types": { + "version": "2.1.25", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz", + "integrity": "sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==", + "requires": { + "mime-db": "1.42.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "picomatch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", + "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "proxy-addr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.0" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "ws": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.0.tgz", + "integrity": "sha512-+SqNqFbwTm/0DC18KYzIsMTnEWpLwJsiasW/O17la4iDRRIO9uaHbvKiAS3AHgTiuuWerK/brj4O6MYZkei9xg==", + "requires": { + "async-limiter": "^1.0.0" + } + } + } +} diff --git a/package.json b/package.json index acea6604..66a89b1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.5.5", + "version": "2.6.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -25,17 +25,14 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^2.1.0", + "alexa-cookie2": "^3.0.0", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.2.0", "extend": "^3.0.2", - "uuid": "^3.3.2" - }, - "devDependencies": { - "mocha": "^6.1.4", - "chai": "^4.2.0" + "uuid": "^3.3.3" }, + "devDependencies": {}, "scripts": { "test": "node node_modules/mocha/bin/mocha" }, diff --git a/readme.md b/readme.md index 80377373..684c3e50 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,10 @@ Thank you for that work. ## Changelog: +### 2.6.0 (2019-11-30) +* (Apollon77) dependency updates +* (Zefau) add functionality for handling of lists + ### 2.5.5 (2019-08-09) * (Apollon77) user different mqtt regex to hopefully support other countries better From 99962d90bc7dc1a51b64ccdacead05a8b4e7bd9c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 30 Nov 2019 14:36:32 +0100 Subject: [PATCH 057/356] 3.0.0 add github actions --- .github/workflows/test-and-release.yml | 73 ++++++++++++++++++++++++++ .gitignore | 1 - 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-and-release.yml diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml new file mode 100644 index 00000000..37a5e942 --- /dev/null +++ b/.github/workflows/test-and-release.yml @@ -0,0 +1,73 @@ +# This is a composition of lint and test scripts +# Make sure to update this file along with the others + +name: Test and Release + +# Run this job on all pushes and pull requests +# as well as tags with a semantic version +on: + push: + branches: + - '*' + tags: + - 'v?[0-9]+.[0-9]+.[0-9]+' + pull_request: {} + +jobs: + # Performs quick checks before the expensive test runs + check-and-lint: + if: contains(github.event.head_commit.message, '[skip ci]') == false + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install Dependencies + run: npm ci + + # Deploys the final package to NPM + deploy: + needs: [check-and-lint] + + # Trigger this step only when a commit on master is tagged with a version number + if: | + contains(github.event.head_commit.message, '[skip ci]') == false && + github.event_name == 'push' && + github.event.base_ref == 'refs/heads/master' && + startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install Dependencies + run: npm ci + + - name: Publish package to npm + run: | + npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} + npm whoami + npm publish + # Dummy job for skipped builds - without this, github reports the build as failed + skip-ci: + if: contains(github.event.head_commit.message, '[skip ci]') + runs-on: ubuntu-latest + steps: + - name: Skip build + run: echo "Build skipped!" \ No newline at end of file diff --git a/.gitignore b/.gitignore index ca22b764..b8c7c006 100644 --- a/.gitignore +++ b/.gitignore @@ -86,4 +86,3 @@ $RECYCLE.BIN/ *.lnk .idea -.github \ No newline at end of file From 35c473567fb1e80aea0e5cc8c8ef3e1886a2f135 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2019 04:18:20 +0000 Subject: [PATCH 058/356] Bump ws from 7.2.0 to 7.2.1 Bumps [ws](https://github.com/websockets/ws) from 7.2.0 to 7.2.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.2.0...7.2.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index e639aa7d..c47afc7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,11 +31,6 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -601,12 +596,9 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "ws": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.0.tgz", - "integrity": "sha512-+SqNqFbwTm/0DC18KYzIsMTnEWpLwJsiasW/O17la4iDRRIO9uaHbvKiAS3AHgTiuuWerK/brj4O6MYZkei9xg==", - "requires": { - "async-limiter": "^1.0.0" - } + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.1.tgz", + "integrity": "sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==" } } } From 42e7de53e6a75715f27e958f7e90519153b57812 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 21 Dec 2019 17:47:01 +0100 Subject: [PATCH 059/356] 3.0.0 initial commit --- .travis.yml | 7 ++-- alexa-remote.js | 97 ++++++++++++++++++++++++------------------------- package.json | 5 ++- readme.md | 3 +- 4 files changed, 57 insertions(+), 55 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2b84eb1..bd695a6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,7 @@ # - osx language: node_js node_js: - - "0.10" - - "0.12" - - "4" - - "6" + - "8" + - "10" + - "12" diff --git a/alexa-remote.js b/alexa-remote.js index 2426340e..0e8bfc31 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -638,7 +638,7 @@ class AlexaRemote extends EventEmitter { case 'PUSH_MICROPHONE_STATE': case 'PUSH_DELETE_DOPPLER_ACTIVITIES': - break; + return; } @@ -1226,57 +1226,56 @@ class AlexaRemote extends EventEmitter { if (err || !result) return callback/*.length >= 2*/ && callback(err, result); let ret = []; - for (let r = 0; r < result.activities.length; r++) { - let res = result.activities[r]; - let o = { - data: res - }; - try { - o.description = JSON.parse(res.description); - } - catch (e) { - if (res.description) { - o.description = {'summary': res.description}; - } - else { - return; - } - } - if (!o.description) continue; - o.description.summary = (o.description.summary || '').trim (); - if (options.filter) { - switch (o.description.summary) { - case 'stopp': - case 'alexa': - case 'echo': - case 'computer': - case 'amazon': - case ',': - case '': - continue; - } - } - for (let i = 0; i < res.sourceDeviceIds.length; i++) { - o.deviceSerialNumber = res.sourceDeviceIds[i].serialNumber; - if (!this.serialNumbers[o.deviceSerialNumber]) continue; - o.name = this.serialNumbers[o.deviceSerialNumber].accountName; - const dev = this.find(o.deviceSerialNumber); - let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; - if (wakeWord && o.description.summary.startsWith(wakeWord)) { - o.description.summary = o.description.summary.substr(wakeWord.length).trim(); - } - o.deviceType = res.sourceDeviceIds[i].deviceType || null; - o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; - - o.creationTimestamp = res.creationTimestamp || null; - o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED + if (result.activities) { + for (let r = 0; r < result.activities.length; r++) { + let res = result.activities[r]; + let o = { + data: res + }; try { - o.domainAttributes = res.domainAttributes ? JSON.parse(res.domainAttributes) : null; + o.description = JSON.parse(res.description); + } catch (e) { + if (res.description) { + o.description = {'summary': res.description}; + } else { + return; + } } - catch(e) { - o.domainAttributes = res.domainAttributes || null; + if (!o.description) continue; + o.description.summary = (o.description.summary || '').trim(); + if (options.filter) { + switch (o.description.summary) { + case 'stopp': + case 'alexa': + case 'echo': + case 'computer': + case 'amazon': + case ',': + case '': + continue; + } + } + for (let i = 0; i < res.sourceDeviceIds.length; i++) { + o.deviceSerialNumber = res.sourceDeviceIds[i].serialNumber; + if (!this.serialNumbers[o.deviceSerialNumber]) continue; + o.name = this.serialNumbers[o.deviceSerialNumber].accountName; + const dev = this.find(o.deviceSerialNumber); + let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; + if (wakeWord && o.description.summary.startsWith(wakeWord)) { + o.description.summary = o.description.summary.substr(wakeWord.length).trim(); + } + o.deviceType = res.sourceDeviceIds[i].deviceType || null; + o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; + + o.creationTimestamp = res.creationTimestamp || null; + o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED + try { + o.domainAttributes = res.domainAttributes ? JSON.parse(res.domainAttributes) : null; + } catch (e) { + o.domainAttributes = res.domainAttributes || null; + } + if (o.description.summary || !options.filter) ret.push(o); } - if (o.description.summary || !options.filter) ret.push (o); } } if (typeof callback === 'function') return callback (err, ret); diff --git a/package.json b/package.json index 66a89b1b..9f6efdef 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "alexa-cookie2": "^3.0.0", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.2.0", + "ws": "^7.2.1", "extend": "^3.0.2", "uuid": "^3.3.3" }, @@ -43,6 +43,9 @@ "bugs": { "url": "https://github.com/Apollon77/alexa-remote/issues" }, + "engines": { + "node": ">=8.0.0" + }, "main": "alexa-remote.js", "readmeFilename": "readme.md" } diff --git a/readme.md b/readme.md index 684c3e50..b4c4ba7c 100644 --- a/readme.md +++ b/readme.md @@ -27,9 +27,10 @@ Thank you for that work. ## Changelog: -### 2.6.0 (2019-11-30) +### 3.0.0 (2019-12-xx) * (Apollon77) dependency updates * (Zefau) add functionality for handling of lists +* nodejs 8.x is minimum now! ### 2.5.5 (2019-08-09) * (Apollon77) user different mqtt regex to hopefully support other countries better From 9b38eec464efeabae0e2b23cc3ae3648f42a15d0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 24 Dec 2019 00:28:50 +0100 Subject: [PATCH 060/356] 3.0.0 --- package-lock.json | 2 +- package.json | 2 +- readme.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c47afc7d..0ede8e08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.6.0", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9f6efdef..a349c60b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "2.6.0", + "version": "3.0.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index b4c4ba7c..e8134bc8 100644 --- a/readme.md +++ b/readme.md @@ -27,7 +27,7 @@ Thank you for that work. ## Changelog: -### 3.0.0 (2019-12-xx) +### 3.0.0 (2019-12-24) * (Apollon77) dependency updates * (Zefau) add functionality for handling of lists * nodejs 8.x is minimum now! From 0864cc684eb7796102edd74f900325702087e6ba Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 24 Dec 2019 00:40:31 +0100 Subject: [PATCH 061/356] 3.0.3 --- .npmignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 399c8cb5..566e6ac5 100644 --- a/.npmignore +++ b/.npmignore @@ -4,4 +4,7 @@ node_modules .git .idea .github -package-lock.json \ No newline at end of file +package-lock.json +.gitattributes +.travis.yml +appveyor.yml \ No newline at end of file From 561078d1b80ac6782b5db01ffeccc3b8ad711225 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 24 Dec 2019 23:15:27 +0100 Subject: [PATCH 062/356] 3.0.1 --- package-lock.json | 8 ++++---- package.json | 4 ++-- readme.md | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0ede8e08..6218319e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.0.0", + "version": "3.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -14,9 +14,9 @@ } }, "alexa-cookie2": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.0.tgz", - "integrity": "sha512-2TGvAEklc4f3PPpVbotmb2wsZ+BD/EUwhlgsQk7NXWxy+8oz3tzNANus+EmrOZLygdV3pZcOzZ3hBiCZuKIXaQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.1.tgz", + "integrity": "sha512-0eileMoyqsQVdUPasxOdM+oVhQAYDLkLf3/QBtULk6xtK7fiGwh9G06xdW5rEbU89mIhwTIAP09tr9rCGyKfAA==", "requires": { "cookie": "^0.4.0", "express": "^4.17.1", diff --git a/package.json b/package.json index a349c60b..b955dee9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.0.0", + "version": "3.0.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.0.0", + "alexa-cookie2": "^3.0.1", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.2.1", diff --git a/readme.md b/readme.md index e8134bc8..4c06741a 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 3.0.1 (2019-12-24) +* (Apollon77) Prevent some errors, dependency update + ### 3.0.0 (2019-12-24) * (Apollon77) dependency updates * (Zefau) add functionality for handling of lists From 88f55f2792497b2bb09d8c9a63031522e0a17350 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 26 Dec 2019 20:18:52 +0100 Subject: [PATCH 063/356] 3.0.2 --- alexa-wsmqtt.js | 4 ++-- package.json | 2 +- readme.md | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index d8033829..062a1763 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -120,7 +120,7 @@ class AlexaWsMqtt extends EventEmitter { this.websocket.on('error', (error) => { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Error: ' + error); this.emit('error', error); - this.websocket.terminate(); + this.websocket && this.websocket.terminate(); }); this.websocket.on('unexpected-response', (request, response) => { @@ -170,7 +170,7 @@ class AlexaWsMqtt extends EventEmitter { this.pongTimeout = setTimeout(() => { this.pongTimeout = null; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: No Pong received after 30s'); - this.websocket.close(); + this.websocket && this.websocket.close(); }, 30000); }, 180000); } diff --git a/package.json b/package.json index b955dee9..0b882650 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.0.1", + "version": "3.0.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", diff --git a/readme.md b/readme.md index 4c06741a..125a3568 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 3.0.2 (2019-12-26) +* (Apollon77) Prevent some errors + ### 3.0.1 (2019-12-24) * (Apollon77) Prevent some errors, dependency update From 23d75dccc4717e9d4a116b1861e4b4a8766deaed Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 28 Dec 2019 00:09:40 +0100 Subject: [PATCH 064/356] 3.0.3 --- package-lock.json | 8 ++++---- package.json | 4 ++-- readme.md | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6218319e..308bcaad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.0.1", + "version": "3.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -14,9 +14,9 @@ } }, "alexa-cookie2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.1.tgz", - "integrity": "sha512-0eileMoyqsQVdUPasxOdM+oVhQAYDLkLf3/QBtULk6xtK7fiGwh9G06xdW5rEbU89mIhwTIAP09tr9rCGyKfAA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.2.tgz", + "integrity": "sha512-NPNODZBZvcDQQbwSxYhTWfTPPyJy+aNAWX8OUO1E1QbtbuwZlwBBE0C5/HKUnzvgKTq6rc+hFTzWqbQhRla3pQ==", "requires": { "cookie": "^0.4.0", "express": "^4.17.1", diff --git a/package.json b/package.json index 0b882650..5b240577 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.0.2", + "version": "3.0.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.0.1", + "alexa-cookie2": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.2.1", diff --git a/readme.md b/readme.md index 125a3568..827e8056 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 3.0.3 (2019-12-28) +* (Apollon77) update cookie lib + ### 3.0.2 (2019-12-26) * (Apollon77) Prevent some errors From 37bfcf19a1fda6f2314ad3b1a5c10b28037b2649 Mon Sep 17 00:00:00 2001 From: Nebz <28622481+NebzHB@users.noreply.github.com> Date: Sun, 8 Mar 2020 09:10:56 +0100 Subject: [PATCH 065/356] Fix Buffer Constructor depreciated use --- alexa-wsmqtt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 062a1763..086d8693 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -75,7 +75,7 @@ class AlexaWsMqtt extends EventEmitter { }, 30000); // tell Tuning Service that we support "A:H" protocol = AlphaPrococol - const msg = new Buffer('0x99d4f71a 0x0000001d A:HTUNE'); + const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE'); //console.log('SEND: ' + msg.toString('ascii')); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent'); this.websocket.send(msg); @@ -138,7 +138,7 @@ class AlexaWsMqtt extends EventEmitter { else { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + JSON.stringify(message)); } - let msg = new Buffer('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); + let msg = Buffer.from('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); //console.log('SEND: ' + msg.toString('ascii')); this.websocket.send(msg); //msg = new Buffer('MSG 0x00000361 0x0e414e45 f 0x00000001 0xd7c62f29 0x0000009b INI 0x00000003 1.0 0x00000024 ff1c4525-c036-4942-bf6c-a098755ac82f 0x00000164d106ce6b END FABE'); From 01c93f45d6643bdbd64b2b43c078b470d98f8237 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 16 Mar 2020 23:37:46 +0100 Subject: [PATCH 066/356] 3.1.0 alexa-remote * fix cookie RefreshInterval parameters * optimize getting Pushed activities --- alexa-remote.js | 97 +++++++++++++++++++++++++++++++++++------------ alexa-wsmqtt.js | 2 +- package-lock.json | 92 +++++++++++++++++++++++++------------------- package.json | 12 +++--- readme.md | 3 ++ 5 files changed, 136 insertions(+), 70 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 0e8bfc31..4757c8fe 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -10,7 +10,7 @@ const querystring = require('querystring'); const os = require('os'); const extend = require('extend'); const AlexaWsMqtt = require('./alexa-wsmqtt.js'); -const uuidv1 = require('uuid/v1'); +const { v1: uuidv1 } = require('uuid'); const EventEmitter = require('events'); @@ -92,8 +92,12 @@ class AlexaRemote extends EventEmitter { if (this._options.alexaServiceHost) this.baseUrl = this._options.alexaServiceHost; this._options.logger && this._options.logger('Alexa-Remote: Use as Base-URL: ' + this.baseUrl); this._options.alexaServiceHost = this.baseUrl; - if (this._options.refreshCookieInterval !== 0) { - this._options.refreshCookieInterval = this._options.refreshCookieInterval || 7*24*60*60*1000; // Auto Refresh after 7 days + if (this._options.refreshCookieInterval !== undefined && this._options.cookieRefreshInterval === undefined) { + this._options.cookieRefreshInterval = this._options.refreshCookieInterval; + delete this._options.refreshCookieInterval; + } + if (this._options.cookieRefreshInterval !== 0) { + this._options.cookieRefreshInterval = this._options.cookieRefreshInterval || 7*24*60*60*1000; // Auto Refresh after 7 days } const self = this; @@ -264,7 +268,7 @@ class AlexaRemote extends EventEmitter { this.names [name] = device; this.names [name.toLowerCase()] = device; } - device._orig = JSON.parse(JSON.stringify(device)); + //device._orig = JSON.parse(JSON.stringify(device)); device._name = name; device.sendCommand = this.sendCommand.bind(this, device); device.setTunein = this.setTunein.bind(this, device); @@ -330,6 +334,11 @@ class AlexaRemote extends EventEmitter { this.alexaWsMqtt = new AlexaWsMqtt(this._options, this.cookie); if (!this.alexaWsMqtt) return; + this.activityUpdateQueue = []; + this.activityUpdateNotFoundCounter = 0; + this.activityUpdateTimeout = null; + this.activityUpdateRunning = false; + this.alexaWsMqtt.on('disconnect', (retries, msg) => { this.emit('ws-disconnect', retries, msg); }); @@ -594,25 +603,15 @@ class AlexaRemote extends EventEmitter { 'version': 1 } */ - this.getActivities({size: 3, filter: false}, (err, res) => { - if (err || !res) return; - let activity = null; - for (let i = 0; i < res.length; i++) { - if (res[i].data.id.endsWith('#' + payload.key.entryId) && res[i].data.registeredCustomerId === payload.key.registeredUserId) { - activity = res[i]; - break; - } - } - - if (!activity) { - this._options.logger && this._options.logger('Alexa-Remote: Activity for id ' + payload.key.entryId + ' not found'); - return; - } - //this._options.logger && this._options.logger('Alexa-Remote: Activity found for id ' + payload.key.entryId + ': ' + JSON.stringify(activity)); - - activity.destinationUserId = payload.destinationUserId; - this.emit('ws-device-activity', activity); - }); + this.activityUpdateQueue.push(payload); + if (this.activityUpdateTimeout) { + clearTimeout(this.activityUpdateTimeout); + this.activityUpdateTimeout = null; + } + this.activityUpdateTimeout = setTimeout(() => { + this.activityUpdateTimeout = null; + this.getPushedActivities(); + }, 200); return; case 'PUSH_TODO_CHANGE': // does not exist? @@ -648,6 +647,56 @@ class AlexaRemote extends EventEmitter { this.alexaWsMqtt.connect(); } + getPushedActivities() { + if (this.activityUpdateRunning || !this.activityUpdateQueue.length) return; + this.activityUpdateRunning = true; + this.getActivities({size: this.activityUpdateQueue.length + 2, filter: false}, (err, res) => { + this.activityUpdateRunning = false; + if (!err && res) { + + let lastFoundQueueIndex = -1; + this.activityUpdateQueue.forEach((entry, queueIndex) => { + const found = res.findIndex(activity => activity.data.id.endsWith('#' + entry.key.entryId) && activity.data.registeredCustomerId === entry.key.registeredUserId); + + if (found === -1) { + this._options.logger && this._options.logger('Alexa-Remote: Activity for id ' + entry.key.entryId + ' not found'); + } + else { + lastFoundQueueIndex = queueIndex; + const activity = res.splice(found, 1)[0]; + this._options.logger && this._options.logger('Alexa-Remote: Activity found ' + found + ' for Activity ID ' + entry.key.entryId); + activity.destinationUserId = entry.destinationUserId; + this.emit('ws-device-activity', activity); + } + }); + + if (lastFoundQueueIndex === -1) { + this._options.logger && this._options.logger('Alexa-Remote: No activities from stored ' + this.activityUpdateQueue.length + ' entries found in queue (' + this.activityUpdateNotFoundCounter + ')'); + this.activityUpdateNotFoundCounter++; + if (this.activityUpdateNotFoundCounter > 2) { + this._options.logger && this._options.logger('Alexa-Remote: Reset expected activities'); + this.activityUpdateQueue = []; + this.activityUpdateNotFoundCounter = 0; + } + } + else { + this.activityUpdateNotFoundCounter = 0; + this.activityUpdateQueue.splice(0, lastFoundQueueIndex + 1); + this._options.logger && this._options.logger('Alexa-Remote: ' + this.activityUpdateQueue.length + ' entries left in activity queue'); + } + } + + if (this.activityUpdateQueue.length) { + this.activityUpdateTimeout = setTimeout(() => { + this.activityUpdateTimeout = null; + this.getPushedActivities(); + }, 200); + + } + + }); + } + stop() { if (this.cookieRefreshTimeout) { clearTimeout(this.cookieRefreshTimeout); @@ -1501,7 +1550,7 @@ class AlexaRemote extends EventEmitter { seqNode.type = 'Alexa.DeviceControls.Volume'; value = ~~value; if (value < 0 || value > 100) { - return callback(new Error('Volume needs to be between 0 and 100')); + return callback && callback(new Error('Volume needs to be between 0 and 100')); } seqNode.operationPayload.value = value; break; diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 086d8693..22236525 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -124,7 +124,7 @@ class AlexaWsMqtt extends EventEmitter { }); this.websocket.on('unexpected-response', (request, response) => { - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + JSON.stringify(response)); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + response); }); this.websocket.on('message', (data) => { diff --git a/package-lock.json b/package-lock.json index 308bcaad..4c4d552b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,22 @@ { "name": "alexa-remote2", - "version": "3.0.3", + "version": "3.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/http-proxy": { + "version": "1.17.3", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.3.tgz", + "integrity": "sha512-wIPqXANye5BbORbuh74exbwNzj+UWCwWyeEFJzUQ7Fq3W2NSAy+7x7nX1fgbEypr2/TdKqpeuxLnXWgzN533/Q==", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "13.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz", + "integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==" + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -14,13 +27,13 @@ } }, "alexa-cookie2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.2.tgz", - "integrity": "sha512-NPNODZBZvcDQQbwSxYhTWfTPPyJy+aNAWX8OUO1E1QbtbuwZlwBBE0C5/HKUnzvgKTq6rc+hFTzWqbQhRla3pQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.3.tgz", + "integrity": "sha512-vj1hWeVMhHnIbVoilrL8tx1Qk/+cjDfoEUYeT7E52F8fYXkPgRgKawpNdhtP8ZQRrBqXbHEquzTZDb/7m1EO1w==", "requires": { "cookie": "^0.4.0", "express": "^4.17.1", - "http-proxy-middleware": "^0.20.0", + "http-proxy-middleware": "^1.0.2", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.0" @@ -218,9 +231,9 @@ } }, "follow-redirects": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", - "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz", + "integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==", "requires": { "debug": "^3.0.0" }, @@ -273,13 +286,14 @@ } }, "http-proxy-middleware": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.20.0.tgz", - "integrity": "sha512-dNJAk71nEJhPiAczQH9hGvE/MT9kEs+zn2Dh+Hi94PGZe1GluQirC7mw5rdREUtWx6qGS1Gu0bZd4qEAg+REgw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.3.tgz", + "integrity": "sha512-GHvPeBD+A357zS5tHjzj6ISrVOjjCiy0I92bdyTJz0pNmIjFxO0NX/bX+xkGgnclKQE/5hHAB9JEQ7u9Pw4olg==", "requires": { - "http-proxy": "^1.17.0", + "@types/http-proxy": "^1.17.3", + "http-proxy": "^1.18.0", "is-glob": "^4.0.1", - "lodash": "^4.17.14", + "lodash": "^4.17.15", "micromatch": "^4.0.2" } }, @@ -311,9 +325,9 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, "is-extglob": { "version": "2.1.1", @@ -373,16 +387,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", - "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==" + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" }, "mime-types": { - "version": "2.1.25", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz", - "integrity": "sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==", + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", "requires": { - "mime-db": "1.42.0" + "mime-db": "1.43.0" } }, "ms": { @@ -414,9 +428,9 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "picomatch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", - "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", + "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" }, "process-nextick-args": { "version": "2.0.1", @@ -424,12 +438,12 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "qs": { @@ -459,9 +473,9 @@ } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -586,9 +600,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.2.tgz", + "integrity": "sha512-vy9V/+pKG+5ZTYKf+VcphF5Oc6EFiu3W8Nv3P3zIh0EqVI80ZxOzuPfe9EHjkFNvf8+xuTHVeei4Drydlx4zjw==" }, "vary": { "version": "1.1.2", @@ -596,9 +610,9 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "ws": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.1.tgz", - "integrity": "sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==" + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", + "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" } } } diff --git a/package.json b/package.json index 5b240577..d09e86ad 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "alexa-remote2", - "version": "3.0.3", + "version": "3.1.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", - "email": "ingo@fischer-ka.de" + "email": "iobroker@fischer-ka.de" }, "contributors": [ { @@ -13,7 +13,7 @@ }, { "name": "Apollon77", - "email": "ingo@fischer-ka.de" + "email": "iobroker@fischer-ka.de" } ], "homepage": "https://github.com/Apollon77/alexa-remote", @@ -25,12 +25,12 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.0.2", + "alexa-cookie2": "^3.0.3", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.2.1", + "ws": "^7.2.3", "extend": "^3.0.2", - "uuid": "^3.3.3" + "uuid": "^7.0.2" }, "devDependencies": {}, "scripts": { diff --git a/readme.md b/readme.md index 827e8056..56173812 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,9 @@ Thank you for that work. ## Changelog: +### 3.1.0 (2019-12-30) +* (Apollon77) remove device._orig because really big objects happened and got exceptions on deep copy using JSION.stringify + ### 3.0.3 (2019-12-28) * (Apollon77) update cookie lib From 756383db4de518ce1171451c41295092dd905963 Mon Sep 17 00:00:00 2001 From: Jamie Peake Date: Wed, 1 Apr 2020 15:08:50 +1100 Subject: [PATCH 067/356] adds new commands, jokes/facts/etc --- alexa-remote.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/alexa-remote.js b/alexa-remote.js index 4757c8fe..8d76e9f0 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1531,6 +1531,18 @@ class AlexaRemote extends EventEmitter { case 'goodmorning': seqNode.type = 'Alexa.GoodMorning.Play'; break; + case 'goodnight': + seqNode.type = 'Alexa.GoodNight.Play'; + break; + case 'funfact': + seqNode.type = 'Alexa.FunFact.Play'; + break; + case 'joke': + seqNode.type = 'Alexa.Joke.Play'; + break; + case 'cleanup': + seqNode.type = 'Alexa.CleanUp.Play'; + break; case 'singasong': seqNode.type = 'Alexa.SingASong.Play'; break; From f6dde4057b95ac807006589e8845ea5f4371734e Mon Sep 17 00:00:00 2001 From: Jamie Peake Date: Wed, 1 Apr 2020 15:25:11 +1100 Subject: [PATCH 068/356] cleans up the retry counter delay --- alexa-wsmqtt.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 22236525..3b22f0e2 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -106,9 +106,11 @@ class AlexaWsMqtt extends EventEmitter { if (this.errorRetryCounter > 100) { this.emit('disconnect', false, 'Too many failed retries. Check cookie and data'); return; + } else { + this.errorRetryCounter++; } - let retryDelay = this.errorRetryCounter * 5 + 5; - if (retryDelay > 60) retryDelay = 60; + + let retryDelay = Math.min(60, (this.errorRetryCounter * 5) + 5); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Retry Connection in ' + retryDelay + 's'); this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); this.reconnectTimeout = setTimeout(() => { From daafb5b939d022f6bc561a0b018e93a7d37bae23 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 16 Jun 2020 23:56:16 +0200 Subject: [PATCH 069/356] * (Apollon77) Update Cookie Library to allow Proxy Signup again after Amazon changes * (hive) add new commands, jokes/facts/goodnight/cleanup * (hive) add new command curatedtts with allowed values ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"] to play random curated sentences * Add Stalebot configuration * Add Issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 32 ++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++ .github/stale.yml | 78 +++++ .github/workflows/test-and-release.yml | 46 ++- .travis.yml | 9 - LICENSE | 1 + readme.md => README.md | 6 +- alexa-remote.js | 19 +- alexa-wsmqtt.js | 10 +- appveyor.yml | 33 -- package-lock.json | 392 +++++++++++++++++++--- package.json | 13 +- 12 files changed, 552 insertions(+), 107 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/stale.yml delete mode 100644 .travis.yml rename readme.md => README.md (95%) delete mode 100644 appveyor.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..89561395 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Something is not working as it should +title: '' +labels: '' +assignees: '' +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '...' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots & Logfiles** +If applicable, add screenshots and logfiles to help explain your problem. + +**Versions:** + - Adapter version: + - JS-Controller version: + - Node version: + - Operating system: + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..04f9e03e --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,78 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 90 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 7 + +# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) +onlyLabels: [] + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - enhancement + - security + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: true + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: true + +# Set to true to ignore issues with an assignee (defaults to false) +exemptAssignees: false + +# Label to use when marking as stale +staleLabel: wontfix + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs within the next 7 days. + Please check if the issue is still relevant in the most current version of the adapter + and tell us. Also check that all relevant details, logs and reproduction steps + are included and update them if needed. + Thank you for your contributions. + + Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. + Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. + Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, + und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte + enthalten sind bzw. aktualisiert diese. + Vielen Dank für Eure Unterstützung. + +# Comment to post when removing the stale label. +# unmarkComment: > +# Your comment here. + +# Comment to post when closing a stale Issue or Pull Request. +closeComment: > + This issue has been automatically closed because of inactivity. Please open a new + issue if still relevant and make sure to include all relevant details, logs and + reproduction steps. + Thank you for your contributions. + + Dieses Problem wurde aufgrund von Inaktivität automatisch geschlossen. Bitte öffnet ein + neues Issue, falls dies noch relevant ist und stellt sicher das alle relevanten Details, + Logs und Reproduktionsschritte enthalten sind. + Vielen Dank für Eure Unterstützung. + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + +# Limit to only `issues` or `pulls` +only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed \ No newline at end of file diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 37a5e942..f898acd5 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -10,7 +10,10 @@ on: branches: - '*' tags: - - 'v?[0-9]+.[0-9]+.[0-9]+' + # normal versions + - "v?[0-9]+.[0-9]+.[0-9]+" + # pre-releases + - "v?[0-9]+.[0-9]+.[0-9]+-**" pull_request: {} jobs: @@ -34,6 +37,9 @@ jobs: - name: Install Dependencies run: npm ci +# - name: Run local tests +# run: npm test + # Deploys the final package to NPM deploy: needs: [check-and-lint] @@ -50,24 +56,46 @@ jobs: node-version: [12.x] steps: - - uses: actions/checkout@v1 + - name: Checkout code + uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Extract the version and commit body from the tag + # The body may be multiline, therefore we need to escape some characters + run: | + VERSION="${{ github.ref }}" + VERSION=${VERSION##*/} + VERSION=${VERSION##*v} + echo "::set-env name=VERSION::$VERSION" + BODY=$(git show -s --format=%b) + BODY="${BODY//'%'/'%25'}" + BODY="${BODY//$'\n'/'%0A'}" + BODY="${BODY//$'\r'/'%0D'}" + echo "::set-env name=BODY::$BODY" + - name: Install Dependencies run: npm ci +# - name: Create a clean build +# run: npm run build - name: Publish package to npm run: | npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} npm whoami npm publish - # Dummy job for skipped builds - without this, github reports the build as failed - skip-ci: - if: contains(github.event.head_commit.message, '[skip ci]') - runs-on: ubuntu-latest - steps: - - name: Skip build - run: echo "Build skipped!" \ No newline at end of file + + - name: Create Github Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release v${{ env.VERSION }} + draft: false + # Prerelease versions create prereleases on Github + prerelease: ${{ contains(env.VERSION, '-') }} + body: ${{ env.BODY }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bd695a6a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -#os: -# - linux -# - osx -language: node_js -node_js: - - "8" - - "10" - - "12" - diff --git a/LICENSE b/LICENSE index 9e5dad4d..6fff20f7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ The MIT License (MIT) Copyright (c) 2015-2017 soef +Copyright (c) 2018-2020 Apollon77 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/readme.md b/README.md similarity index 95% rename from readme.md rename to README.md index 56173812..51ea0514 100644 --- a/readme.md +++ b/README.md @@ -1,4 +1,3 @@ - # alexa-remote2 Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN. @@ -27,6 +26,11 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Update Cookie Library to allow Proxy Signup again after Amazon changes +* (hive) add new commands, jokes/facts/goodnight/cleanup +* (hive) add new command curatedtts with allowed values ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"] to play random curated sentences + ### 3.1.0 (2019-12-30) * (Apollon77) remove device._orig because really big objects happened and got exceptions on deep copy using JSION.stringify diff --git a/alexa-remote.js b/alexa-remote.js index 8d76e9f0..215e6585 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -745,7 +745,7 @@ class AlexaRemote extends EventEmitter { this.init(this._options, function(err) { if (err) { this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error and renew unsuccessfull. STOP'); - return callback(new Error('Cookie invalid, Renew unsuccessfull')); + return callback && callback(new Error('Cookie invalid, Renew unsuccessfull')); } return this.httpsGet(path, callback, flags); }); @@ -820,19 +820,22 @@ class AlexaRemote extends EventEmitter { ret = JSON.parse(body); } catch(e) { this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); - return callback (new Error('no JSON'), body); + callback && callback (new Error('no JSON'), body); + callback = null; + return; } this._options.logger && this._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); - return callback (null, ret); - callback(ret); + callback (null, ret); + callback = null; } }); }); req.on('error', function(e) { if (typeof callback === 'function'/* && callback.length >= 2*/) { - return callback (e, null); + callback (e, null); + callback = null; } }); @@ -1558,6 +1561,12 @@ class AlexaRemote extends EventEmitter { case 'calendarNext': seqNode.type = 'Alexa.Calendar.PlayNext'; break; + case 'curatedtts': + let supportedValues = ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"]; + if(!supportedValues.includes(value)) { return null } + seqNode.type = 'Alexa.CannedTts.Speak'; + seqNode.operationPayload.cannedTtsStringId = `alexa.cannedtts.speak.curatedtts-category-${value}/alexa.cannedtts.speak.curatedtts-random`; + break; case 'volume': seqNode.type = 'Alexa.DeviceControls.Volume'; value = ~~value; diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 3b22f0e2..0421dece 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -66,6 +66,10 @@ class AlexaWsMqtt extends EventEmitter { let initTimeout = null; this.websocket.on('open', () => { + if (this.stop) { + this.websocket.close(); + return; + } this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Open: ' + url); this.connectionActive = false; @@ -455,7 +459,11 @@ class AlexaWsMqtt extends EventEmitter { disconnect() { if (!this.websocket) return; this.stop = true; - this.websocket.close(); + try { + this.websocket.close(); + } catch (e) { + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Disconnect error: ' +e); + } } } diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 69a4aea7..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: 'test-{build}' - -# Test against this version of Node.js -environment: - matrix: - - nodejs_version: "0.10" - - nodejs_version: "0.12" - - nodejs_version: "4" - - nodejs_version: "6" - -platform: - - x86 - - x64 - -clone_folder: c:\projects\%APPVEYOR_PROJECT_NAME% -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version $env:platform - # install modules - - npm install - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - echo %cd% - - node --version - - npm --version - # run tests - - npm test - -# Don't actually build. -build: off diff --git a/package-lock.json b/package-lock.json index 4c4d552b..89b0426d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,18 +4,37 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@alcalzone/release-script": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.5.0.tgz", + "integrity": "sha512-Ajlfpg8rZAVtRdqLCSW4I3jTLXm/t0Vnw1SkwAFJ1B9Y7RbAur8k79esel5V4hPmIMa5lzcdwJEQCw6+n+O9Qw==", + "dev": true, + "requires": { + "alcalzone-shared": "^2.0.0", + "axios": "^0.19.0", + "colors": "^1.4.0", + "semver": "^6.3.0", + "yargs": "^15.0.2" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, "@types/http-proxy": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.3.tgz", - "integrity": "sha512-wIPqXANye5BbORbuh74exbwNzj+UWCwWyeEFJzUQ7Fq3W2NSAy+7x7nX1fgbEypr2/TdKqpeuxLnXWgzN533/Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.4.tgz", + "integrity": "sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q==", "requires": { "@types/node": "*" } }, "@types/node": { - "version": "13.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz", - "integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==" + "version": "14.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", + "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==" }, "accepts": { "version": "1.3.7", @@ -26,24 +45,95 @@ "negotiator": "0.6.2" } }, + "alcalzone-shared": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-2.3.0.tgz", + "integrity": "sha512-wBVqPJMOb/vQ9ZeVpwGL19LhfOaLnZlDFHk7ZgFz2Q2c7kYHNVKJhLQBMHhkAQ9P7zQ8Fx5IWEySXHGixcAIkw==", + "dev": true, + "requires": { + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "alexa-cookie2": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.0.3.tgz", - "integrity": "sha512-vj1hWeVMhHnIbVoilrL8tx1Qk/+cjDfoEUYeT7E52F8fYXkPgRgKawpNdhtP8ZQRrBqXbHEquzTZDb/7m1EO1w==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.2.0.tgz", + "integrity": "sha512-8n62HAygMEMIVdXYlbu959AVsMvu3YH2QxBiiYHHY+IhRQCaPmINcmnifUjvvmDUEyR+yhjdsAtN3EHSM0ONmg==", "requires": { - "cookie": "^0.4.0", + "cookie": "^0.4.1", "express": "^4.17.1", - "http-proxy-middleware": "^1.0.2", + "http-proxy-middleware": "^1.0.4", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.0" } }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "dev": true, + "requires": { + "follow-redirects": "1.5.10" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "requires": { + "debug": "=3.1.0" + } + } + } + }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -84,6 +174,44 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", @@ -109,9 +237,9 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" }, "cookie-signature": { "version": "1.0.6", @@ -131,6 +259,12 @@ "ms": "2.0.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -146,6 +280,12 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -162,9 +302,9 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" }, "express": { "version": "4.17.1", @@ -201,6 +341,13 @@ "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" + }, + "dependencies": { + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + } } }, "extend": { @@ -230,10 +377,20 @@ "unpipe": "~1.0.0" } }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, "follow-redirects": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz", - "integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", + "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", "requires": { "debug": "^3.0.0" }, @@ -263,6 +420,12 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", @@ -276,9 +439,9 @@ } }, "http-proxy": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", - "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "requires": { "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", @@ -286,12 +449,12 @@ } }, "http-proxy-middleware": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.3.tgz", - "integrity": "sha512-GHvPeBD+A357zS5tHjzj6ISrVOjjCiy0I92bdyTJz0pNmIjFxO0NX/bX+xkGgnclKQE/5hHAB9JEQ7u9Pw4olg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.4.tgz", + "integrity": "sha512-8wiqujNWlsZNbeTSSWMLUl/u70xbJ5VYRwPR8RcAbvsNxzAZbgwLzRvT96btbm3fAitZUmo5i8LY6WKGyHDgvA==", "requires": { - "@types/http-proxy": "^1.17.3", - "http-proxy": "^1.18.0", + "@types/http-proxy": "^1.17.4", + "http-proxy": "^1.18.1", "is-glob": "^4.0.1", "lodash": "^4.17.15", "micromatch": "^4.0.2" @@ -334,6 +497,12 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -352,6 +521,15 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", @@ -387,16 +565,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" }, "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "requires": { - "mime-db": "1.43.0" + "mime-db": "1.44.0" } }, "ms": { @@ -417,20 +595,50 @@ "ee-first": "1.1.1" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "picomatch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", - "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "process-nextick-args": { "version": "2.0.1", @@ -486,6 +694,18 @@ "util-deprecate": "~1.0.1" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -501,6 +721,12 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -539,6 +765,12 @@ "send": "0.17.1" } }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", @@ -549,6 +781,17 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -557,6 +800,15 @@ "safe-buffer": "~5.1.0" } }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -600,19 +852,71 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.2.tgz", - "integrity": "sha512-vy9V/+pKG+5ZTYKf+VcphF5Oc6EFiu3W8Nv3P3zIh0EqVI80ZxOzuPfe9EHjkFNvf8+xuTHVeei4Drydlx4zjw==" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", + "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==" }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "ws": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", - "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", + "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==" + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.1" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } } diff --git a/package.json b/package.json index d09e86ad..1d745293 100644 --- a/package.json +++ b/package.json @@ -25,16 +25,19 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.0.3", + "alexa-cookie2": "^3.2.0", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.2.3", + "ws": "^7.3.0", "extend": "^3.0.2", - "uuid": "^7.0.2" + "uuid": "^8.1.0" + }, + "devDependencies": { + "@alcalzone/release-script": "^1.4.1" }, - "devDependencies": {}, "scripts": { - "test": "node node_modules/mocha/bin/mocha" + "test": "node node_modules/mocha/bin/mocha", + "release": "release-script" }, "repository": { "type": "git", From 3b1eb3c4e77321ec590337d2567fbb360747179a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 16 Jun 2020 23:59:33 +0200 Subject: [PATCH 070/356] chore: release v3.2.0 Update Cookie Library to allow Proxy Signup again after Amazon changes add new commands, jokes/facts/goodnight/cleanup add new command curatedtts with allowed values ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"] to play random curated sentences --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 51ea0514..d044a6ee 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.2.0 (2020-06-16) * (Apollon77) Update Cookie Library to allow Proxy Signup again after Amazon changes * (hive) add new commands, jokes/facts/goodnight/cleanup * (hive) add new command curatedtts with allowed values ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"] to play random curated sentences diff --git a/package-lock.json b/package-lock.json index 89b0426d..a09fb6d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.1.0", + "version": "3.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1d745293..de822cc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.1.0", + "version": "3.2.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From f19e1304ee1604cda157d08fdbd7385ed38cb720 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 17 Jun 2020 08:46:23 +0200 Subject: [PATCH 071/356] chore: release v3.2.1 update amazon-cookie library: another optimization for Node.js 14 --- README.md | 3 +++ package-lock.json | 32 +++++++------------------------- package.json | 4 ++-- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index d044a6ee..11204c71 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### 3.2.1 (2020-06-17) +* (Apollon77) update amazon-cookie library: another optimization for Node.js 14 + ### 3.2.0 (2020-06-16) * (Apollon77) Update Cookie Library to allow Proxy Signup again after Amazon changes * (hive) add new commands, jokes/facts/goodnight/cleanup diff --git a/package-lock.json b/package-lock.json index a09fb6d5..25bd7ebf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -72,9 +72,9 @@ } }, "alexa-cookie2": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.2.0.tgz", - "integrity": "sha512-8n62HAygMEMIVdXYlbu959AVsMvu3YH2QxBiiYHHY+IhRQCaPmINcmnifUjvvmDUEyR+yhjdsAtN3EHSM0ONmg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.2.1.tgz", + "integrity": "sha512-Ll+ycfYBYBmEP5U2tKKimGpc7sljwDHNVC8bPAhcIMjc/MK0Nzubx3/T9lijnJbSyRX4Hhvfaap0qrF7kgX7uw==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", @@ -388,27 +388,9 @@ } }, "follow-redirects": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", - "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", - "requires": { - "debug": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.0.tgz", + "integrity": "sha512-JgawlbfBQKjbKegPn8vUsvJqplE7KHJuhGO4yPcb+ZOIYKSr+xobMVlfRBToZwZUUxy7lFiKBdFNloz9ui368Q==" }, "forwarded": { "version": "0.1.2", diff --git a/package.json b/package.json index de822cc2..bccf8f06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.0", + "version": "3.2.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.2.0", + "alexa-cookie2": "^3.2.1", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.3.0", From 479d538a2c28b186301b69ea19d353d8e1258832 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 17 Jun 2020 23:57:30 +0200 Subject: [PATCH 072/356] * (Apollon77) Optimize Request Handling to also Handle timeouts correctly * (Apollon77) Increase timeouts for some Smart Home calls to 30s (fixes https://github.com/Apollon77/ioBroker.alexa2/issues/486) --- alexa-remote.js | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 215e6585..0c194e39 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -758,7 +758,7 @@ class AlexaRemote extends EventEmitter { host: this.baseUrl, path: '', method: 'GET', - timeout: 10000, + timeout: flags.timeout || 10000, headers: { 'User-Agent' : this._options.userAgent, 'Content-Type': 'application/json; charset=UTF-8', @@ -813,12 +813,12 @@ class AlexaRemote extends EventEmitter { if (typeof callback === 'function') { if (!body) { // Method 'DELETE' may return HTTP STATUS 200 without body this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); - return res.statusCode.toString().substr(0,1) == '2' ? callback(null, { 'success': true }) : callback(new Error('no body'), null); + return typeof res.statusCode === 'number' && res.statusCode%100 === 2 ? callback(null, { 'success': true }) : callback(new Error('no body'), null); } try { ret = JSON.parse(body); - } catch(e) { + } catch (e) { this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); callback && callback (new Error('no JSON'), body); callback = null; @@ -832,13 +832,30 @@ class AlexaRemote extends EventEmitter { }); }); - req.on('error', function(e) { + req.on('error', (e) => { + this._options.logger && this._options.logger('Alexa-Remote: Response: Error: ' + e); if (typeof callback === 'function'/* && callback.length >= 2*/) { callback (e, null); callback = null; } }); - + + req.on('timeout', () => { + if (typeof callback === 'function'/* && callback.length >= 2*/) { + this._options.logger && this._options.logger('Alexa-Remote: Response: Timeout'); + callback (new Error('Timeout'), null); + callback = null; + } + }); + + req.on('close', () => { + if (typeof callback === 'function'/* && callback.length >= 2*/) { + this._options.logger && this._options.logger('Alexa-Remote: Response: Closed'); + callback (new Error('COnnection Closed'), null); + callback = null; + } + }); + if (flags && flags.data) { req.write(flags.data); } @@ -1534,9 +1551,6 @@ class AlexaRemote extends EventEmitter { case 'goodmorning': seqNode.type = 'Alexa.GoodMorning.Play'; break; - case 'goodnight': - seqNode.type = 'Alexa.GoodNight.Play'; - break; case 'funfact': seqNode.type = 'Alexa.FunFact.Play'; break; @@ -1907,6 +1921,8 @@ class AlexaRemote extends EventEmitter { } if (!res.locationDetails) return callback('locationDetails not found'); callback (err, res.locationDetails); + }, { + timeout: 30000 }); } @@ -1920,7 +1936,8 @@ class AlexaRemote extends EventEmitter { { headers: { 'Routines-Version': '1.1.210292' - } + }, + timeout: 30000 } ); } @@ -1931,7 +1948,8 @@ class AlexaRemote extends EventEmitter { { headers: { 'Routines-Version': '1.1.210292' - } + }, + timeout: 30000 } ); } From 80e68c80719bed3192267f0e078bef922d34af15 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 17 Jun 2020 23:58:16 +0200 Subject: [PATCH 073/356] chore: release v3.2.2 Optimize Request Handling to also Handle timeouts correctly Increase timeouts for some Smart Home calls to 30s --- README.md | 4 ++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11204c71..bfd0aaae 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,10 @@ Thank you for that work. ## Changelog: +### 3.2.2 (2020-06-17) +* (Apollon77) Optimize Request Handling to also Handle timeouts correctly +* (Apollon77) Increase timeouts for some Smart Home calls to 30s + ### 3.2.1 (2020-06-17) * (Apollon77) update amazon-cookie library: another optimization for Node.js 14 diff --git a/package-lock.json b/package-lock.json index 25bd7ebf..61bbffc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.1", + "version": "3.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bccf8f06..d79cfb06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.1", + "version": "3.2.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 8d401bc8f6d6de1f3c0d4cf33c23a67be920e769 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2020 05:32:37 +0000 Subject: [PATCH 074/356] Bump @alcalzone/release-script from 1.5.0 to 1.6.0 Bumps [@alcalzone/release-script](https://github.com/AlCalzone/release-script) from 1.5.0 to 1.6.0. - [Release notes](https://github.com/AlCalzone/release-script/releases) - [Commits](https://github.com/AlCalzone/release-script/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61bbffc0..8069f604 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.5.0.tgz", - "integrity": "sha512-Ajlfpg8rZAVtRdqLCSW4I3jTLXm/t0Vnw1SkwAFJ1B9Y7RbAur8k79esel5V4hPmIMa5lzcdwJEQCw6+n+O9Qw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.6.0.tgz", + "integrity": "sha512-scV2qvZ7E1mTC4AEUpT2YJGcoluFR9SkY5z5TITszv7mu8t5L/WkZzP+j/6tzvBhUMN7+dLbbipWeeAssU9vcQ==", "dev": true, "requires": { "alcalzone-shared": "^2.0.0", diff --git a/package.json b/package.json index d79cfb06..321580c2 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "uuid": "^8.1.0" }, "devDependencies": { - "@alcalzone/release-script": "^1.4.1" + "@alcalzone/release-script": "^1.6.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 3b83f9c848330609740890fe1eca25f81c62f88e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2020 05:24:46 +0000 Subject: [PATCH 075/356] Bump ws from 7.3.0 to 7.3.1 Bumps [ws](https://github.com/websockets/ws) from 7.3.0 to 7.3.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.3.0...7.3.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8069f604..d8cbc316 100644 --- a/package-lock.json +++ b/package-lock.json @@ -861,9 +861,9 @@ } }, "ws": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", - "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==" + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", + "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" }, "y18n": { "version": "4.0.0", diff --git a/package.json b/package.json index 321580c2..18267f61 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "alexa-cookie2": "^3.2.1", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.3.0", + "ws": "^7.3.1", "extend": "^3.0.2", "uuid": "^8.1.0" }, From 70732e0b7a4aeaee076c4f284c223e5333794f51 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 13 Jul 2020 23:09:43 +0200 Subject: [PATCH 076/356] * (Apollon77) update amazon-cookie library to work around amazon security changes * (Apollon77) Prevent crash on invalid data in request data (Sentry IOBROKER-ALEXA2-1A) * (Apollon77) Make sure to handle invalid list responses correctly (Sentry IOBROKER-ALEXA2-1T) --- README.md | 5 ++++ alexa-remote.js | 64 +++++++++++++++++++++++++++-------------------- package-lock.json | 40 ++++++++++++++--------------- package.json | 4 +-- 4 files changed, 64 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index bfd0aaae..368ded40 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,11 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) update amazon-cookie library to work around amazon security changes +* (Apollon77) Prevent crash on invalid data in request data (Sentry IOBROKER-ALEXA2-1A) +* (Apollon77) Make sure to handle invalid list responses correctly (Sentry IOBROKER-ALEXA2-1T) + ### 3.2.2 (2020-06-17) * (Apollon77) Optimize Request Handling to also Handle timeouts correctly * (Apollon77) Increase timeouts for some Smart Home calls to 30s diff --git a/alexa-remote.js b/alexa-remote.js index 0c194e39..de7df2ce 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -799,38 +799,48 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers.Referer; delete logOptions.headers.Origin; this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); - - let req = https.request(options, (res) => { - let body = ''; - res.on('data', (chunk) => { - body += chunk; - }); + let req; + try { + req = https.request(options, (res) => { + let body = ''; - res.on('end', () => { - let ret; - - if (typeof callback === 'function') { - if (!body) { // Method 'DELETE' may return HTTP STATUS 200 without body - this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); - return typeof res.statusCode === 'number' && res.statusCode%100 === 2 ? callback(null, { 'success': true }) : callback(new Error('no body'), null); - } - - try { - ret = JSON.parse(body); - } catch (e) { - this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); - callback && callback (new Error('no JSON'), body); + res.on('data', (chunk) => { + body += chunk; + }); + + res.on('end', () => { + let ret; + + if (typeof callback === 'function') { + if (!body) { // Method 'DELETE' may return HTTP STATUS 200 without body + this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); + return typeof res.statusCode === 'number' && res.statusCode % 100 === 2 ? callback(null, {'success': true}) : callback(new Error('no body'), null); + } + + try { + ret = JSON.parse(body); + } catch (e) { + this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); + callback && callback(new Error('no JSON'), body); + callback = null; + return; + } + + this._options.logger && this._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); + callback(null, ret); callback = null; - return; } - - this._options.logger && this._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); - callback (null, ret); - callback = null; - } + }); }); - }); + } catch(err) { + this._options.logger && this._options.logger('Alexa-Remote: Response: Exception: ' + err); + if (typeof callback === 'function'/* && callback.length >= 2*/) { + callback (err, null); + callback = null; + } + return; + } req.on('error', (e) => { this._options.logger && this._options.logger('Alexa-Remote: Response: Error: ' + e); diff --git a/package-lock.json b/package-lock.json index d8cbc316..0a185692 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,9 +32,9 @@ } }, "@types/node": { - "version": "14.0.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", - "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==" + "version": "14.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", + "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==" }, "accepts": { "version": "1.3.7", @@ -72,13 +72,13 @@ } }, "alexa-cookie2": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.2.1.tgz", - "integrity": "sha512-Ll+ycfYBYBmEP5U2tKKimGpc7sljwDHNVC8bPAhcIMjc/MK0Nzubx3/T9lijnJbSyRX4Hhvfaap0qrF7kgX7uw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.0.tgz", + "integrity": "sha512-jgQpmALywKWMnJss2XqxV41+L7Q5mQv/m+a+cr1cotgy/0wVh3igsZFW/qBrAk3KdpcLFa53hMXjCGgHHN7UPg==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", - "http-proxy-middleware": "^1.0.4", + "http-proxy-middleware": "^1.0.5", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.0" @@ -388,9 +388,9 @@ } }, "follow-redirects": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.0.tgz", - "integrity": "sha512-JgawlbfBQKjbKegPn8vUsvJqplE7KHJuhGO4yPcb+ZOIYKSr+xobMVlfRBToZwZUUxy7lFiKBdFNloz9ui368Q==" + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz", + "integrity": "sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg==" }, "forwarded": { "version": "0.1.2", @@ -431,14 +431,14 @@ } }, "http-proxy-middleware": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.4.tgz", - "integrity": "sha512-8wiqujNWlsZNbeTSSWMLUl/u70xbJ5VYRwPR8RcAbvsNxzAZbgwLzRvT96btbm3fAitZUmo5i8LY6WKGyHDgvA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.5.tgz", + "integrity": "sha512-CKzML7u4RdGob8wuKI//H8Ein6wNTEQR7yjVEzPbhBLGdOfkfvgTnp2HLnniKBDP9QW4eG10/724iTWLBeER3g==", "requires": { "@types/http-proxy": "^1.17.4", "http-proxy": "^1.18.1", "is-glob": "^4.0.1", - "lodash": "^4.17.15", + "lodash": "^4.17.19", "micromatch": "^4.0.2" } }, @@ -513,9 +513,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "media-typer": { "version": "0.3.0", @@ -834,9 +834,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", - "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz", + "integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q==" }, "vary": { "version": "1.1.2", diff --git a/package.json b/package.json index 18267f61..00b0aea2 100644 --- a/package.json +++ b/package.json @@ -25,12 +25,12 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.2.1", + "alexa-cookie2": "^3.3.0", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.3.1", "extend": "^3.0.2", - "uuid": "^8.1.0" + "uuid": "^8.2.0" }, "devDependencies": { "@alcalzone/release-script": "^1.6.0" From 93b49700cb7b03d4ed39a255701e65edd7f7daef Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 13 Jul 2020 23:10:06 +0200 Subject: [PATCH 077/356] chore: release v3.2.3 update amazon-cookie library to work around amazon security changes Prevent crash on invalid data in request data (Sentry IOBROKER-ALEXA2-1A) Make sure to handle invalid list responses correctly (Sentry IOBROKER-ALEXA2-1T) --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 368ded40..c5bba0ce 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.2.3 (2020-07-13) * (Apollon77) update amazon-cookie library to work around amazon security changes * (Apollon77) Prevent crash on invalid data in request data (Sentry IOBROKER-ALEXA2-1A) * (Apollon77) Make sure to handle invalid list responses correctly (Sentry IOBROKER-ALEXA2-1T) diff --git a/package-lock.json b/package-lock.json index 0a185692..bc2624da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.2", + "version": "3.2.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 00b0aea2..7914471c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.2", + "version": "3.2.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From f637de5a1f1e581ac53cfadfb8bb4133ee702be6 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 15 Jul 2020 00:20:18 +0200 Subject: [PATCH 078/356] * (Apollon77) Another try to work around Amazon changes --- README.md | 3 +++ package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c5bba0ce..4163fc94 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) update amazon-cookie library: Another try to work around Amazon changes + ### 3.2.3 (2020-07-13) * (Apollon77) update amazon-cookie library to work around amazon security changes * (Apollon77) Prevent crash on invalid data in request data (Sentry IOBROKER-ALEXA2-1A) diff --git a/package-lock.json b/package-lock.json index bc2624da..4ae44c9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,9 +72,9 @@ } }, "alexa-cookie2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.0.tgz", - "integrity": "sha512-jgQpmALywKWMnJss2XqxV41+L7Q5mQv/m+a+cr1cotgy/0wVh3igsZFW/qBrAk3KdpcLFa53hMXjCGgHHN7UPg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.1.tgz", + "integrity": "sha512-N9uR1CUgqF0+6asaT4DF9nQoomkP62DcSz4/A6570DzxnfUHGpN/KZ/gIt9NHk0shhdjIY+9Jemg61LM4DwDbw==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", diff --git a/package.json b/package.json index 7914471c..9a6af1f5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.3.0", + "alexa-cookie2": "^3.3.1", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.3.1", From de1bc60a6e33abb3bf4cc85d4b0fb97f1ec301f0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 15 Jul 2020 00:20:33 +0200 Subject: [PATCH 079/356] chore: release v3.2.4 update amazon-cookie library: Another try to work around Amazon changes --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4163fc94..0c00f342 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.2.4 (2020-07-15) * (Apollon77) update amazon-cookie library: Another try to work around Amazon changes ### 3.2.3 (2020-07-13) diff --git a/package-lock.json b/package-lock.json index 4ae44c9a..6216cee4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.3", + "version": "3.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9a6af1f5..948edf5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.3", + "version": "3.2.4", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From e09eb8349f671c380b0c956ef65a0126107e9942 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 15 Jul 2020 11:31:15 +0200 Subject: [PATCH 080/356] * (Apollon77) Another try to work around Amazon changes --- README.md | 3 +++ package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0c00f342..21835d72 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) update amazon-cookie library: Another try to work around Amazon changes + ### 3.2.4 (2020-07-15) * (Apollon77) update amazon-cookie library: Another try to work around Amazon changes diff --git a/package-lock.json b/package-lock.json index 6216cee4..eaf538e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,9 +72,9 @@ } }, "alexa-cookie2": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.1.tgz", - "integrity": "sha512-N9uR1CUgqF0+6asaT4DF9nQoomkP62DcSz4/A6570DzxnfUHGpN/KZ/gIt9NHk0shhdjIY+9Jemg61LM4DwDbw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.2.tgz", + "integrity": "sha512-ST0I45x0ONtsH2XjOglQLRQoMghsS/GMT4YhZJjxXa5ZSfT5BlYDyJNLK6NBojgJCW8XeBxi9kKTaXrzLAmXag==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", diff --git a/package.json b/package.json index 948edf5c..ac9511b2 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.3.1", + "alexa-cookie2": "^3.3.2", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.3.1", From a39c165c2bbd9498873614615835a5345edbffed Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 15 Jul 2020 11:31:21 +0200 Subject: [PATCH 081/356] chore: release v3.2.5 update amazon-cookie library: Another try to work around Amazon changes --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 21835d72..cd4016e0 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.2.5 (2020-07-15) * (Apollon77) update amazon-cookie library: Another try to work around Amazon changes ### 3.2.4 (2020-07-15) diff --git a/package-lock.json b/package-lock.json index eaf538e7..5231dfc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.4", + "version": "3.2.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ac9511b2..2805b2c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.4", + "version": "3.2.5", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 739c2e0b18edc9d6645b92a00b4c907d63e69f89 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 16 Jul 2020 18:37:35 +0200 Subject: [PATCH 082/356] * (Apollon77) Work around Amazon Security changes and make proxy working again --- README.md | 3 +++ package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd4016e0..4d1890c0 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) update amazon-cookie library: Another try to work around Amazon changes + ### 3.2.5 (2020-07-15) * (Apollon77) update amazon-cookie library: Another try to work around Amazon changes diff --git a/package-lock.json b/package-lock.json index 5231dfc9..9b67a93b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,9 +72,9 @@ } }, "alexa-cookie2": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.2.tgz", - "integrity": "sha512-ST0I45x0ONtsH2XjOglQLRQoMghsS/GMT4YhZJjxXa5ZSfT5BlYDyJNLK6NBojgJCW8XeBxi9kKTaXrzLAmXag==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.3.tgz", + "integrity": "sha512-2jEMR48Su2exp/fR9pvoL8KMAdNKhuiVnMWxNIevXb4UJlygFrp20/R7z/lZXwZZeIx6uYp+CXigz1z3NHWM3Q==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", diff --git a/package.json b/package.json index 2805b2c6..f0d62591 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.3.2", + "alexa-cookie2": "^3.3.3", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.3.1", From 1e36d172e3e9245090b3d5b72841a4ade2c1ba80 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 16 Jul 2020 18:37:41 +0200 Subject: [PATCH 083/356] chore: release v3.2.6 update amazon-cookie library: Another try to work around Amazon changes --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4d1890c0..257f9f0c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.2.6 (2020-07-16) * (Apollon77) update amazon-cookie library: Another try to work around Amazon changes ### 3.2.5 (2020-07-15) diff --git a/package-lock.json b/package-lock.json index 9b67a93b..67648879 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.5", + "version": "3.2.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f0d62591..6720409d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.5", + "version": "3.2.6", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 551169a9aac9348bd53ebce5a90fb1217150e274 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 19 Jul 2020 22:47:58 +0200 Subject: [PATCH 084/356] * (Apollon77) update amazon-cookie library again to optimize upgrades from earlier versions --- README.md | 3 +++ package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 257f9f0c..6cce5baf 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) update amazon-cookie library again to optimize upgrades from earlier versions + ### 3.2.6 (2020-07-16) * (Apollon77) update amazon-cookie library: Another try to work around Amazon changes diff --git a/package-lock.json b/package-lock.json index 67648879..bc507025 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,9 +72,9 @@ } }, "alexa-cookie2": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.3.3.tgz", - "integrity": "sha512-2jEMR48Su2exp/fR9pvoL8KMAdNKhuiVnMWxNIevXb4UJlygFrp20/R7z/lZXwZZeIx6uYp+CXigz1z3NHWM3Q==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.0.tgz", + "integrity": "sha512-DYKYQnfYn0bTrz33eMrVavDIAUlCjruMDq/GMZMFFCJivbidBI6TaNaDt17vPMrOlTxDARYZvb2ZANoIWRBbcg==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", diff --git a/package.json b/package.json index 6720409d..e7c6e088 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.3.3", + "alexa-cookie2": "^3.4.0", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.3.1", From c219e424ab7f3884a36531b0de7a465f64dddacc Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 19 Jul 2020 22:48:26 +0200 Subject: [PATCH 085/356] chore: release v3.3.0 update amazon-cookie library again to optimize upgrades from earlier versions --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6cce5baf..c8e4a975 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.3.0 (2020-07-19) * (Apollon77) update amazon-cookie library again to optimize upgrades from earlier versions ### 3.2.6 (2020-07-16) diff --git a/package-lock.json b/package-lock.json index bc507025..01101e11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.6", + "version": "3.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e7c6e088..bc7a94ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.2.6", + "version": "3.3.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From add4eb12e87c66a2d81eb7472e3087bd3b492571 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 24 Jul 2020 23:25:15 +0200 Subject: [PATCH 086/356] * (Apollon77) Update cookie lib to maybe be more backward compatible if login/baseUrl was changed * (Apollon77) Increase timeout when reading routines --- README.md | 4 ++++ alexa-remote.js | 4 +++- package-lock.json | 12 ++++++------ package.json | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c8e4a975..ff19beb5 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,10 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Update cookie lib to maybe be more backward compatible if login/baseUrl was changed +* (Apollon77) Increase timeout when reading routines + ### 3.3.0 (2020-07-19) * (Apollon77) update amazon-cookie library again to optimize upgrades from earlier versions diff --git a/alexa-remote.js b/alexa-remote.js index de7df2ce..1e3a5222 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1803,7 +1803,9 @@ class AlexaRemote extends EventEmitter { limit = 0; } limit = limit || 2000; - this.httpsGet (`/api/behaviors/automations?limit=${limit}`, callback); + this.httpsGet (`/api/behaviors/automations?limit=${limit}`, callback, { + timeout: 30000 + }); } executeAutomationRoutine(serialOrName, routine, callback) { diff --git a/package-lock.json b/package-lock.json index 01101e11..84212e3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,9 +32,9 @@ } }, "@types/node": { - "version": "14.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", - "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==" + "version": "14.0.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.26.tgz", + "integrity": "sha512-W+fpe5s91FBGE0pEa0lnqGLL4USgpLgs4nokw16SrBBco/gQxuua7KnArSEOd5iaMqbbSHV10vUDkJYJJqpXKA==" }, "accepts": { "version": "1.3.7", @@ -72,9 +72,9 @@ } }, "alexa-cookie2": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.0.tgz", - "integrity": "sha512-DYKYQnfYn0bTrz33eMrVavDIAUlCjruMDq/GMZMFFCJivbidBI6TaNaDt17vPMrOlTxDARYZvb2ZANoIWRBbcg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.1.tgz", + "integrity": "sha512-TKesRPuA5sjXALrCgj5CsXz3ABz6dDtQzsegZpDhRUkGf/o3YerFDktz2ZraIzrR+hpCsxzjBxNfxSQFTLviBw==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", diff --git a/package.json b/package.json index bc7a94ba..41dfff91 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.4.0", + "alexa-cookie2": "^3.4.1", "https": "^1.0.0", "querystring": "^0.2.0", "ws": "^7.3.1", From f4c356557370c3f5e3bf8fc73fcfd240f9f6e6cb Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 24 Jul 2020 23:25:24 +0200 Subject: [PATCH 087/356] chore: release v3.3.1 Update cookie lib to maybe be more backward compatible if login/baseUrl was changed Increase timeout when reading routines --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ff19beb5..c8e387a9 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.3.1 (2020-07-24) * (Apollon77) Update cookie lib to maybe be more backward compatible if login/baseUrl was changed * (Apollon77) Increase timeout when reading routines diff --git a/package-lock.json b/package-lock.json index 84212e3d..febdce2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.0", + "version": "3.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 41dfff91..568b9135 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.0", + "version": "3.3.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 06840c4f7c3cd592a71df4868b6f7359c87cea74 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2020 05:37:25 +0000 Subject: [PATCH 088/356] Bump uuid from 8.2.0 to 8.3.0 Bumps [uuid](https://github.com/uuidjs/uuid) from 8.2.0 to 8.3.0. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index febdce2c..8ed9e7df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -834,9 +834,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz", - "integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", + "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" }, "vary": { "version": "1.1.2", diff --git a/package.json b/package.json index 568b9135..a16efe0c 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "querystring": "^0.2.0", "ws": "^7.3.1", "extend": "^3.0.2", - "uuid": "^8.2.0" + "uuid": "^8.3.0" }, "devDependencies": { "@alcalzone/release-script": "^1.6.0" From 1d2193aa84eed72d5977cbc5bf2bc78e6ba90caa Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2020 05:01:02 +0000 Subject: [PATCH 089/356] Bump @alcalzone/release-script from 1.6.0 to 1.7.0 Bumps [@alcalzone/release-script](https://github.com/AlCalzone/release-script) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/AlCalzone/release-script/releases) - [Commits](https://github.com/AlCalzone/release-script/compare/v1.6.0...v1.7.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ed9e7df..e057dbf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,16 +5,16 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.6.0.tgz", - "integrity": "sha512-scV2qvZ7E1mTC4AEUpT2YJGcoluFR9SkY5z5TITszv7mu8t5L/WkZzP+j/6tzvBhUMN7+dLbbipWeeAssU9vcQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.7.0.tgz", + "integrity": "sha512-SQQOf+6WT1JZTTVGSWPsgTsCydkBQeK2awH3VJJR6Atell/r489OQ3pJFjjbiwLoPfeyAl4vNZliNH+PxL0jxw==", "dev": true, "requires": { "alcalzone-shared": "^2.0.0", "axios": "^0.19.0", "colors": "^1.4.0", "semver": "^6.3.0", - "yargs": "^15.0.2" + "yargs": "^15.4.1" } }, "@types/color-name": { @@ -872,9 +872,9 @@ "dev": true }, "yargs": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", - "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { "cliui": "^6.0.0", @@ -887,7 +887,7 @@ "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^18.1.1" + "yargs-parser": "^18.1.2" } }, "yargs-parser": { diff --git a/package.json b/package.json index a16efe0c..37c71d47 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "uuid": "^8.3.0" }, "devDependencies": { - "@alcalzone/release-script": "^1.6.0" + "@alcalzone/release-script": "^1.7.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 9f3fbe2b5fa897b26865cd6278bc8918394a5b1f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2020 05:01:41 +0000 Subject: [PATCH 090/356] Bump @alcalzone/release-script from 1.7.0 to 1.8.0 Bumps [@alcalzone/release-script](https://github.com/AlCalzone/release-script) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/AlCalzone/release-script/releases) - [Changelog](https://github.com/AlCalzone/release-script/blob/master/CHANGELOG.md) - [Commits](https://github.com/AlCalzone/release-script/compare/v1.7.0...v1.8.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e057dbf8..61ce984e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.7.0.tgz", - "integrity": "sha512-SQQOf+6WT1JZTTVGSWPsgTsCydkBQeK2awH3VJJR6Atell/r489OQ3pJFjjbiwLoPfeyAl4vNZliNH+PxL0jxw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.8.0.tgz", + "integrity": "sha512-nOI5jxUy91dnzJE4DnbrHkjJNg+E8nl0QI7k69VOmWLft+qJtuMfpdlSkHD0EQCsapTff9hYjW7xdYb0+yoYkg==", "dev": true, "requires": { "alcalzone-shared": "^2.0.0", diff --git a/package.json b/package.json index 37c71d47..9c244933 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "uuid": "^8.3.0" }, "devDependencies": { - "@alcalzone/release-script": "^1.7.0" + "@alcalzone/release-script": "^1.8.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 89a7c6fead42697a62fb9bba66987fbc95d33fe7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2020 04:56:29 +0000 Subject: [PATCH 091/356] Bump @alcalzone/release-script from 1.8.0 to 1.8.1 Bumps [@alcalzone/release-script](https://github.com/AlCalzone/release-script) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/AlCalzone/release-script/releases) - [Changelog](https://github.com/AlCalzone/release-script/blob/master/CHANGELOG.md) - [Commits](https://github.com/AlCalzone/release-script/compare/v1.8.0...v1.8.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 191 +++++++++++----------------------------------- package.json | 2 +- 2 files changed, 46 insertions(+), 147 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61ce984e..42ea0be2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,16 +5,16 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.8.0.tgz", - "integrity": "sha512-nOI5jxUy91dnzJE4DnbrHkjJNg+E8nl0QI7k69VOmWLft+qJtuMfpdlSkHD0EQCsapTff9hYjW7xdYb0+yoYkg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.8.1.tgz", + "integrity": "sha512-ZBaTzNG41yfGpmmTBTe/pw7zWuWTxKGKO0nLlf8LXRcJJYOGifEwVZ0f428jXjtOx/+8nkic6P/ZEkls+//r1Q==", "dev": true, "requires": { "alcalzone-shared": "^2.0.0", - "axios": "^0.19.0", + "axios": "^0.20.0", "colors": "^1.4.0", - "semver": "^6.3.0", - "yargs": "^15.4.1" + "semver": "^7.3.2", + "yargs": "^16.0.3" } }, "@types/color-name": { @@ -55,12 +55,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -106,32 +106,12 @@ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", + "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", "dev": true, "requires": { - "follow-redirects": "1.5.10" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "requires": { - "debug": "=3.1.0" - } - } + "follow-redirects": "^1.10.0" } }, "body-parser": { @@ -174,21 +154,15 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.1.tgz", + "integrity": "sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ==", "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "wrap-ansi": "^7.0.0" } }, "color-convert": { @@ -259,12 +233,6 @@ "ms": "2.0.0" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -291,6 +259,12 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "escalade": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.0.tgz", + "integrity": "sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -377,16 +351,6 @@ "unpipe": "~1.0.0" } }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "follow-redirects": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz", @@ -503,15 +467,6 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, "lodash": { "version": "4.17.19", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", @@ -577,41 +532,11 @@ "ee-first": "1.1.1" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -682,12 +607,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -704,9 +623,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true }, "send": { @@ -747,12 +666,6 @@ "send": "0.17.1" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, "setprototypeof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", @@ -843,16 +756,10 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -866,39 +773,31 @@ "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.1.tgz", + "integrity": "sha512-/jJ831jEs4vGDbYPQp4yGKDYPSCCEQ45uZWJHE1AoYBzqdZi8+LDWas0z4HrmJXmKdpFsTiowSHXdxyFhpmdMg==", "dev": true }, "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.0.3.tgz", + "integrity": "sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==", "dev": true, "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.0", + "escalade": "^3.0.2", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "y18n": "^5.0.1", + "yargs-parser": "^20.0.0" } }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A==", + "dev": true } } } diff --git a/package.json b/package.json index 9c244933..67c907e5 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "uuid": "^8.3.0" }, "devDependencies": { - "@alcalzone/release-script": "^1.8.0" + "@alcalzone/release-script": "^1.8.1" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From c209bbcbddf9240962584c1722e9f5929aa588d0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2020 04:58:51 +0000 Subject: [PATCH 092/356] Bump uuid from 8.3.0 to 8.3.1 Bumps [uuid](https://github.com/uuidjs/uuid) from 8.3.0 to 8.3.1. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42ea0be2..618d0253 100644 --- a/package-lock.json +++ b/package-lock.json @@ -747,9 +747,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" }, "vary": { "version": "1.1.2", diff --git a/package.json b/package.json index 67c907e5..6e821bce 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "querystring": "^0.2.0", "ws": "^7.3.1", "extend": "^3.0.2", - "uuid": "^8.3.0" + "uuid": "^8.3.1" }, "devDependencies": { "@alcalzone/release-script": "^1.8.1" From 166a0b709b50c0a25a4dcac3b71fba65182bf15c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 23 Nov 2020 23:39:24 +0100 Subject: [PATCH 093/356] * (Apollon77) handle potential crash case (Sentry IOBROKER-ALEXA2-27) * (Apollon77) also ignore PUSH_DEVICE_SETUP_STATE_CHANGE push messages * (Apollon77) Optimize WSMQTT Reconnection handling for timeout cases * update github action * add dependabot automerge --- .github/auto-merge.yml | 17 ++++++ .github/dependabot.yml | 10 ++++ .github/workflows/dependabot-automerge.yml | 22 ++++++++ .github/workflows/test-and-release.yml | 11 ++-- README.md | 5 ++ alexa-remote.js | 1 + alexa-wsmqtt.js | 62 ++++++++++++++-------- package-lock.json | 40 +++++++------- package.json | 4 +- 9 files changed, 122 insertions(+), 50 deletions(-) create mode 100644 .github/auto-merge.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-automerge.yml diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml new file mode 100644 index 00000000..3f5fbe36 --- /dev/null +++ b/.github/auto-merge.yml @@ -0,0 +1,17 @@ +# Configure here which dependency updates should be merged automatically. +# The recommended configuration is the following: +- match: + # Only merge patches for production dependencies + dependency_type: production + update_type: "semver:patch" +- match: + # Except for security fixes, here we allow minor patches + dependency_type: production + update_type: "security:minor" +- match: + # and development dependencies can have a minor update, too + dependency_type: development + update_type: "semver:minor" + +# The syntax is based on the legacy dependabot v1 automerged_updates syntax, see: +# https://dependabot.com/docs/config-file/#automerged_updates \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..af8728d5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: "/" + schedule: + interval: monthly + time: "04:00" + timezone: Europe/Berlin + open-pull-requests-limit: 20 + versioning-strategy: increase \ No newline at end of file diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 00000000..ac5313e6 --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,22 @@ +# Automatically merge Dependabot PRs when version comparison is within the range +# that is configured in .github/auto-merge.yml + +name: Auto-Merge Dependabot PRs + +on: + pull_request: + +jobs: + auto-merge: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check if PR should be auto-merged + uses: ahmadnassri/action-dependabot-auto-merge@v2 + with: + # This must be a personal access token with push access + github-token: ${{ secrets.AUTO_MERGE_TOKEN }} + # By default, squash and merge, so Github chooses nice commit messages + command: squash and merge \ No newline at end of file diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index f898acd5..475a4be4 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -65,17 +65,18 @@ jobs: node-version: ${{ matrix.node-version }} - name: Extract the version and commit body from the tag + id: extract_release # The body may be multiline, therefore we need to escape some characters run: | VERSION="${{ github.ref }}" VERSION=${VERSION##*/} VERSION=${VERSION##*v} - echo "::set-env name=VERSION::$VERSION" + echo "::set-output name=VERSION::$VERSION" BODY=$(git show -s --format=%b) BODY="${BODY//'%'/'%25'}" BODY="${BODY//$'\n'/'%0A'}" BODY="${BODY//$'\r'/'%0D'}" - echo "::set-env name=BODY::$BODY" + echo "::set-output name=BODY::$BODY" - name: Install Dependencies run: npm ci @@ -94,8 +95,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: Release v${{ env.VERSION }} + release_name: Release v${{ steps.extract_release.outputs.VERSION }} draft: false # Prerelease versions create prereleases on Github - prerelease: ${{ contains(env.VERSION, '-') }} - body: ${{ env.BODY }} + prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} + body: ${{ steps.extract_release.outputs.BODY }} diff --git a/README.md b/README.md index c8e387a9..7dd1b856 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,11 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) handle potential crash case (Sentry IOBROKER-ALEXA2-27) +* (Apollon77) also ignore PUSH_DEVICE_SETUP_STATE_CHANGE push messages +* (Apollon77) Optimize WSMQTT Reconnection handling for timeout cases + ### 3.3.1 (2020-07-24) * (Apollon77) Update cookie lib to maybe be more backward compatible if login/baseUrl was changed * (Apollon77) Increase timeout when reading routines diff --git a/alexa-remote.js b/alexa-remote.js index 1e3a5222..084f155c 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -637,6 +637,7 @@ class AlexaRemote extends EventEmitter { case 'PUSH_MICROPHONE_STATE': case 'PUSH_DELETE_DOPPLER_ACTIVITIES': + case 'PUSH_DEVICE_SETUP_STATE_CHANGE': return; } diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 0421dece..e290ff6e 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -42,6 +42,8 @@ class AlexaWsMqtt extends EventEmitter { 'perMessageDeflate': true, 'protocolVersion': 13, + 'timeout': 5000, + 'headers': { 'Connection': 'keep-alive, Upgrade', 'Upgrade': 'websocket', @@ -65,27 +67,7 @@ class AlexaWsMqtt extends EventEmitter { let msgCounter = 0; let initTimeout = null; - this.websocket.on('open', () => { - if (this.stop) { - this.websocket.close(); - return; - } - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Open: ' + url); - this.connectionActive = false; - - initTimeout = setTimeout(() => { - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization not done within 30s'); - this.websocket.close(); - }, 30000); - - // tell Tuning Service that we support "A:H" protocol = AlphaPrococol - const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE'); - //console.log('SEND: ' + msg.toString('ascii')); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent'); - this.websocket.send(msg); - }); - - this.websocket.on('close', (code, reason) => { + const onWebsocketClose = (code, reason) => { this.websocket = null; this.connectionActive = false; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Close: ' + code + ': ' + reason); @@ -117,12 +99,42 @@ class AlexaWsMqtt extends EventEmitter { let retryDelay = Math.min(60, (this.errorRetryCounter * 5) + 5); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Retry Connection in ' + retryDelay + 's'); this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); + this.reconnectTimeout && clearTimeout(this.reconnectTimeout); this.reconnectTimeout = setTimeout(() => { this.reconnectTimeout = null; this.connect(); }, retryDelay * 1000); + }; + + initTimeout = setTimeout(() => { + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization not done within 30s'); + try { + this.websocket && this.websocket.close(); + } catch (err) { + //just make sure + } + if (this.websocket || !this.reconnectTimeout) { // seems no close was emmitted so far?! + onWebsocketClose(); + } + }, 30000); + + this.websocket.on('open', () => { + if (this.stop) { + this.websocket.close(); + return; + } + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Open: ' + url); + this.connectionActive = false; + + // tell Tuning Service that we support "A:H" protocol = AlphaPrococol + const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE'); + //console.log('SEND: ' + msg.toString('ascii')); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent'); + this.websocket.send(msg); }); + this.websocket.on('close', onWebsocketClose); + this.websocket.on('error', (error) => { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Error: ' + error); this.emit('error', error); @@ -200,7 +212,7 @@ class AlexaWsMqtt extends EventEmitter { this.connectionActive = true; return; } - else if (message.content.payload) { + else if (message.content && message.content.payload) { let command = message.content.payload.command; let payload = message.content.payload.payload; @@ -457,8 +469,12 @@ class AlexaWsMqtt extends EventEmitter { } disconnect() { - if (!this.websocket) return; + if (this.reconnectTimeout) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + } this.stop = true; + if (!this.websocket) return; try { this.websocket.close(); } catch (e) { diff --git a/package-lock.json b/package-lock.json index 618d0253..2510c89b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,9 +32,9 @@ } }, "@types/node": { - "version": "14.0.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.26.tgz", - "integrity": "sha512-W+fpe5s91FBGE0pEa0lnqGLL4USgpLgs4nokw16SrBBco/gQxuua7KnArSEOd5iaMqbbSHV10vUDkJYJJqpXKA==" + "version": "14.14.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", + "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==" }, "accepts": { "version": "1.3.7", @@ -72,13 +72,13 @@ } }, "alexa-cookie2": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.1.tgz", - "integrity": "sha512-TKesRPuA5sjXALrCgj5CsXz3ABz6dDtQzsegZpDhRUkGf/o3YerFDktz2ZraIzrR+hpCsxzjBxNfxSQFTLviBw==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.2.tgz", + "integrity": "sha512-q2CWCG2QscBzix+tIvmea+HOdhjqytvdYZ5ANehChRrqLmwQk6zBHo5dgd4N93LIkIyZN7qI03VwW9daUS5Zww==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", - "http-proxy-middleware": "^1.0.5", + "http-proxy-middleware": "^1.0.6", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.0" @@ -276,9 +276,9 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, "express": { "version": "4.17.1", @@ -395,14 +395,14 @@ } }, "http-proxy-middleware": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.5.tgz", - "integrity": "sha512-CKzML7u4RdGob8wuKI//H8Ein6wNTEQR7yjVEzPbhBLGdOfkfvgTnp2HLnniKBDP9QW4eG10/724iTWLBeER3g==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.6.tgz", + "integrity": "sha512-NyL6ZB6cVni7pl+/IT2W0ni5ME00xR0sN27AQZZrpKn1b+qRh+mLbBxIq9Cq1oGfmTc7BUq4HB77mxwCaxAYNg==", "requires": { "@types/http-proxy": "^1.17.4", "http-proxy": "^1.18.1", "is-glob": "^4.0.1", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "micromatch": "^4.0.2" } }, @@ -468,9 +468,9 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "media-typer": { "version": "0.3.0", @@ -768,9 +768,9 @@ } }, "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz", + "integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ==" }, "y18n": { "version": "5.0.1", diff --git a/package.json b/package.json index 6e821bce..1a14b375 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,10 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.4.1", + "alexa-cookie2": "^3.4.2", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.3.1", + "ws": "^7.4.0", "extend": "^3.0.2", "uuid": "^8.3.1" }, From f0c3ed74b810ec6279f3626e84f494b239ee3af8 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 23 Nov 2020 23:40:39 +0100 Subject: [PATCH 094/356] chore: release v3.3.2 handle potential crash case (Sentry IOBROKER-ALEXA2-27) also ignore PUSH_DEVICE_SETUP_STATE_CHANGE push messages Optimize WSMQTT Reconnection handling for timeout cases --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7dd1b856..42ee4451 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.3.2 (2020-11-23) * (Apollon77) handle potential crash case (Sentry IOBROKER-ALEXA2-27) * (Apollon77) also ignore PUSH_DEVICE_SETUP_STATE_CHANGE push messages * (Apollon77) Optimize WSMQTT Reconnection handling for timeout cases diff --git a/package-lock.json b/package-lock.json index 2510c89b..b3b4522c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.1", + "version": "3.3.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1a14b375..399e69ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.1", + "version": "3.3.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 8bb401b99f5055be69fb3504fb526ae89ce1a97a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 3 Dec 2020 23:34:48 +0100 Subject: [PATCH 095/356] * (Apollon77) fix potential crash case (Sentry IOBROKER-ALEXA2-2K) --- README.md | 3 +++ alexa-wsmqtt.js | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 42ee4451..c74d51bd 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) fix potential crash case (Sentry IOBROKER-ALEXA2-2K) + ### 3.3.2 (2020-11-23) * (Apollon77) handle potential crash case (Sentry IOBROKER-ALEXA2-27) * (Apollon77) also ignore PUSH_DEVICE_SETUP_STATE_CHANGE push messages diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index e290ff6e..c1f3a12d 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -146,6 +146,7 @@ class AlexaWsMqtt extends EventEmitter { }); this.websocket.on('message', (data) => { + if (!this.websocket) return; let message = this.parseIncomingMessage(data); if (msgCounter === 0) { // initialization if (message.content.protocolName) { From 57706d258e40ea9422a1e217af9ee05201353bc5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 3 Dec 2020 23:35:01 +0100 Subject: [PATCH 096/356] chore: release v3.3.3 fix potential crash case (Sentry IOBROKER-ALEXA2-2K) --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c74d51bd..c18b9f1c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.3.3 (2020-12-03) * (Apollon77) fix potential crash case (Sentry IOBROKER-ALEXA2-2K) ### 3.3.2 (2020-11-23) diff --git a/package-lock.json b/package-lock.json index b3b4522c..30ca8f40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.2", + "version": "3.3.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 399e69ad..2d498316 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.2", + "version": "3.3.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From f11c5709a51b18a5bdc9ccaaae91e43552c3db46 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 11 Dec 2020 09:07:59 +0100 Subject: [PATCH 097/356] * (Apollon77) add support for textCommand - tell an Alexa device a text as you would speak it --- README.md | 3 +++ alexa-remote.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index c18b9f1c..9bc6098f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) add support for textCommand - tell an Alexa device a text as you would speak it + ### 3.3.3 (2020-12-03) * (Apollon77) fix potential crash case (Sentry IOBROKER-ALEXA2-2K) diff --git a/alexa-remote.js b/alexa-remote.js index 084f155c..630f7e4d 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1586,6 +1586,11 @@ class AlexaRemote extends EventEmitter { case 'calendarNext': seqNode.type = 'Alexa.Calendar.PlayNext'; break; + case 'textCommand': + seqNode.type = 'Alexa.TextCommand'; + seqNode.skillId = 'amzn1.ask.1p.tellalexa'; + seqNode.operationPayload.text = value.toString(); + break; case 'curatedtts': let supportedValues = ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"]; if(!supportedValues.includes(value)) { return null } From 13574534e06c42b8b1b08ba21db04dee3d3178f0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 11 Dec 2020 09:08:16 +0100 Subject: [PATCH 098/356] chore: release v3.4.0 add support for textCommand - tell an Alexa device a text as you would speak it --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9bc6098f..2794b832 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.4.0 (2020-12-11) * (Apollon77) add support for textCommand - tell an Alexa device a text as you would speak it ### 3.3.3 (2020-12-03) diff --git a/package-lock.json b/package-lock.json index 30ca8f40..97532254 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.3", + "version": "3.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2d498316..7a1f4924 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.3.3", + "version": "3.4.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From c94a95ae8c432ed702380922e25726bc6838748a Mon Sep 17 00:00:00 2001 From: FliegenKLATSCH Date: Sun, 13 Dec 2020 15:08:26 +0100 Subject: [PATCH 099/356] Fix check on success status code --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 630f7e4d..7fcba9a5 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -816,7 +816,7 @@ class AlexaRemote extends EventEmitter { if (typeof callback === 'function') { if (!body) { // Method 'DELETE' may return HTTP STATUS 200 without body this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); - return typeof res.statusCode === 'number' && res.statusCode % 100 === 2 ? callback(null, {'success': true}) : callback(new Error('no body'), null); + return typeof res.statusCode === 'number' && res.statusCode >= 200 && res.statusCode < 300 ? callback(null, {'success': true}) : callback(new Error('no body'), null); } try { From 647282b25e0cd286ec9e0d5232ddb9c2425c4e8f Mon Sep 17 00:00:00 2001 From: FliegenKLATSCH Date: Sun, 13 Dec 2020 16:25:17 +0100 Subject: [PATCH 100/356] Emit cookie event Applications may want to store a new cookie, such they can supply it again in case of restarts. --- alexa-remote.js | 1 + 1 file changed, 1 insertion(+) diff --git a/alexa-remote.js b/alexa-remote.js index 630f7e4d..59b614e6 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -65,6 +65,7 @@ class AlexaRemote extends EventEmitter { } this._options.csrf = this.csrf; this._options.cookie = this.cookie; + this.emit('cookie', this.cookie, this.csrf); } init(cookie, callback) { From e7bd179113ccd65f560a0d425160a145ad1269c8 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 24 Dec 2020 01:16:33 +0100 Subject: [PATCH 101/356] * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-2V) --- README.md | 5 +++++ alexa-wsmqtt.js | 1 + package-lock.json | 12 ++++++------ package.json | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2794b832..1b63d972 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,11 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-2V) +* (FliegenKLATSCH) add cookie as new event when a new cookie is generated +* (FliegenKLATSCH) fix error code handling + ### 3.4.0 (2020-12-11) * (Apollon77) add support for textCommand - tell an Alexa device a text as you would speak it diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index c1f3a12d..9da5dd52 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -123,6 +123,7 @@ class AlexaWsMqtt extends EventEmitter { this.websocket.close(); return; } + if (! this.websocket) return; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Open: ' + url); this.connectionActive = false; diff --git a/package-lock.json b/package-lock.json index 97532254..0f44b2fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -747,9 +747,9 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", - "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "vary": { "version": "1.1.2", @@ -768,9 +768,9 @@ } }, "ws": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz", - "integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ==" + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.1.tgz", + "integrity": "sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ==" }, "y18n": { "version": "5.0.1", diff --git a/package.json b/package.json index 7a1f4924..83a9e933 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "alexa-cookie2": "^3.4.2", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.4.0", + "ws": "^7.4.1", "extend": "^3.0.2", - "uuid": "^8.3.1" + "uuid": "^8.3.2" }, "devDependencies": { "@alcalzone/release-script": "^1.8.1" From 0e62b49442d03c05d484859472c79ee6f3bb85a1 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 24 Dec 2020 01:17:09 +0100 Subject: [PATCH 102/356] chore: release v3.5.0 Fix potential crash issue (Sentry IOBROKER-ALEXA2-2V) add cookie as new event when a new cookie is generated fix error code handling --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1b63d972..1c9995cf 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.5.0 (2020-12-24) * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-2V) * (FliegenKLATSCH) add cookie as new event when a new cookie is generated * (FliegenKLATSCH) fix error code handling diff --git a/package-lock.json b/package-lock.json index 0f44b2fe..06570ac1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.4.0", + "version": "3.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 83a9e933..e36a2fde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.4.0", + "version": "3.5.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From d146c35b39e383fe2f40aeabf06bd6d4d59c5ff2 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 16 Jan 2021 18:51:39 +0100 Subject: [PATCH 103/356] * update deps * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) --- .github/dependabot.yml | 6 +++ README.md | 3 ++ alexa-wsmqtt.js | 1 + package-lock.json | 117 ++++++++++++++++++++++------------------- package.json | 4 +- 5 files changed, 76 insertions(+), 55 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index af8728d5..c20ed4ad 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,11 @@ version: 2 updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly + time: "04:00" + timezone: Europe/Berlin - package-ecosystem: npm directory: "/" schedule: diff --git a/README.md b/README.md index 1c9995cf..aba46972 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) + ### 3.5.0 (2020-12-24) * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-2V) * (FliegenKLATSCH) add cookie as new event when a new cookie is generated diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 9da5dd52..09c3ecca 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -181,6 +181,7 @@ class AlexaWsMqtt extends EventEmitter { this.websocket.send(msg); this.pingPongInterval = setInterval(() => { + if (!this.websocket) return; //let msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" let msg = this.encodePing(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send Ping'); diff --git a/package-lock.json b/package-lock.json index 06570ac1..768f4c83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,24 +5,18 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.8.1.tgz", - "integrity": "sha512-ZBaTzNG41yfGpmmTBTe/pw7zWuWTxKGKO0nLlf8LXRcJJYOGifEwVZ0f428jXjtOx/+8nkic6P/ZEkls+//r1Q==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.8.3.tgz", + "integrity": "sha512-PPzX+GG08Gwx7ygraGB8pbnWSD0KIxHiJtegLhHK9GZ+QodAl2K4VQe8/RuY0r4fhwDWCXbYbPEw10xaxXmh2w==", "dev": true, "requires": { - "alcalzone-shared": "^2.0.0", - "axios": "^0.20.0", + "alcalzone-shared": "^3.0.1", + "axios": "^0.21.1", "colors": "^1.4.0", - "semver": "^7.3.2", - "yargs": "^16.0.3" + "semver": "^7.3.4", + "yargs": "^16.2.0" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, "@types/http-proxy": { "version": "1.17.4", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.4.tgz", @@ -46,18 +40,18 @@ } }, "alcalzone-shared": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-2.3.0.tgz", - "integrity": "sha512-wBVqPJMOb/vQ9ZeVpwGL19LhfOaLnZlDFHk7ZgFz2Q2c7kYHNVKJhLQBMHhkAQ9P7zQ8Fx5IWEySXHGixcAIkw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-3.0.2.tgz", + "integrity": "sha512-kcXwSVaB19k3gbJoDqktD9nL2JyufbTThbk8LEL0xKY77TqoIWtraOrrGtRCihlqJPIyfacdFu//0X28ZfWPSg==", "dev": true, "requires": { - "debug": "^4.1.1" + "debug": "^4.3.1" }, "dependencies": { "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -91,12 +85,11 @@ "dev": true }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -106,9 +99,9 @@ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "axios": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", - "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "dev": true, "requires": { "follow-redirects": "^1.10.0" @@ -155,9 +148,9 @@ "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, "cliui": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.1.tgz", - "integrity": "sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { "string-width": "^4.2.0", @@ -260,9 +253,9 @@ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, "escalade": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.0.tgz", - "integrity": "sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-html": { @@ -472,6 +465,15 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, + "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==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -623,10 +625,13 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "send": { "version": "0.17.1", @@ -768,35 +773,41 @@ } }, "ws": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.1.tgz", - "integrity": "sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ==" + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", + "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==" }, "y18n": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.1.tgz", - "integrity": "sha512-/jJ831jEs4vGDbYPQp4yGKDYPSCCEQ45uZWJHE1AoYBzqdZi8+LDWas0z4HrmJXmKdpFsTiowSHXdxyFhpmdMg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yargs": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.0.3.tgz", - "integrity": "sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^7.0.0", - "escalade": "^3.0.2", + "cliui": "^7.0.2", + "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", - "y18n": "^5.0.1", - "yargs-parser": "^20.0.0" + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } }, "yargs-parser": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.0.tgz", - "integrity": "sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A==", + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true } } diff --git a/package.json b/package.json index e36a2fde..acbad33d 100644 --- a/package.json +++ b/package.json @@ -28,12 +28,12 @@ "alexa-cookie2": "^3.4.2", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.4.1", + "ws": "^7.4.2", "extend": "^3.0.2", "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^1.8.1" + "@alcalzone/release-script": "^1.8.3" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 31e56c37e12b4798eac5a0bcf5e6f326c78a0976 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Jan 2021 17:53:18 +0000 Subject: [PATCH 104/356] Bump actions/setup-node from v1 to v2.1.4 Bumps [actions/setup-node](https://github.com/actions/setup-node) from v1 to v2.1.4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v1...c46424eee26de4078d34105d3de3cc4992202b1e) Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 475a4be4..b224c590 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2.1.4 with: node-version: ${{ matrix.node-version }} @@ -60,7 +60,7 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2.1.4 with: node-version: ${{ matrix.node-version }} From 1ca4060a924073e2147b733818539304389bcf6b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 17 Jan 2021 01:02:37 +0100 Subject: [PATCH 105/356] chore: release v3.5.1 Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aba46972..d603d0f5 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.5.1 (2021-01-17) * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) ### 3.5.0 (2020-12-24) diff --git a/package-lock.json b/package-lock.json index 768f4c83..2d875444 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.5.0", + "version": "3.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index acbad33d..9f66dd04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.5.0", + "version": "3.5.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 574d570ac03d401d586457c33da9a00f1bd0fbf7 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 17 Jan 2021 01:06:27 +0100 Subject: [PATCH 106/356] * release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d603d0f5..aba46972 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### 3.5.1 (2021-01-17) +### __WORK IN PROGRESS__ * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) ### 3.5.0 (2020-12-24) From 1a7fa831fc1fc9b9eacb5d5e4381633dacd874c8 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 17 Jan 2021 01:06:36 +0100 Subject: [PATCH 107/356] chore: release v3.5.2 Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aba46972..9cf2182d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.5.2 (2021-01-17) * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) ### 3.5.0 (2020-12-24) diff --git a/package-lock.json b/package-lock.json index 2d875444..a04565d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.5.1", + "version": "3.5.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9f66dd04..7eca0a8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.5.1", + "version": "3.5.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 7883057057427e25d1a33cf544aae606212c003d Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 28 Jan 2021 10:51:21 +0100 Subject: [PATCH 108/356] * (Apollon77) Adjust to new automations (Routines) route * (Apollon77) Add getAllDeviceVolumes method * (Apollon77) Return relationships in getSmarthomeDevices call --- README.md | 5 ++++ alexa-remote.js | 62 ++++++++++++++++++++++++++----------------------- 2 files changed, 38 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 9cf2182d..2aadf9dd 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,11 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Adjust to new automations (Routines) route +* (Apollon77) Add getAllDeviceVolumes method +* (Apollon77) Return relationships in getSmarthomeDevices call + ### 3.5.2 (2021-01-17) * (Apollon77) Fix potential crash issue (Sentry IOBROKER-ALEXA2-39) diff --git a/alexa-remote.js b/alexa-remote.js index 735236f2..9ac93c8f 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -353,9 +353,9 @@ class AlexaRemote extends EventEmitter { this.emit('ws-unknown-message', incomingMsg); }); this.alexaWsMqtt.on('command', (command, payload) => { - + this.emit('command', { 'command': command, 'payload': payload }); - + switch(command) { case 'PUSH_DOPPLER_CONNECTION_CHANGE': /* @@ -614,7 +614,7 @@ class AlexaRemote extends EventEmitter { this.getPushedActivities(); }, 200); return; - + case 'PUSH_TODO_CHANGE': // does not exist? case 'PUSH_LIST_CHANGE': // does not exist? case 'PUSH_LIST_ITEM_CHANGE': @@ -635,7 +635,7 @@ class AlexaRemote extends EventEmitter { listItemId: payload.listItemId }); return; - + case 'PUSH_MICROPHONE_STATE': case 'PUSH_DELETE_DOPPLER_ACTIVITIES': case 'PUSH_DEVICE_SETUP_STATE_CHANGE': @@ -755,7 +755,7 @@ class AlexaRemote extends EventEmitter { } httpsGetCall(path, callback, flags = {}) { - + let options = { host: this.baseUrl, path: '', @@ -871,7 +871,7 @@ class AlexaRemote extends EventEmitter { if (flags && flags.data) { req.write(flags.data); } - + req.end(); } @@ -928,7 +928,7 @@ class AlexaRemote extends EventEmitter { getList(listId, callback) { this.httpsGet ('/api/namedLists/' + listId + '?_=%t', callback); } - + /** * Get items from a list. * @@ -941,30 +941,30 @@ class AlexaRemote extends EventEmitter { * */ getListItems(listId, options, callback) { - + // get function params if (typeof options === 'function') { callback = options; options = {}; } - + // get params by options let params = ''; for (let option in options) { - params += '&' + option + '=' + options[option]; + params += '&' + option + '=' + options[option]; } - + // send request this.httpsGet ('/api/namedLists/' + listId + '/items?_=%t' + params, (err, res) => callback && callback(err, res && res.list)); } - + addListItem(listId, options, callback) { - + // get function params if (typeof options === 'string') { options = { 'value': options }; } - + // request options let request = { 'method': 'POST', @@ -975,29 +975,29 @@ class AlexaRemote extends EventEmitter { ...options }) }; - + // send request this.httpsGet ('/api/namedLists/' + listId + '/item', callback, request); } - + updateListItem(listId, listItem, options, callback) { - + // providing a version is mandatory if (typeof options !== 'object' || !options.version || !options.value) { let errors = []; - + if (!options.version && callback) { errors.push('Providing the current version via options is mandatory!'); } - + if (!options.value && callback) { errors.push('Providing a new value (description) via options is mandatory!'); } - + callback && callback(errors); return false; } - + // request options let request = { 'method': 'PUT', @@ -1008,20 +1008,20 @@ class AlexaRemote extends EventEmitter { ...options }) }; - + // send request this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); } - + deleteListItem(listId, listItem, callback) { - + // data let data = JSON.stringify({ 'listId': listId, 'id': listItem, 'value': '' // must be provided, but value doesn't matter }); - + // request options let request = { 'method': 'DELETE', @@ -1031,11 +1031,11 @@ class AlexaRemote extends EventEmitter { 'Content-Length': data.length } }; - + // send request this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); } - + getWakeWords(callback) { this.httpsGet (`/api/wake-word?_=%t`, callback); } @@ -1810,7 +1810,7 @@ class AlexaRemote extends EventEmitter { limit = 0; } limit = limit || 2000; - this.httpsGet (`/api/behaviors/automations?limit=${limit}`, callback, { + this.httpsGet (`/api/behaviors/v2/automations?limit=${limit}`, callback, { timeout: 30000 }); } @@ -1930,8 +1930,12 @@ class AlexaRemote extends EventEmitter { this.httpsGet ('/api/device-preferences?cached=true&_=%t', callback); } + getAllDeviceVolumes(callback) { + this.httpsGet ('/api/devices/deviceType/dsn/audio/v1/allDeviceVolumes', callback); + } + getSmarthomeDevices(callback) { - this.httpsGet ('/api/phoenix?_=%t', function (err, res) { + this.httpsGet ('/api/phoenix?includeRelationships=true&_=%t', function (err, res) { if (err || !res || !res.networkDetail) return callback(err, res); try { res = JSON.parse(res.networkDetail); From 6d3a9a3f80392c48f6c04042e9aad91429491da5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 28 Jan 2021 10:51:28 +0100 Subject: [PATCH 109/356] chore: release v3.6.0 Adjust to new automations (Routines) route Add getAllDeviceVolumes method Return relationships in getSmarthomeDevices call --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2aadf9dd..4489f4f1 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.6.0 (2021-01-28) * (Apollon77) Adjust to new automations (Routines) route * (Apollon77) Add getAllDeviceVolumes method * (Apollon77) Return relationships in getSmarthomeDevices call diff --git a/package-lock.json b/package-lock.json index a04565d0..8b945cf5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.5.2", + "version": "3.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7eca0a8c..abe849f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.5.2", + "version": "3.6.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 55a3078448c0d74d2006d09848c69f81c6f57d46 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:17:01 +0100 Subject: [PATCH 110/356] * (Apollon77) Try to get activities back working with new CustomerHistory requests --- README.md | 3 ++ alexa-remote.js | 88 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 88 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4489f4f1..f589fa0f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Try to get activities back working with new CustomerHistory requests + ### 3.6.0 (2021-01-28) * (Apollon77) Adjust to new automations (Routines) route * (Apollon77) Add getAllDeviceVolumes method diff --git a/alexa-remote.js b/alexa-remote.js index 9ac93c8f..80a18547 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -652,13 +652,13 @@ class AlexaRemote extends EventEmitter { getPushedActivities() { if (this.activityUpdateRunning || !this.activityUpdateQueue.length) return; this.activityUpdateRunning = true; - this.getActivities({size: this.activityUpdateQueue.length + 2, filter: false}, (err, res) => { + this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false}, (err, res) => { this.activityUpdateRunning = false; if (!err && res) { let lastFoundQueueIndex = -1; this.activityUpdateQueue.forEach((entry, queueIndex) => { - const found = res.findIndex(activity => activity.data.id.endsWith('#' + entry.key.entryId) && activity.data.registeredCustomerId === entry.key.registeredUserId); + const found = res.findIndex(activity => activity.data.recordKey.endsWith('#' + entry.key.entryId) && activity.data.customerId === entry.key.registeredUserId); if (found === -1) { this._options.logger && this._options.logger('Alexa-Remote: Activity for id ' + entry.key.entryId + ' not found'); @@ -875,7 +875,6 @@ class AlexaRemote extends EventEmitter { req.end(); } - /// Public checkAuthentication(callback) { this.httpsGetCall ('/api/bootstrap?version=0', function (err, res) { @@ -1364,6 +1363,89 @@ class AlexaRemote extends EventEmitter { ); } + getCustomerHistoryRecords(options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + this.httpsGet (`/alexa-privacy/apd/rvh/customer-history-records` + + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + + `?endTime=${options.endTime || Date.now()}` + + `?recordType=${options.recordType || 'VOICE_HISTORY'}` + + `&maxRecordSize=${options.maxRecordSize || 1}`, + (err, result) => { + if (err || !result) return callback/*.length >= 2*/ && callback(err, result); + + let ret = []; + if (result.customerHistoryRecords) { + for (let r = 0; r < result.customerHistoryRecords.length; r++) { + let res = result.customerHistoryRecords[r]; + let o = { + data: res + }; + const convParts = {}; + if (res.voiceHistoryRecordItems && Array.isArray(res.voiceHistoryRecordItems)) { + res.voiceHistoryRecordItems.forEach(item => { + convParts[item.recordItemType] = convParts[item.recordItemType] || []; + convParts[item.recordItemType].push(item); + }); + } + + const recordKey = res.recordKey.split('#'); // A3NSX4MMJVG96V#1612297041815#A1RABVCI4QCIKC#G0911W0793360TLG + + o.deviceType = recordKey[2] || null; + //o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; + o.creationTimestamp = res.timestamp || null; + //o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED + + o.deviceSerialNumber = recordKey[3]; + if (!this.serialNumbers[o.deviceSerialNumber]) continue; + o.name = this.serialNumbers[o.deviceSerialNumber].accountName; + const dev = this.find(o.deviceSerialNumber); + let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; + + if (convParts.CUSTOMER_TRANSCRIPT) { + o.description = {'summary': ''}; + convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { + let text = trans.transcriptText; + if (wakeWord && text.startsWith(wakeWord)) { + text = text.substr(wakeWord.length).trim(); + } + o.description.summary += text + ', '; + }); + o.description.summary = o.description.summary.substring(0, -2).trim(); + } + if (convParts.ALEXA_RESPONSE) { + o.alexaResponse = ''; + convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); + o.alexaResponse = o.alexaResponse.substring(0, -2).trim(); + } + if (!o.description || !o.description.summary.length) continue; + if (options.filter) { + if (res.utteranceType === 'WAKE_WORD_ONLY') { + continue; + } + + switch (o.description.summary) { + case 'stopp': + case 'alexa': + case 'echo': + case 'computer': + case 'amazon': + case ',': + case '': + continue; + } + } + + if (o.description.summary || !options.filter) ret.push(o); + } + } + if (typeof callback === 'function') return callback (err, ret); + } + ); + } + getAccount(callback) { this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/accounts`, callback); } From ac1d1145bd2f8dea721dfab94e136e117e547955 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:33:36 +0100 Subject: [PATCH 111/356] * send to other host --- alexa-remote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 80a18547..d79c800d 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -757,7 +757,7 @@ class AlexaRemote extends EventEmitter { httpsGetCall(path, callback, flags = {}) { let options = { - host: this.baseUrl, + host: flags.host || this.baseUrl, path: '', method: 'GET', timeout: flags.timeout || 10000, @@ -1442,7 +1442,7 @@ class AlexaRemote extends EventEmitter { } } if (typeof callback === 'function') return callback (err, ret); - } + }, {host: `www.${this._options.amazonPage}`} ); } From 45c694b0004ded3e0328e3329e3704546cff2914 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:38:32 +0100 Subject: [PATCH 112/356] * send to other host --- alexa-remote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index d79c800d..0bda373c 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1368,7 +1368,7 @@ class AlexaRemote extends EventEmitter { callback = options; options = {}; } - this.httpsGet (`/alexa-privacy/apd/rvh/customer-history-records` + + this.httpsGet (`https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records` + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + `?endTime=${options.endTime || Date.now()}` + `?recordType=${options.recordType || 'VOICE_HISTORY'}` + @@ -1442,7 +1442,7 @@ class AlexaRemote extends EventEmitter { } } if (typeof callback === 'function') return callback (err, ret); - }, {host: `www.${this._options.amazonPage}`} + } ); } From bb8fdba3818d1f640abe7f0ceae5212493476ffe Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:42:12 +0100 Subject: [PATCH 113/356] * fix request --- alexa-remote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 0bda373c..c75b91a9 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1370,8 +1370,8 @@ class AlexaRemote extends EventEmitter { } this.httpsGet (`https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records` + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + - `?endTime=${options.endTime || Date.now()}` + - `?recordType=${options.recordType || 'VOICE_HISTORY'}` + + `&endTime=${options.endTime || Date.now()}` + + `6recordType=${options.recordType || 'VOICE_HISTORY'}` + `&maxRecordSize=${options.maxRecordSize || 1}`, (err, result) => { if (err || !result) return callback/*.length >= 2*/ && callback(err, result); From 0adbff370fdc4917ed219190179cb92da32058e3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:42:28 +0100 Subject: [PATCH 114/356] * fix request --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index c75b91a9..f1888fe9 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1371,7 +1371,7 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records` + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + `&endTime=${options.endTime || Date.now()}` + - `6recordType=${options.recordType || 'VOICE_HISTORY'}` + + `&recordType=${options.recordType || 'VOICE_HISTORY'}` + `&maxRecordSize=${options.maxRecordSize || 1}`, (err, result) => { if (err || !result) return callback/*.length >= 2*/ && callback(err, result); From c9744ae86e3a13b22c0aca354517cfa96b23c976 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:51:37 +0100 Subject: [PATCH 115/356] * request different timeframe --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index f1888fe9..0be2138f 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1370,7 +1370,7 @@ class AlexaRemote extends EventEmitter { } this.httpsGet (`https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records` + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + - `&endTime=${options.endTime || Date.now()}` + + `&endTime=${options.endTime || Date.now() + 24 * 60 * 60 * 1000}` + `&recordType=${options.recordType || 'VOICE_HISTORY'}` + `&maxRecordSize=${options.maxRecordSize || 1}`, (err, result) => { From 4294ec13c87601db7413143046809a4e18aab271 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:57:33 +0100 Subject: [PATCH 116/356] * fix filter logic --- alexa-remote.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 0be2138f..92c96957 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1420,8 +1420,9 @@ class AlexaRemote extends EventEmitter { convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); o.alexaResponse = o.alexaResponse.substring(0, -2).trim(); } - if (!o.description || !o.description.summary.length) continue; if (options.filter) { + if (!o.description || !o.description.summary.length) continue; + if (res.utteranceType === 'WAKE_WORD_ONLY') { continue; } From 84de8c1c9287da2db2037dec414a877dacc29737 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 00:58:39 +0100 Subject: [PATCH 117/356] * fix filter logic --- alexa-remote.js | 1 + 1 file changed, 1 insertion(+) diff --git a/alexa-remote.js b/alexa-remote.js index 92c96957..323ef2a2 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -655,6 +655,7 @@ class AlexaRemote extends EventEmitter { this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false}, (err, res) => { this.activityUpdateRunning = false; if (!err && res) { + this._options.logger && this._options.logger('Alexa-Remote: Activity data ' + JSON.stringfy(res)); // TODO REMOVE let lastFoundQueueIndex = -1; this.activityUpdateQueue.forEach((entry, queueIndex) => { From 9867a6bd8f75710554dbca5ef719e1dfea70ace3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 01:17:35 +0100 Subject: [PATCH 118/356] * fix parsing logic --- alexa-remote.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 323ef2a2..1155edab 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -655,7 +655,7 @@ class AlexaRemote extends EventEmitter { this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false}, (err, res) => { this.activityUpdateRunning = false; if (!err && res) { - this._options.logger && this._options.logger('Alexa-Remote: Activity data ' + JSON.stringfy(res)); // TODO REMOVE + this._options.logger && this._options.logger('Alexa-Remote: Activity data ' + JSON.stringify(res)); // TODO REMOVE let lastFoundQueueIndex = -1; this.activityUpdateQueue.forEach((entry, queueIndex) => { @@ -1390,6 +1390,7 @@ class AlexaRemote extends EventEmitter { convParts[item.recordItemType] = convParts[item.recordItemType] || []; convParts[item.recordItemType].push(item); }); + o.conversionDetails = convParts; } const recordKey = res.recordKey.split('#'); // A3NSX4MMJVG96V#1612297041815#A1RABVCI4QCIKC#G0911W0793360TLG @@ -1405,8 +1406,8 @@ class AlexaRemote extends EventEmitter { const dev = this.find(o.deviceSerialNumber); let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; + o.description = {'summary': ''}; if (convParts.CUSTOMER_TRANSCRIPT) { - o.description = {'summary': ''}; convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { let text = trans.transcriptText; if (wakeWord && text.startsWith(wakeWord)) { @@ -1414,12 +1415,12 @@ class AlexaRemote extends EventEmitter { } o.description.summary += text + ', '; }); - o.description.summary = o.description.summary.substring(0, -2).trim(); + o.description.summary = o.description.summary.substring(0, o.description.summary.length - 2).trim(); } if (convParts.ALEXA_RESPONSE) { o.alexaResponse = ''; convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); - o.alexaResponse = o.alexaResponse.substring(0, -2).trim(); + o.alexaResponse = o.alexaResponse.substring(0, o.alexaResponse.length - 2).trim(); } if (options.filter) { if (!o.description || !o.description.summary.length) continue; From 1b1a6e6a1db33a22b2bb9a8ba46deb3e25e2c879 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 01:46:06 +0100 Subject: [PATCH 119/356] * do not run into many requests when response got an error --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 1155edab..0980902a 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -689,7 +689,7 @@ class AlexaRemote extends EventEmitter { } } - if (this.activityUpdateQueue.length) { + if (!err && this.activityUpdateQueue.length) { this.activityUpdateTimeout = setTimeout(() => { this.activityUpdateTimeout = null; this.getPushedActivities(); From 83bbe62c50979bdbbcaa863d9c0e36f23ac03404 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 08:06:26 +0100 Subject: [PATCH 120/356] * handle 50x errors better --- alexa-remote.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 0980902a..d9876c91 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -824,6 +824,13 @@ class AlexaRemote extends EventEmitter { try { ret = JSON.parse(body); } catch (e) { + if (typeof res.statusCode === 'number' && res.statusCode >= 500 && res.statusCode < 510) { + this._options.logger && this._options.logger('Alexa-Remote: Response: Status: ' + res.statusCode); + callback(new Error('no body'), null); + callback = null; + return; + } + this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); callback && callback(new Error('no JSON'), body); callback = null; @@ -864,7 +871,7 @@ class AlexaRemote extends EventEmitter { req.on('close', () => { if (typeof callback === 'function'/* && callback.length >= 2*/) { this._options.logger && this._options.logger('Alexa-Remote: Response: Closed'); - callback (new Error('COnnection Closed'), null); + callback (new Error('Connection Closed'), null); callback = null; } }); From 7cffd158c976a21c7643dbaa9f9de85e533705e4 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 10:06:34 +0100 Subject: [PATCH 121/356] * change parsing to also accept gzip and deflate responses --- alexa-remote.js | 74 ++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index d9876c91..75f5ad1d 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -11,6 +11,7 @@ const os = require('os'); const extend = require('extend'); const AlexaWsMqtt = require('./alexa-wsmqtt.js'); const { v1: uuidv1 } = require('uuid'); +const zlib = require('zlib'); const EventEmitter = require('events'); @@ -757,6 +758,34 @@ class AlexaRemote extends EventEmitter { httpsGetCall(path, callback, flags = {}) { + const handleResponse = (err, res, body) => { + if (err || !body) { // Method 'DELETE' may return HTTP STATUS 200 without body + this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); + return typeof res.statusCode === 'number' && res.statusCode >= 200 && res.statusCode < 300 ? callback(null, {'success': true}) : callback(new Error('no body'), null); + } + + let ret; + try { + ret = JSON.parse(body); + } catch (e) { + if (typeof res.statusCode === 'number' && res.statusCode >= 500 && res.statusCode < 510) { + this._options.logger && this._options.logger('Alexa-Remote: Response: Status: ' + res.statusCode); + callback(new Error('no body'), null); + callback = null; + return; + } + + this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); + callback && callback(new Error('no JSON'), body); + callback = null; + return; + } + + this._options.logger && this._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); + callback(null, ret); + callback = null; + }; + let options = { host: flags.host || this.baseUrl, path: '', @@ -770,7 +799,8 @@ class AlexaRemote extends EventEmitter { //'Content-Type': 'application/json', //'Connection': 'keep-alive', // new 'csrf' : this.csrf, - 'Cookie' : this.cookie + 'Cookie' : this.cookie, + 'Accept-Encoding': 'gzip,deflate' } }; @@ -797,6 +827,7 @@ class AlexaRemote extends EventEmitter { const logOptions = JSON.parse(JSON.stringify(options)); delete logOptions.headers.Cookie; delete logOptions.headers.csrf; + delete logOptions.headers['Accept-Encoding']; delete logOptions.headers['User-Agent']; delete logOptions.headers['Content-Type']; delete logOptions.headers.Referer; @@ -806,40 +837,27 @@ class AlexaRemote extends EventEmitter { let req; try { req = https.request(options, (res) => { - let body = ''; + const chunks = []; res.on('data', (chunk) => { - body += chunk; + chunks.push(chunk); }); res.on('end', () => { - let ret; - if (typeof callback === 'function') { - if (!body) { // Method 'DELETE' may return HTTP STATUS 200 without body - this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); - return typeof res.statusCode === 'number' && res.statusCode >= 200 && res.statusCode < 300 ? callback(null, {'success': true}) : callback(new Error('no body'), null); - } - - try { - ret = JSON.parse(body); - } catch (e) { - if (typeof res.statusCode === 'number' && res.statusCode >= 500 && res.statusCode < 510) { - this._options.logger && this._options.logger('Alexa-Remote: Response: Status: ' + res.statusCode); - callback(new Error('no body'), null); - callback = null; - return; - } - - this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); - callback && callback(new Error('no JSON'), body); - callback = null; - return; + const resBuffer = Buffer.concat(chunks); + const encoding = res.headers['content-encoding']; + if (encoding === 'gzip') { + zlib.gunzip(resBuffer, (err, decoded) => { + handleResponse(err, res, decoded && decoded.toString()); + }); + } else if (encoding === 'deflate') { + zlib.inflate(resBuffer, (err, decoded) => { + handleResponse(err, res, decoded && decoded.toString()); + }); + } else { + handleResponse(null, res, resBuffer.toString()); } - - this._options.logger && this._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); - callback(null, ret); - callback = null; } }); }); From 188c045e14bdbf921dfa8037ce8882a1a23bf879 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 10:07:39 +0100 Subject: [PATCH 122/356] * change parsing to also accept gzip and deflate responses --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 75f5ad1d..db49d381 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -775,7 +775,7 @@ class AlexaRemote extends EventEmitter { return; } - this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON'); + this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON : ' + body); callback && callback(new Error('no JSON'), body); callback = null; return; From 8c7240f204cfb7a8ea60f6d0274a215956569872 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 10:17:10 +0100 Subject: [PATCH 123/356] * change parsing to also accept gzip and deflate responses --- alexa-remote.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index db49d381..cfff3268 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -797,7 +797,7 @@ class AlexaRemote extends EventEmitter { 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, //'Content-Type': 'application/json', - //'Connection': 'keep-alive', // new + //'Connection': 'keep-alive', 'csrf' : this.csrf, 'Cookie' : this.cookie, 'Accept-Encoding': 'gzip,deflate' @@ -835,6 +835,7 @@ class AlexaRemote extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); let req; + let responseReceived = false; try { req = https.request(options, (res) => { const chunks = []; @@ -844,6 +845,7 @@ class AlexaRemote extends EventEmitter { }); res.on('end', () => { + responseReceived = true; if (typeof callback === 'function') { const resBuffer = Buffer.concat(chunks); const encoding = res.headers['content-encoding']; @@ -872,14 +874,14 @@ class AlexaRemote extends EventEmitter { req.on('error', (e) => { this._options.logger && this._options.logger('Alexa-Remote: Response: Error: ' + e); - if (typeof callback === 'function'/* && callback.length >= 2*/) { + if (!responseReceived && typeof callback === 'function'/* && callback.length >= 2*/) { callback (e, null); callback = null; } }); req.on('timeout', () => { - if (typeof callback === 'function'/* && callback.length >= 2*/) { + if (!responseReceived && typeof callback === 'function'/* && callback.length >= 2*/) { this._options.logger && this._options.logger('Alexa-Remote: Response: Timeout'); callback (new Error('Timeout'), null); callback = null; @@ -887,7 +889,7 @@ class AlexaRemote extends EventEmitter { }); req.on('close', () => { - if (typeof callback === 'function'/* && callback.length >= 2*/) { + if (!responseReceived && typeof callback === 'function'/* && callback.length >= 2*/) { this._options.logger && this._options.logger('Alexa-Remote: Response: Closed'); callback (new Error('Connection Closed'), null); callback = null; From 12a4e569531fb245cb79662eace032078d3d47c1 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 17:22:37 +0100 Subject: [PATCH 124/356] * prepare release --- README.md | 8 +++++++- alexa-remote.js | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f589fa0f..328c903d 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,13 @@ Thank you for that work. ## Changelog: ### __WORK IN PROGRESS__ -* (Apollon77) Try to get activities back working with new CustomerHistory requests +* (Apollon77) Implement new method to get History/Activities + * getActivities Method is still there and still triggers the Amazon route as till now. INo idea ng it still works for some users. I declared it as deprecated now + * add new method "getCustomerHistoryRecords" which uses another endpoint on Amazon side and delivers different data. The return is returned relative compatible to getActivities, so should be a drop in replacement - beside the fact that some fileds can not be provided any longer and will be simply empty! (e.g. activityStatus, deviceAccountId ...) Also in the amazon data some fields are no longer existing (e.g. domainAttributes ...) + * the event "ws-device-activity" is migrated to use the new getCustomerHistoryRecords endpoint, and so returns compatible, but not 100% the same data +* (Apollon77) Make sure to not hammer requests to Amazon in case the activity request returns an error and the received PUSH_ACTIVITY entry was not found +* (Apollon77) Detect and handle 50x error cases and handle them as if no content was returned +* (Apollon77) Enhance communication to also support gzip and deflate encoded responses because Amazon sometimes ignore requested Accept-Encoding specs. This also could improve speed ### 3.6.0 (2021-01-28) * (Apollon77) Adjust to new automations (Routines) route diff --git a/alexa-remote.js b/alexa-remote.js index cfff3268..08584f06 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1318,9 +1318,15 @@ class AlexaRemote extends EventEmitter { { method: 'POST' }); } + /** + * @deprecated + */ getHistory(options, callback) { return this.getActivities(options, callback); } + /** + * @deprecated + */ getActivities(options, callback) { if (typeof options === 'function') { callback = options; From 2b7d1d1295ef08c355529dd10e9d9e5f7698efb1 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 17:23:01 +0100 Subject: [PATCH 125/356] chore: release v3.7.0 Implement new method to get History/Activities getActivities Method is still there and still triggers the Amazon route as till now. INo idea ng it still works for some users. I declared it as deprecated now add new method "getCustomerHistoryRecords" which uses another endpoint on Amazon side and delivers different data. The return is returned relative compatible to getActivities, so should be a drop in replacement - beside the fact that some fileds can not be provided any longer and will be simply empty! (e.g. activityStatus, deviceAccountId ...) Also in the amazon data some fields are no longer existing (e.g. domainAttributes ...) the event "ws-device-activity" is migrated to use the new getCustomerHistoryRecords endpoint, and so returns compatible, but not 100% the same data Make sure to not hammer requests to Amazon in case the activity request returns an error and the received PUSH_ACTIVITY entry was not found Detect and handle 50x error cases and handle them as if no content was returned Enhance communication to also support gzip and deflate encoded responses because Amazon sometimes ignore requested Accept-Encoding specs. This also could improve speed --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 328c903d..357f03a3 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.7.0 (2021-02-03) * (Apollon77) Implement new method to get History/Activities * getActivities Method is still there and still triggers the Amazon route as till now. INo idea ng it still works for some users. I declared it as deprecated now * add new method "getCustomerHistoryRecords" which uses another endpoint on Amazon side and delivers different data. The return is returned relative compatible to getActivities, so should be a drop in replacement - beside the fact that some fileds can not be provided any longer and will be simply empty! (e.g. activityStatus, deviceAccountId ...) Also in the amazon data some fields are no longer existing (e.g. domainAttributes ...) diff --git a/package-lock.json b/package-lock.json index 8b945cf5..e2054033 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.6.0", + "version": "3.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index abe849f9..57063ff6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.6.0", + "version": "3.7.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 8da7254b4d0339cabf6cb09e35be95fe153d84a3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 18:01:53 +0100 Subject: [PATCH 126/356] * (Apollon77) also capture tests from ASR_REPLACEMENT_TEXT and TTS_REPLACEMENT_TEXT into summary and alexaResponse --- README.md | 3 +++ alexa-remote.js | 38 +++++++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 357f03a3..d8b490a2 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) also capture tests from ASR_REPLACEMENT_TEXT and TTS_REPLACEMENT_TEXT into summary and alexaResponse + ### 3.7.0 (2021-02-03) * (Apollon77) Implement new method to get History/Activities * getActivities Method is still there and still triggers the Amazon route as till now. INo idea ng it still works for some users. I declared it as deprecated now diff --git a/alexa-remote.js b/alexa-remote.js index 08584f06..b4786e89 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1440,19 +1440,35 @@ class AlexaRemote extends EventEmitter { let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; o.description = {'summary': ''}; - if (convParts.CUSTOMER_TRANSCRIPT) { - convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { - let text = trans.transcriptText; - if (wakeWord && text.startsWith(wakeWord)) { - text = text.substr(wakeWord.length).trim(); - } - o.description.summary += text + ', '; - }); + if (convParts.CUSTOMER_TRANSCRIPT || convParts.ASR_REPLACEMENT_TEXT) { + if (convParts.CUSTOMER_TRANSCRIPT) { + convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { + let text = trans.transcriptText; + if (wakeWord && text.startsWith(wakeWord)) { + text = text.substr(wakeWord.length).trim(); + } + o.description.summary += text + ', '; + }); + } + if (convParts.ASR_REPLACEMENT_TEXT) { + convParts.ASR_REPLACEMENT_TEXT.forEach(trans => { + let text = trans.transcriptText; + if (wakeWord && text.startsWith(wakeWord)) { + text = text.substr(wakeWord.length).trim(); + } + o.description.summary += text + ', '; + }); + } o.description.summary = o.description.summary.substring(0, o.description.summary.length - 2).trim(); } - if (convParts.ALEXA_RESPONSE) { - o.alexaResponse = ''; - convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); + o.alexaResponse = ''; + if (convParts.ALEXA_RESPONSE || convParts.TTS_REPLACEMENT_TEXT) { + if (convParts.ALEXA_RESPONSE) { + convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); + } + if (convParts.TTS_REPLACEMENT_TEXT) { + convParts.TTS_REPLACEMENT_TEXT.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); + } o.alexaResponse = o.alexaResponse.substring(0, o.alexaResponse.length - 2).trim(); } if (options.filter) { From 9c018c74c0d0f96f3034bfa5336f6d236a788a7a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Feb 2021 18:02:00 +0100 Subject: [PATCH 127/356] chore: release v3.7.1 also capture tests from ASR_REPLACEMENT_TEXT and TTS_REPLACEMENT_TEXT into summary and alexaResponse --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d8b490a2..3a08e401 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.7.1 (2021-02-03) * (Apollon77) also capture tests from ASR_REPLACEMENT_TEXT and TTS_REPLACEMENT_TEXT into summary and alexaResponse ### 3.7.0 (2021-02-03) diff --git a/package-lock.json b/package-lock.json index e2054033..c93d6f78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.7.0", + "version": "3.7.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 57063ff6..33df1f78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.7.0", + "version": "3.7.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From a1309379f1b5bc6b8da4d4b55a484fd9578719cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 03:02:09 +0000 Subject: [PATCH 128/356] Bump actions/setup-node from v2.1.4 to v2.1.5 Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.4 to v2.1.5. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.1.4...46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea) Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index b224c590..5b7dd9a5 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} @@ -60,7 +60,7 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} From 35f43aff0f645455a3db85d463d00152e5bea8c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 03:03:00 +0000 Subject: [PATCH 129/356] Bump ws from 7.4.2 to 7.4.3 (#108) --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c93d6f78..470ebd59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -773,9 +773,9 @@ } }, "ws": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", - "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", + "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==" }, "y18n": { "version": "5.0.5", diff --git a/package.json b/package.json index 33df1f78..d21a5445 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "alexa-cookie2": "^3.4.2", "https": "^1.0.0", "querystring": "^0.2.0", - "ws": "^7.4.2", + "ws": "^7.4.3", "extend": "^3.0.2", "uuid": "^8.3.2" }, From 5cc4938b70e904a3294184ec807973f60f3f964a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 9 Apr 2021 21:20:30 +0200 Subject: [PATCH 130/356] * update deps --- package-lock.json | 12 ++++++------ package.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 470ebd59..0058f23b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -569,9 +569,9 @@ "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", + "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==" }, "range-parser": { "version": "1.2.1", @@ -773,9 +773,9 @@ } }, "ws": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", - "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", + "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==" }, "y18n": { "version": "5.0.5", diff --git a/package.json b/package.json index d21a5445..61fbe51b 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "dependencies": { "alexa-cookie2": "^3.4.2", "https": "^1.0.0", - "querystring": "^0.2.0", - "ws": "^7.4.3", + "querystring": "^0.2.1", + "ws": "^7.4.4", "extend": "^3.0.2", "uuid": "^8.3.2" }, From 01f3b24109b8e6e625c0905e946871595a961efa Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 10 Apr 2021 19:40:18 +0200 Subject: [PATCH 131/356] * add funding * fix dependabot automerge --- .github/FUNDING.yml | 4 ++++ .github/workflows/dependabot-automerge.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..c9033264 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: Apollon77 +patreon: Apollon77 diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index ac5313e6..310f4a0d 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -4,7 +4,7 @@ name: Auto-Merge Dependabot PRs on: - pull_request: + pull_request_target: jobs: auto-merge: From ab907b5ca220e9007e06d1762b013ff6daf4eb76 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 18 Apr 2021 23:49:27 +0200 Subject: [PATCH 132/356] * (Apollon77) Adjust automatic Cookie Refresh interval from 7 to 4 days * (Apollon77) Add other checks for websocket connection handling (Sentry IOBROKER-ALEXA2-32) --- README.md | 4 +++ alexa-remote.js | 2 +- alexa-wsmqtt.js | 5 ++-- package-lock.json | 76 +++++++++++++++++++++++------------------------ package.json | 4 +-- 5 files changed, 48 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 3a08e401..ec93a2b5 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,10 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Adjust automatic Cookie Refresh interval from 7 to 4 days +* (Apollon77) Add other checks for websocket connection handling (Sentry IOBROKER-ALEXA2-32) + ### 3.7.1 (2021-02-03) * (Apollon77) also capture tests from ASR_REPLACEMENT_TEXT and TTS_REPLACEMENT_TEXT into summary and alexaResponse diff --git a/alexa-remote.js b/alexa-remote.js index b4786e89..607d7621 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -99,7 +99,7 @@ class AlexaRemote extends EventEmitter { delete this._options.refreshCookieInterval; } if (this._options.cookieRefreshInterval !== 0) { - this._options.cookieRefreshInterval = this._options.cookieRefreshInterval || 7*24*60*60*1000; // Auto Refresh after 7 days + this._options.cookieRefreshInterval = this._options.cookieRefreshInterval || 4 * 24 * 60 * 60 * 1000; // Auto Refresh after 4 days } const self = this; diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 09c3ecca..9c58f789 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -119,11 +119,11 @@ class AlexaWsMqtt extends EventEmitter { }, 30000); this.websocket.on('open', () => { + if (! this.websocket) return; if (this.stop) { this.websocket.close(); return; } - if (! this.websocket) return; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Open: ' + url); this.connectionActive = false; @@ -131,6 +131,7 @@ class AlexaWsMqtt extends EventEmitter { const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE'); //console.log('SEND: ' + msg.toString('ascii')); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent'); + if (this.websocket.readyState !== 1 /* OPEN */) return; this.websocket.send(msg); }); @@ -147,7 +148,7 @@ class AlexaWsMqtt extends EventEmitter { }); this.websocket.on('message', (data) => { - if (!this.websocket) return; + if (!this.websocket || this.websocket.readyState !== 1 /* OPEN */) return; let message = this.parseIncomingMessage(data); if (msgCounter === 0) { // initialization if (message.content.protocolName) { diff --git a/package-lock.json b/package-lock.json index 0058f23b..01c03293 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,17 +18,17 @@ } }, "@types/http-proxy": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.4.tgz", - "integrity": "sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q==", + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.5.tgz", + "integrity": "sha512-GNkDE7bTv6Sf8JbV2GksknKOsk7OznNYHSdrtvPJXO0qJ9odZig6IZKUi5RFGi6d1bf6dgIAe4uXi3DBc7069Q==", "requires": { "@types/node": "*" } }, "@types/node": { - "version": "14.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", - "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==" + "version": "14.14.41", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz", + "integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==" }, "accepts": { "version": "1.3.7", @@ -66,16 +66,16 @@ } }, "alexa-cookie2": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.2.tgz", - "integrity": "sha512-q2CWCG2QscBzix+tIvmea+HOdhjqytvdYZ5ANehChRrqLmwQk6zBHo5dgd4N93LIkIyZN7qI03VwW9daUS5Zww==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.3.tgz", + "integrity": "sha512-tjewy2tWwmMTB5/j+pA1QqreuC+1M+nCiT38FXv/zM14RgDtZ7Tuj2zDaq5QwWpdDLiY/O780yUrz95xFB/YPw==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", - "http-proxy-middleware": "^1.0.6", + "http-proxy-middleware": "^1.2.0", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", - "querystring": "^0.2.0" + "querystring": "^0.2.1" } }, "ansi-regex": { @@ -388,14 +388,14 @@ } }, "http-proxy-middleware": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.6.tgz", - "integrity": "sha512-NyL6ZB6cVni7pl+/IT2W0ni5ME00xR0sN27AQZZrpKn1b+qRh+mLbBxIq9Cq1oGfmTc7BUq4HB77mxwCaxAYNg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.2.0.tgz", + "integrity": "sha512-vNw+AxT0+6VTM1rCJw1bpiIaUQ1Ww/vTyIEOUzdW9kNX4yuhhqV3jLSKDJo/Y/lqEIshaKCDujtvEqWiD9Dn6Q==", "requires": { - "@types/http-proxy": "^1.17.4", + "@types/http-proxy": "^1.17.5", "http-proxy": "^1.18.1", "is-glob": "^4.0.1", - "lodash": "^4.17.20", + "is-plain-obj": "^3.0.0", "micromatch": "^4.0.2" } }, @@ -455,16 +455,16 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, + "is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -490,12 +490,12 @@ "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "requires": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" } }, "mime": { @@ -504,16 +504,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", "requires": { - "mime-db": "1.44.0" + "mime-db": "1.47.0" } }, "ms": { @@ -545,9 +545,9 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==" }, "process-nextick-args": { "version": "2.0.1", @@ -773,9 +773,9 @@ } }, "ws": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", - "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz", + "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==" }, "y18n": { "version": "5.0.5", diff --git a/package.json b/package.json index 61fbe51b..45f96aec 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,10 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.4.2", + "alexa-cookie2": "^3.4.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^7.4.4", + "ws": "^7.4.5", "extend": "^3.0.2", "uuid": "^8.3.2" }, From 0887ac9fb6fc538e55fde4e30d83cb0918ccdc69 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 18 Apr 2021 23:50:18 +0200 Subject: [PATCH 133/356] chore: release v3.7.2 Adjust automatic Cookie Refresh interval from 7 to 4 days Add other checks for websocket connection handling (Sentry IOBROKER-ALEXA2-32) --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ec93a2b5..174baf74 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.7.2 (2021-04-18) * (Apollon77) Adjust automatic Cookie Refresh interval from 7 to 4 days * (Apollon77) Add other checks for websocket connection handling (Sentry IOBROKER-ALEXA2-32) diff --git a/package-lock.json b/package-lock.json index 01c03293..3f5f86ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.7.1", + "version": "3.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 45f96aec..7fc65d1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.7.1", + "version": "3.7.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 2926d350c7ab8d9b2e6b65e9cd9bb5608fa3f772 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 May 2021 02:11:26 +0000 Subject: [PATCH 134/356] Bump @alcalzone/release-script from 1.8.3 to 1.10.0 (#113) --- package-lock.json | 40 ++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f5f86ee..42ee52b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,15 +5,15 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.8.3.tgz", - "integrity": "sha512-PPzX+GG08Gwx7ygraGB8pbnWSD0KIxHiJtegLhHK9GZ+QodAl2K4VQe8/RuY0r4fhwDWCXbYbPEw10xaxXmh2w==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.10.0.tgz", + "integrity": "sha512-rgPUulHpkyzPaynSN+tRYQsBiXa6OnWxyAidHUIofkF3r4eMju/n61BsVHp2CtXPst2uYITeKMy++q/g2TthuA==", "dev": true, "requires": { - "alcalzone-shared": "^3.0.1", + "alcalzone-shared": "^3.0.3", "axios": "^0.21.1", "colors": "^1.4.0", - "semver": "^7.3.4", + "semver": "^7.3.5", "yargs": "^16.2.0" } }, @@ -40,9 +40,9 @@ } }, "alcalzone-shared": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-3.0.2.tgz", - "integrity": "sha512-kcXwSVaB19k3gbJoDqktD9nL2JyufbTThbk8LEL0xKY77TqoIWtraOrrGtRCihlqJPIyfacdFu//0X28ZfWPSg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-3.0.4.tgz", + "integrity": "sha512-QVnZWWRLVV0NGbR+AszgR3Y/BpPjGKgAyoiKuNegtYbLVTadbFbKLfYQd+4YYkB9PSaj+Qc5Z81U6UtQwzGeQA==", "dev": true, "requires": { "debug": "^4.3.1" @@ -625,9 +625,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -682,9 +682,9 @@ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -778,9 +778,9 @@ "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==" }, "y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { @@ -805,9 +805,9 @@ } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", "dev": true } } diff --git a/package.json b/package.json index 7fc65d1a..ae1fb809 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^1.8.3" + "@alcalzone/release-script": "^1.10.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From fa89e5ffe5b4c006e470a9956ac95dd23c863b90 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 9 May 2021 14:58:51 +0200 Subject: [PATCH 135/356] * adjust years in license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6fff20f7..430e09a4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) Copyright (c) 2015-2017 soef -Copyright (c) 2018-2020 Apollon77 +Copyright (c) 2018-2021 Apollon77 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From f950facaf1876cdeae3510cc3e1d1f664660ce46 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 11 May 2021 00:23:39 +0200 Subject: [PATCH 136/356] adjust badges --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 174baf74..936ea0a1 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,10 @@ # alexa-remote2 -Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN. - -Early code version. - - +[![NPM version](http://img.shields.io/npm/v/alexa-remote2.svg)](https://www.npmjs.com/package/alexa-remote2) +[![Downloads](https://img.shields.io/npm/dm/alexa-remote2.svg)](https://www.npmjs.com/package/alexa-remote2) +![Test and Release](https://github.com/Apollon77/alexa-remote/workflows/Test%20and%20Release/badge.svg) +Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN. ## Example From b162c20a5fc42e36ddc9fe2f83cc0a50b97f5f94 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 11 May 2021 09:53:27 +0200 Subject: [PATCH 137/356] * (Apollon77) Always recognize "alexa" as wakeword to handle commands via the apps correctly --- README.md | 3 +++ alexa-remote.js | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 936ea0a1..58c2b223 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Always recognize "alexa" as wakeword to handle commands via the apps correctly + ### 3.7.2 (2021-04-18) * (Apollon77) Adjust automatic Cookie Refresh interval from 7 to 4 days * (Apollon77) Add other checks for websocket connection handling (Sentry IOBROKER-ALEXA2-32) diff --git a/alexa-remote.js b/alexa-remote.js index 607d7621..7149f511 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1377,6 +1377,8 @@ class AlexaRemote extends EventEmitter { let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; if (wakeWord && o.description.summary.startsWith(wakeWord)) { o.description.summary = o.description.summary.substr(wakeWord.length).trim(); + } else if (o.description.summary.startsWith('alexa')) { + o.description.summary = o.description.summary.substr(5).trim(); } o.deviceType = res.sourceDeviceIds[i].deviceType || null; o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; @@ -1446,6 +1448,8 @@ class AlexaRemote extends EventEmitter { let text = trans.transcriptText; if (wakeWord && text.startsWith(wakeWord)) { text = text.substr(wakeWord.length).trim(); + } else if (text.startsWith('alexa')) { + text = text.substr(5).trim(); } o.description.summary += text + ', '; }); @@ -1455,6 +1459,8 @@ class AlexaRemote extends EventEmitter { let text = trans.transcriptText; if (wakeWord && text.startsWith(wakeWord)) { text = text.substr(wakeWord.length).trim(); + } else if (text.startsWith('alexa')) { + text = text.substr(5).trim(); } o.description.summary += text + ', '; }); From c306e655376e47e99142da2744a7f38bddc63c3a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 11 May 2021 09:54:08 +0200 Subject: [PATCH 138/356] chore: release v3.8.0 Always recognize "alexa" as wakeword to handle commands via the apps correctly --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 58c2b223..42801f37 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.8.0 (2021-05-11) * (Apollon77) Always recognize "alexa" as wakeword to handle commands via the apps correctly ### 3.7.2 (2021-04-18) diff --git a/package-lock.json b/package-lock.json index 42ee52b4..2c369fb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.7.2", + "version": "3.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ae1fb809..eef1a4b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.7.2", + "version": "3.8.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 78daf76cd921f23b05802ae62fd8d723411b23fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 30 May 2021 20:30:16 +0000 Subject: [PATCH 139/356] Bump ws from 7.4.5 to 7.4.6 (#116) --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c369fb7..6e6889ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -773,9 +773,9 @@ } }, "ws": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz", - "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==" + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" }, "y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index eef1a4b5..85ffef31 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "alexa-cookie2": "^3.4.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^7.4.5", + "ws": "^7.4.6", "extend": "^3.0.2", "uuid": "^8.3.2" }, From 9a9e0a4f4d4bf03f454cca4c578c4f248c126938 Mon Sep 17 00:00:00 2001 From: Bernd Bindreiter Date: Wed, 2 Jun 2021 21:08:18 +0200 Subject: [PATCH 140/356] Set missing Accept Header in requests --- alexa-remote.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/alexa-remote.js b/alexa-remote.js index 7149f511..6da43405 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -794,6 +794,7 @@ class AlexaRemote extends EventEmitter { headers: { 'User-Agent' : this._options.userAgent, 'Content-Type': 'application/json; charset=UTF-8', + 'Accept': 'application/json', 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, //'Content-Type': 'application/json', @@ -830,6 +831,7 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers['Accept-Encoding']; delete logOptions.headers['User-Agent']; delete logOptions.headers['Content-Type']; + delete logOptions.headers['Accept']; delete logOptions.headers.Referer; delete logOptions.headers.Origin; this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); From 398335face053ae22037d9b996ad0fcf39a718fd Mon Sep 17 00:00:00 2001 From: Bernd Bindreiter Date: Wed, 2 Jun 2021 21:08:39 +0200 Subject: [PATCH 141/356] Increase version to 3.8.1 --- README.md | 3 +++ package-lock.json | 2 +- package.json | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42801f37..351e0621 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Thank you for that work. ## Changelog: +### 3.8.1 (2021-06-02) +* (bbindreiter) Set missing Accept Header + ### 3.8.0 (2021-05-11) * (Apollon77) Always recognize "alexa" as wakeword to handle commands via the apps correctly diff --git a/package-lock.json b/package-lock.json index 6e6889ef..9450ddbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.0", + "version": "3.8.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 85ffef31..f39ab722 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.0", + "version": "3.8.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -14,6 +14,10 @@ { "name": "Apollon77", "email": "iobroker@fischer-ka.de" + }, + { + "name": "bbindreiter", + "email": "bernd.bindreiter@gmail.com" } ], "homepage": "https://github.com/Apollon77/alexa-remote", From 8b4803cf70a567827ac4922e8f5af8739e7a8677 Mon Sep 17 00:00:00 2001 From: Bernd Bindreiter Date: Thu, 3 Jun 2021 09:46:17 +0200 Subject: [PATCH 142/356] Revert "Increase version to 3.8.1" This reverts commit 398335fa --- package-lock.json | 2 +- package.json | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9450ddbc..6e6889ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.1", + "version": "3.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f39ab722..85ffef31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.1", + "version": "3.8.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", @@ -14,10 +14,6 @@ { "name": "Apollon77", "email": "iobroker@fischer-ka.de" - }, - { - "name": "bbindreiter", - "email": "bernd.bindreiter@gmail.com" } ], "homepage": "https://github.com/Apollon77/alexa-remote", From d0434cbc8efc43890c074b2c33c3c6b6df26c364 Mon Sep 17 00:00:00 2001 From: Bernd Bindreiter Date: Thu, 3 Jun 2021 09:48:01 +0200 Subject: [PATCH 143/356] Change Version number to ### __WORK_IN PROGRESS__ in README.md --- README.md | 2 +- package.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 351e0621..58f663cf 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Thank you for that work. ## Changelog: -### 3.8.1 (2021-06-02) +### __WORK_IN PROGRESS__ * (bbindreiter) Set missing Accept Header ### 3.8.0 (2021-05-11) diff --git a/package.json b/package.json index 85ffef31..f9c7c375 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,10 @@ { "name": "Apollon77", "email": "iobroker@fischer-ka.de" + }, + { + "name": "bbindreiter", + "email": "bernd.bindreiter@gmail.com" } ], "homepage": "https://github.com/Apollon77/alexa-remote", From b47da95b618dfc02ae73694ffdf0bfebd19f8064 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 4 Jun 2021 15:38:33 +0200 Subject: [PATCH 144/356] * prepare release, fixes #118 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58f663cf..92ca3eed 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Thank you for that work. ## Changelog: -### __WORK_IN PROGRESS__ +### __WORK IN PROGRESS__ * (bbindreiter) Set missing Accept Header ### 3.8.0 (2021-05-11) From 94bd393a98574f98cafbc3b40fac67f0053b53eb Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 4 Jun 2021 15:39:01 +0200 Subject: [PATCH 145/356] chore: release v3.8.1 Set missing Accept Header --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 92ca3eed..6d02a2d7 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.8.1 (2021-06-04) * (bbindreiter) Set missing Accept Header ### 3.8.0 (2021-05-11) diff --git a/package-lock.json b/package-lock.json index 6e6889ef..9450ddbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.0", + "version": "3.8.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f9c7c375..f39ab722 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.0", + "version": "3.8.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 2f8d3d5bfa2f60351ad1f725462448a692af377c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 02:01:08 +0000 Subject: [PATCH 146/356] Bump actions/setup-node from 2.1.5 to 2.2.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.1.5 to 2.2.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.1.5...v2.2.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 5b7dd9a5..2a986109 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2.2.0 with: node-version: ${{ matrix.node-version }} @@ -60,7 +60,7 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2.2.0 with: node-version: ${{ matrix.node-version }} From 2ede35eabc1c2e3ef9231a70ee588ef49fb6a262 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 4 Jul 2021 00:15:01 +0200 Subject: [PATCH 147/356] * remove travis/appveyot * adjust gh action --- .github/workflows/test-and-release.yml | 1 - package-lock.json | 193 ++++++++++++++++++++++--- package.json | 4 +- 3 files changed, 178 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 5b7dd9a5..eb6e29c7 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -48,7 +48,6 @@ jobs: if: | contains(github.event.head_commit.message, '[skip ci]') == false && github.event_name == 'push' && - github.event.base_ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest strategy: diff --git a/package-lock.json b/package-lock.json index 9450ddbc..a07e70eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,16 +5,18 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.10.0.tgz", - "integrity": "sha512-rgPUulHpkyzPaynSN+tRYQsBiXa6OnWxyAidHUIofkF3r4eMju/n61BsVHp2CtXPst2uYITeKMy++q/g2TthuA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.2.0.tgz", + "integrity": "sha512-fL9Gbvf9y4Kr+2KK4O1EWZlEnpV592D3nJ1cGpvOCb1fk4PyGt9eMtaxyIXLuaiJKw05mChEKKjQ8IdJfEUapw==", "dev": true, "requires": { - "alcalzone-shared": "^3.0.3", + "alcalzone-shared": "^4.0.0", "axios": "^0.21.1", "colors": "^1.4.0", + "execa": "^5.1.1", + "fs-extra": "^10.0.0", "semver": "^7.3.5", - "yargs": "^16.2.0" + "yargs": "^17.0.1" } }, "@types/http-proxy": { @@ -40,9 +42,9 @@ } }, "alcalzone-shared": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-3.0.4.tgz", - "integrity": "sha512-QVnZWWRLVV0NGbR+AszgR3Y/BpPjGKgAyoiKuNegtYbLVTadbFbKLfYQd+4YYkB9PSaj+Qc5Z81U6UtQwzGeQA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.0.tgz", + "integrity": "sha512-UJ/8eEd4sZwjmMpV4PahmDS5U05UdqWPYJxT+a8xNOTqnNn4vgbuyFMNX1kSx2KKiwX3yJi5QkISS3kY7pXWfQ==", "dev": true, "requires": { "debug": "^4.3.1" @@ -218,6 +220,17 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -273,6 +286,23 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, "express": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", @@ -359,12 +389,35 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", @@ -413,6 +466,12 @@ "resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz", "integrity": "sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q=" }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -460,11 +519,33 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==" }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -484,6 +565,12 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -516,6 +603,12 @@ "mime-db": "1.47.0" } }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -526,6 +619,15 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -534,11 +636,26 @@ "ee-first": "1.1.1" } }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -676,6 +793,27 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -709,6 +847,12 @@ "ansi-regex": "^5.0.0" } }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -736,6 +880,12 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -761,6 +911,15 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -773,9 +932,9 @@ } }, "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz", + "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==" }, "y18n": { "version": "5.0.8", @@ -790,9 +949,9 @@ "dev": true }, "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz", + "integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -805,9 +964,9 @@ } }, "yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true } } diff --git a/package.json b/package.json index f39ab722..67c29429 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,12 @@ "alexa-cookie2": "^3.4.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^7.4.6", + "ws": "^7.5.1", "extend": "^3.0.2", "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^1.10.0" + "@alcalzone/release-script": "^2.2.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 27e6b68d643e4c90b295908a83769644670a659c Mon Sep 17 00:00:00 2001 From: Guilherme Lirio Tomasi de Oliveira Date: Sun, 25 Jul 2021 12:17:24 -0300 Subject: [PATCH 148/356] Add skill launch function --- alexa-remote.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/alexa-remote.js b/alexa-remote.js index 6da43405..7bebbb57 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1803,6 +1803,25 @@ class AlexaRemote extends EventEmitter { } seqNode.operationPayload.textToSpeak = value; break; + case 'skill': + seqNode.type = 'Alexa.Operation.SkillConnections.Launch'; + if (typeof value !== 'string') value = String(value); + if (value.length === 0) { + return callback && callback(new Error('Can not launch empty skill', null)); + } + seqNode.skillId = value; + seqNode.operationPayload.targetDevice = { + deviceType: seqNode.operationPayload.deviceType, + deviceSerialNumber: seqNode.operationPayload.deviceSerialNumber + } + seqNode.operationPayload.connectionRequest = { + uri: `connection://AMAZON.Launch/${value}`, + input: {} + } + seqNode.name = null; + delete seqNode.operationPayload.deviceType; + delete seqNode.operationPayload.deviceSerialNumber; + break; case 'notification': seqNode.type = 'Alexa.Notifications.SendMobilePush'; if (typeof value !== 'string') value = String(value); From b694373fd84e2a9d042bd5ae870831c6a6109926 Mon Sep 17 00:00:00 2001 From: Guilherme Lirio Tomasi de Oliveira Date: Mon, 26 Jul 2021 13:41:47 -0300 Subject: [PATCH 149/356] Add getSkills() function --- alexa-remote.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/alexa-remote.js b/alexa-remote.js index 7bebbb57..c60386a2 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1080,6 +1080,34 @@ class AlexaRemote extends EventEmitter { if (cached === undefined) cached = true; this.httpsGet (`/api/notifications?cached=${cached}&_=%t`, callback); } + + getSkills(callback) { + + // request options + let request = { + 'method': 'GET', + 'headers': { + 'Accept': 'application/vnd+amazon.uitoolkit+json;ns=1;fl=0' + } + }; + + // send request + this.httpsGet(`https://skills-store.${this._options.amazonPage}/app/secure/your-skills-page?deviceType=app&ref-suffix=ysa_gw&pfm=A1PA6795UKMFR9&cor=DE&lang=en-us&_=%t`, function (err, res) { + const data = res.find(o => o.block === 'data' && Array.isArray(o.contents)) + .contents + .find(o => o.id === 'skillsPageData') + .contents + .products + .map(o => ({ + id: o.productMetadata.skillId, + name: o.title, + type: o.productDetails.skillTypes[0] + })); + + callback && callback(err, data); + + }, request); + } createNotificationObject(serialOrName, type, label, value, status, sound) { // type = Reminder, Alarm if (status && typeof status === 'object') { From b47a80dd180d16282bb76ac94c83202b395f4a23 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 30 Jul 2021 11:45:52 +0200 Subject: [PATCH 150/356] * update deps * add authority header * prepare version --- README.md | 4 ++++ alexa-remote.js | 5 +++++ package-lock.json | 24 ++++++++++++------------ package.json | 4 ++-- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 6d02a2d7..8766b661 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* (guilhermelirio) Add skill launch function +* (guilhermelirio) Add getSkills() function + ### 3.8.1 (2021-06-04) * (bbindreiter) Set missing Accept Header diff --git a/alexa-remote.js b/alexa-remote.js index c60386a2..ea95347a 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1530,6 +1530,11 @@ class AlexaRemote extends EventEmitter { } } if (typeof callback === 'function') return callback (err, ret); + }, + { + headers: { + 'authority': 'www.amazon.de' + } } ); } diff --git a/package-lock.json b/package-lock.json index a07e70eb..3d8d0aac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.2.0.tgz", - "integrity": "sha512-fL9Gbvf9y4Kr+2KK4O1EWZlEnpV592D3nJ1cGpvOCb1fk4PyGt9eMtaxyIXLuaiJKw05mChEKKjQ8IdJfEUapw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.2.1.tgz", + "integrity": "sha512-kW0kRV154peNiPAY9ZjcaHtVjp/OKOyp6gVga9GSXIHjIxGcygHJ1CWVCb2HfvHzOxfbHPVIKemNOc568wU9xQ==", "dev": true, "requires": { "alcalzone-shared": "^4.0.0", @@ -51,9 +51,9 @@ }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -520,9 +520,9 @@ "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==" }, "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "isarray": { @@ -932,9 +932,9 @@ } }, "ws": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz", - "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==" + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==" }, "y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index 67c29429..cfe41cb3 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,12 @@ "alexa-cookie2": "^3.4.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^7.5.1", + "ws": "^7.5.3", "extend": "^3.0.2", "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^2.2.0" + "@alcalzone/release-script": "^2.2.1" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 20502e224ef8e4f7a78fcef96ca1df0a14886bb5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 30 Jul 2021 11:46:44 +0200 Subject: [PATCH 151/356] chore: release v3.9.0 Add skill launch function Add getSkills() function --- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8766b661..d155fae9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Thank you for that work. ## Changelog: -### __WORK IN PROGRESS__ +### 3.9.0 (2021-07-30) * (guilhermelirio) Add skill launch function * (guilhermelirio) Add getSkills() function diff --git a/package-lock.json b/package-lock.json index 3d8d0aac..79328852 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.1", + "version": "3.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cfe41cb3..59f67997 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.8.1", + "version": "3.9.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From e7797e6017a7ae6d04c8c0cf51a0cceaef407348 Mon Sep 17 00:00:00 2001 From: Rodolfo Silva Date: Wed, 29 Sep 2021 20:16:22 -0300 Subject: [PATCH 152/356] add typescript types definition --- alexa-remote.d.ts | 513 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 514 insertions(+) create mode 100644 alexa-remote.d.ts diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts new file mode 100644 index 00000000..f3a5dbd1 --- /dev/null +++ b/alexa-remote.d.ts @@ -0,0 +1,513 @@ +declare module "alexa-remote2" { + export type InitOptions = + | string + | Partial<{ + cookie: string; + email: string; + password: string; + proxyOnly: boolean; + proxyOwnIp: string; + proxyPort: number; + proxyLogLevel: string; + bluetooth: boolean; + logger: (...args: any[]) => void; + alexaServiceHost: string; + userAgent: string; + acceptLanguage: string; + amazonPage: string; + useWsMqtt: boolean; + cookieRefreshInterval: number; + }>; + + export type AppDevice = { + deviceAccountId: string; + deviceType: string; + serialNumber: string; + }; + + export type Serial = { + accountName: string; + appDeviceList: AppDevice[]; + capabilities: string[]; + charging: string; + deviceAccountId: string; + deviceFamily: string; + deviceOwnerCustomerId: string; + deviceType: string; + deviceTypeFriendlyName: string; + essid: string; + language: string; + macAddress: string; + online: boolean; + postalCode: string; + registrationId: string; + remainingBatteryLevel: string; + serialNumber: string; + softwareVersion: string; + isControllable: boolean; + hasMusicPlayer: boolean; + isMultiroomDevice: boolean; + isMultiroomMember: boolean; + wakeWord: string; + }; + + export type CallbackWithError = (err?: Error) => void; + + export type CallbackWithErrorAndBody = (err?: Error, body?: T) => void; + + export type SerialOrName = Serial | string; + + export type Value = string | number | boolean; + + export type Sound = { + displayName: string; + folder: string; + id: string; + providerId: string; + sampleUrl: string; + }; + + export type Status = "ON" | "OFF"; + + export type Notification = { + alarmTime: number; + createdDate: number; + deferredAtTime: number | null; + deviceSerialNumber: string; + deviceType: string; + geoLocationTriggerData: string | null; + id: string; + musicAlarmId: string | null; + musicEntity: string | null; + notificationIndex: string; + originalDate: string; + originalTime: string; + provider: strign | null; + recurringPattern: string | null; + remainingTime: number; + reminderLabel: string | null; + sound: Sound; + status: Status; + timeZoneId: string | null; + timerLabel: string | null; + triggerTime: number; + type: string; + version: string; + }; + + type GetContactsOptions = Partial<{ + includePreferencesByLevel: string; + includeNonAlexaContacts: boolean; + includeHomeGroupMembers: boolean; + bulkImportOnly: boolean; + includeBlockStatus: boolean; + dedupeMode: string; + homeGroupId: string; + }>; + + export type ListItemOptions = Partial<{ + startTime: string; + endTime: string; + completed: string; + listIds: string; + }>; + + export type GetCustomerHistoryRecordsOptions = { + startTime: number; + endTime: number; + recordType: string; + maxRecordSize: number; + }; + + export type GetConversationsOptions = Partial<{ + latest: boolean; + includeHomegroup: boolean; + unread: boolean; + modifiedSinceDate: string; + includeUserName: boolean; + }>; + + export type MessageCommands = + | "play" + | "pause" + | "next" + | "previous" + | "forward" + | "rewind" + | "volume" + | "shuffle" + | "repeat"; + + export type SequenceNodeCommand = + | "weather" + | "traffic" + | "flashbriefing" + | "goodmorning" + | "funfact" + | "joke" + | "cleanup" + | "singasong" + | "tellstory" + | "calendarToday" + | "calendarTomorrow" + | "calendarNext" + | "textCommand" + | "curatedtts" + | "volume" + | "deviceStop" + | "speak" + | "skill" + | "notification" + | "announcement" + | "ssml"; + + export type SequneceType = "SerialNode" | "ParallelNode"; + + export type EntityType = "APPLIANCE" | "GROUP"; + + export type MultiSequenceCommand = { + command: SequenceNodeCommand; + value: Value; + device?: SerialOrName; + }; + + export default class AlexaRemote extends EventEmitter { + serialNumbers: Record; + cookie?: string; + csrf?: string; + cookieData?: string; + baseUrl: string; + friendlyNames: Record; + names: Record; + lastAuthCheck: number | null; + + setCookie(_cookie: string): void; + + init(cookie: string | InitOptions, callback: CallbackWithError); + + prepare(callback: CallbackWithError): void; + + initNotifications(callback: CallbackWithError): void; + + initWakewords(callback: CallbackWithError): void; + + initDeviceState(callback: CallbackWithError): void; + + initBluetoothState(callback: CallbackWithError): void; + + initWsMqttConnection(): void; + + getPushedActivities(): void; + + stop(): void; + + generateCookie( + email: string, + password: string, + callback: CallbackWithError + ): void; + + refreshCookie(callback: CallbackWithError): void; + + httpsGet( + noCheck: boolean, + path: string, + callback: CallbackWithError, + flags: Record = {} + ): void; + + httpsGetCall( + path: string, + callback, + callback: CallbackWithErrorAndBody, + flags: Record = {} + ): void; + + /// Public + checkAuthentication(callback: CallbackWithErrorAndBody): void; + + getDevices(callback: CallbackWithErrorAndBody): void; + + getCards( + limit: number, + beforeCreationTime: string, + callback: CallbackWithErrorAndBody + ): void; + + getMedia( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + getPlayerInfo( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + getLists(callback: CallbackWithErrorAndBody): void; + + getList(listId: string, callback: CallbackWithErrorAndBody): void; + + getListItems( + listId: string, + options: ListItemOptions, + callback: CallbackWithErrorAndBody + ): void; + + addListItem( + listId: string, + options: ListItemOptions, + callback: CallbackWithErrorAndBody + ): void; + + updateListItem( + listId: string, + listItem: string, + options: ListItemOptions, + callback: CallbackWithErrorAndBody + ): void; + + deleteListItem( + listId: string, + listItem: string, + callback: CallbackWithErrorAndBody + ): void; + + getWakeWords(callback: CallbackWithErrorAndBody): void; + + getReminders(cached: boolean, callback: CallbackWithErrorAndBody): void; + + getNotifications(cached: boolean, callback: CallbackWithErrorAndBody): void; + + getSkills(callback: CallbackWithErrorAndBody): void; + + createNotificationObject( + serialOrName: SerialOrName, + type: string, + label: string, + value: Value, + status: Status, + sound: string + ): Notification; + + parseValue4Notification( + notification: Notification, + value: Value + ): Notification; + + createNotification( + notification: Notification, + callback: CallbackWithErrorAndBody + ): void; + + changeNotification( + notification: Notification, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + deleteNotification( + notification: Notification, + callback: CallbackWithErrorAndBody + ): void; + + getDoNotDisturb(callback: CallbackWithErrorAndBody): void; + + getDeviceStatusList(callback: CallbackWithErrorAndBody): void; + + // alarm volume + getDeviceNotificationState( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + getBluetooth(cached: boolean, callback: CallbackWithErrorAndBody): void; + + tuneinSearchRaw(query: string, callback: CallbackWithErrorAndBody): void; + + tuneinSearch(query: string, callback: CallbackWithErrorAndBody): void; + + setTunein( + serialOrName: SerialOrName, + guideId: string, + contentType: string, + callback: CallbackWithErrorAndBody + ): void; + + getCustomerHistoryRecords( + options: GetCustomerHistoryRecordsOptions, + callback: CallbackWithErrorAndBody + ): void; + + getAccount(callback: CallbackWithErrorAndBody): void; + + getContacts( + options: GetContactsOptions, + callback: CallbackWithErrorAndBody + ): void; + + getConversations( + options: GetConversationsOptions, + callback: CallbackWithErrorAndBody + ): void; + + connectBluetooth( + serialOrName: SerialOrName, + btAddress: string, + callback: CallbackWithErrorAndBody + ): void; + + disconnectBluetooth( + serialOrName: SerialOrName, + btAddress: string, + callback: CallbackWithErrorAndBody + ): void; + + setDoNotDisturb( + serialOrName: SerialOrName, + enabled: boolean, + callback: CallbackWithErrorAndBody + ): void; + + find(serialOrName: SerialOrName): SerialOrName | null; + + setAlarmVolume( + serialOrName: SerialOrName, + volume: number, + callback: CallbackWithErrorAndBody + ): void; + + sendCommand( + serialOrName: SerialOrName, + command: MessageCommands, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + sendMessage( + serialOrName: SerialOrName, + command: MessageCommands, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + createSequenceNode( + command: SequenceNodeCommand, + value: Value, + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + sendMultiSequenceCommand( + serialOrName: SerialOrName, + commands: MultiSequenceCommand[], + sequenceType?: SequneceType | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody + ): void; + + sendSequenceCommand( + serialOrName: SerialOrName, + command: SequenceNodeCommand, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + getAutomationRoutines( + limit: number, + callback: CallbackWithErrorAndBody + ): void; + + executeAutomationRoutine( + serialOrName: SerialOrName, + routine: string, + callback: CallbackWithErrorAndBody + ): void; + + getMusicProviders(callback: CallbackWithErrorAndBody): void; + + playMusicProvider( + serialOrName: SerialOrName, + providerId: string, + searchPhrase: string, + callback: CallbackWithErrorAndBody + ): void; + + sendTextMessage( + conversationId: string, + text: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteConversation( + conversationId: string, + callback: CallbackWithErrorAndBody + ): void; + + setReminder( + serialOrName: SerialOrName, + timestamp: number, + label: string, + callback: CallbackWithErrorAndBody + ): void; + + getHomeGroup(callback: CallbackWithErrorAndBody): void; + + getDevicePreferences(callback: CallbackWithErrorAndBody): void; + + getAllDeviceVolumes(callback: CallbackWithErrorAndBody): void; + + getSmarthomeDevices(callback: CallbackWithErrorAndBody): void; + + getSmarthomeGroups(callback: CallbackWithErrorAndBody): void; + + getSmarthomeEntities(callback: CallbackWithErrorAndBody): void; + + getSmarthomeBehaviourActionDefinitions( + callback: CallbackWithErrorAndBody + ): void; + + renameDevice( + serialOrName: SerialOrName, + newName: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteSmarthomeDevice( + smarthomeDevice: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteSmarthomeGroup( + smarthomeGroup: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteAllSmarthomeDevices(callback: CallbackWithErrorAndBody): void; + + discoverSmarthomeDevice(callback: CallbackWithErrorAndBody): void; + + querySmarthomeDevices( + applicanceIds: string[], + entityType: EntityType, + callback: CallbackWithErrorAndBody + ): void; + + executeSmarthomeDeviceAction( + entityIds: string[], + parameters: string[], + entityType: EntityType, + callback: CallbackWithErrorAndBody + ): void; + + unpaireBluetooth( + serialOrName: SerialOrName, + btAddress: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteDevice( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + } +} diff --git a/package.json b/package.json index 59f67997..556f5bad 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "engines": { "node": ">=8.0.0" }, + "types": "alexa-remote.d.ts", "main": "alexa-remote.js", "readmeFilename": "readme.md" } From 6e714b5b639fd582c788a16d3304da36e7194e79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 02:01:20 +0000 Subject: [PATCH 153/356] Bump actions/setup-node from 2.2.0 to 2.4.1 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.2.0 to 2.4.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.2.0...v2.4.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index a89ce58e..9976640e 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.2.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node-version }} @@ -59,7 +59,7 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.2.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node-version }} From cf994adff82866dc1bf88a1ea44f5ba8434f6673 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 02:01:25 +0000 Subject: [PATCH 154/356] Bump @alcalzone/release-script from 2.2.1 to 3.4.0 Bumps [@alcalzone/release-script](https://github.com/AlCalzone/release-script) from 2.2.1 to 3.4.0. - [Release notes](https://github.com/AlCalzone/release-script/releases) - [Changelog](https://github.com/AlCalzone/release-script/blob/master/CHANGELOG.md) - [Commits](https://github.com/AlCalzone/release-script/compare/v2.2.1...v3.4.0) --- updated-dependencies: - dependency-name: "@alcalzone/release-script" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 222 +++++++++++++++++++++++++++++++++++++++------- package.json | 2 +- 2 files changed, 193 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 79328852..ceee7516 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,19 +4,114 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@alcalzone/pak": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.7.0.tgz", + "integrity": "sha512-k5cKJ9/19djy6m2klchQp9JyXUQclGyarI5qz+QFeEvHhbN4ewQ41Ty8ToCx0WRN1SJBa9gLzoXMWb1/UH2HHA==", + "dev": true, + "requires": { + "axios": "^0.21.1", + "execa": "^5.0.0", + "fs-extra": "^9.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + } + } + }, "@alcalzone/release-script": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.2.1.tgz", - "integrity": "sha512-kW0kRV154peNiPAY9ZjcaHtVjp/OKOyp6gVga9GSXIHjIxGcygHJ1CWVCb2HfvHzOxfbHPVIKemNOc568wU9xQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.4.0.tgz", + "integrity": "sha512-FaqGQUNQ1H1Wg0e6fG0SbVScfhJEutiVFV32cFzC0gESUag03+zWNEEKGAUTs+krUVJ/n3dw4R+p6/6fFVswtw==", "dev": true, "requires": { + "@alcalzone/release-script-core": "3.3.0", + "@alcalzone/release-script-plugin-changelog": "3.4.0", + "@alcalzone/release-script-plugin-exec": "3.3.0", + "@alcalzone/release-script-plugin-git": "3.3.0", + "@alcalzone/release-script-plugin-package": "3.3.0", + "@alcalzone/release-script-plugin-version": "3.3.0", "alcalzone-shared": "^4.0.0", - "axios": "^0.21.1", + "axios": "^0.21.4", "colors": "^1.4.0", - "execa": "^5.1.1", + "enquirer": "^2.3.6", "fs-extra": "^10.0.0", "semver": "^7.3.5", - "yargs": "^17.0.1" + "source-map-support": "^0.5.20", + "yargs": "^17.1.1" + } + }, + "@alcalzone/release-script-core": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.3.0.tgz", + "integrity": "sha512-Jq3MGBPYJTMxU+NLH7kuIndSN9pHCKMc7i7rL8ry2JS3SdVW7pATHMhmClsjMCvtQuBm4scsLiYac0UFW+AOmA==", + "dev": true, + "requires": { + "execa": "^5.1.1" + } + }, + "@alcalzone/release-script-plugin-changelog": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.4.0.tgz", + "integrity": "sha512-Sgs2MXQT0KDzkTV7K/QYKuOhjizB/WIYZP0jZE6I+aoO8LZea2y0L9LhNua6lt5yYxK2zGWR6T15yN4u7iXODQ==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.3.0", + "alcalzone-shared": "^4.0.0" + } + }, + "@alcalzone/release-script-plugin-exec": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.3.0.tgz", + "integrity": "sha512-eIAg3+RA9Qp0K8csjPwmgzECCwoKTyYvuz4n6OJ5rkKn832MugmO41O708JgMBVwBLF06BlEAJSEBXkVBLllrg==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.3.0", + "alcalzone-shared": "^4.0.0" + } + }, + "@alcalzone/release-script-plugin-git": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.3.0.tgz", + "integrity": "sha512-dQMVaSCnw1nYMdOP14iGgYqswiAFyodBFP/02YkYjYFSJmo10Cnz716R8tlgnbisCnSvxrDsTOdr2L3eOq34kQ==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.3.0", + "fs-extra": "^10.0.0" + } + }, + "@alcalzone/release-script-plugin-package": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.3.0.tgz", + "integrity": "sha512-d3ZmGs3KCb5X0QEq5nDBCqbqbTTO10TCqSRSi5uTSPBXAaOIs0uGnlarmcUH1Y/QLiR2vS5Jk9M1kENzcm/sHw==", + "dev": true, + "requires": { + "@alcalzone/pak": "^0.7.0", + "@alcalzone/release-script-core": "3.3.0", + "alcalzone-shared": "^4.0.0", + "semver": "^7.3.5" + } + }, + "@alcalzone/release-script-plugin-version": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.3.0.tgz", + "integrity": "sha512-f/a/PBLggGBq6rDTGDCrYHcfaC3A2rxS45wRAVLcRHR07rEIWDu2gQdY0Lv+wAEI1vx913WSpSFjUj9G9XHNiA==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.3.0", + "alcalzone-shared": "^4.0.0", + "semver": "^7.3.5", + "tiny-glob": "^0.2.9" } }, "@types/http-proxy": { @@ -80,10 +175,16 @@ "querystring": "^0.2.1" } }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -100,13 +201,27 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dev": true, "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" + }, + "dependencies": { + "follow-redirects": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==", + "dev": true + } } }, "body-parser": { @@ -265,6 +380,15 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -412,10 +536,22 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, + "globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true + }, + "globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, "http-errors": { @@ -809,25 +945,41 @@ "dev": true }, "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", + "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", "dev": true }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1" } }, "string_decoder": { @@ -839,12 +991,12 @@ } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "strip-final-newline": { @@ -853,6 +1005,16 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dev": true, + "requires": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -949,9 +1111,9 @@ "dev": true }, "yargs": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz", - "integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==", + "version": "17.2.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz", + "integrity": "sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==", "dev": true, "requires": { "cliui": "^7.0.2", diff --git a/package.json b/package.json index 59f67997..31f12a4c 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^2.2.1" + "@alcalzone/release-script": "^3.4.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From d2c52c927efe80ca8e67c5428ff6d28ac7dff983 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 02:01:31 +0000 Subject: [PATCH 155/356] Bump ws from 7.5.3 to 8.2.2 Bumps [ws](https://github.com/websockets/ws) from 7.5.3 to 8.2.2. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.5.3...8.2.2) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 79328852..9c292ea7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -932,9 +932,9 @@ } }, "ws": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==" + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.2.tgz", + "integrity": "sha512-Q6B6H2oc8QY3llc3cB8kVmQ6pnJWVQbP7Q5algTcIxx7YEpc0oU4NBVHlztA7Ekzfhw2r0rPducMUiCGWKQRzw==" }, "y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index 59f67997..aa406ccd 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "alexa-cookie2": "^3.4.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^7.5.3", + "ws": "^8.2.2", "extend": "^3.0.2", "uuid": "^8.3.2" }, From 0f7b8d51cacf7f18f5558cd0d53af400eb059647 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Oct 2021 18:57:46 +0000 Subject: [PATCH 156/356] chore(deps): bump axios from 0.21.1 to 0.21.4 Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.4) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c292ea7..79d16979 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,12 +101,20 @@ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dev": true, "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" + }, + "dependencies": { + "follow-redirects": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==", + "dev": true + } } }, "body-parser": { From 9c2acceab24d3678e851a97ffdee9582a8508f44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Oct 2021 18:58:49 +0000 Subject: [PATCH 157/356] chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 (#138) From 9da44a3c2e7b2d6890933ad1a41cc3df9335d2b4 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 21:28:48 +0200 Subject: [PATCH 158/356] * IMPORTANT: Node.js 10 support is dropped, supports LTS versions of Node.js starting with 12.x * (Apollon77) Change Push connection to new signed flow --- README.md | 5 + alexa-remote.d.ts | 997 +++++++++++++++++++++++---------------------- alexa-remote.js | 26 +- alexa-wsmqtt.js | 398 +++++++++++++++--- example/example.js | 9 +- package-lock.json | 83 ++-- package.json | 6 +- 7 files changed, 929 insertions(+), 595 deletions(-) diff --git a/README.md b/README.md index d155fae9..a1825b8a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,11 @@ Thank you for that work. ## Changelog: +### __WORK IN PROGRESS__ +* IMPORTANT: Node.js 10 support is dropped, supports LTS versions of Node.js starting with 12.x +* (Apollon77) Change Push connection to new signed flow +* (RodolfoSilva) Add TypeScript Type definitions + ### 3.9.0 (2021-07-30) * (guilhermelirio) Add skill launch function * (guilhermelirio) Add getSkills() function diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index f3a5dbd1..4bc26f31 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -1,7 +1,7 @@ declare module "alexa-remote2" { - export type InitOptions = - | string - | Partial<{ + export type InitOptions = + | string + | Partial<{ cookie: string; email: string; password: string; @@ -17,497 +17,516 @@ declare module "alexa-remote2" { amazonPage: string; useWsMqtt: boolean; cookieRefreshInterval: number; - }>; - - export type AppDevice = { - deviceAccountId: string; - deviceType: string; - serialNumber: string; - }; - - export type Serial = { - accountName: string; - appDeviceList: AppDevice[]; - capabilities: string[]; - charging: string; - deviceAccountId: string; - deviceFamily: string; - deviceOwnerCustomerId: string; - deviceType: string; - deviceTypeFriendlyName: string; - essid: string; - language: string; - macAddress: string; - online: boolean; - postalCode: string; - registrationId: string; - remainingBatteryLevel: string; - serialNumber: string; - softwareVersion: string; - isControllable: boolean; - hasMusicPlayer: boolean; - isMultiroomDevice: boolean; - isMultiroomMember: boolean; - wakeWord: string; - }; - - export type CallbackWithError = (err?: Error) => void; - - export type CallbackWithErrorAndBody = (err?: Error, body?: T) => void; - - export type SerialOrName = Serial | string; - - export type Value = string | number | boolean; - - export type Sound = { - displayName: string; - folder: string; - id: string; - providerId: string; - sampleUrl: string; - }; - - export type Status = "ON" | "OFF"; - - export type Notification = { - alarmTime: number; - createdDate: number; - deferredAtTime: number | null; - deviceSerialNumber: string; - deviceType: string; - geoLocationTriggerData: string | null; - id: string; - musicAlarmId: string | null; - musicEntity: string | null; - notificationIndex: string; - originalDate: string; - originalTime: string; - provider: strign | null; - recurringPattern: string | null; - remainingTime: number; - reminderLabel: string | null; - sound: Sound; - status: Status; - timeZoneId: string | null; - timerLabel: string | null; - triggerTime: number; - type: string; - version: string; - }; - - type GetContactsOptions = Partial<{ - includePreferencesByLevel: string; - includeNonAlexaContacts: boolean; - includeHomeGroupMembers: boolean; - bulkImportOnly: boolean; - includeBlockStatus: boolean; - dedupeMode: string; - homeGroupId: string; - }>; - - export type ListItemOptions = Partial<{ - startTime: string; - endTime: string; - completed: string; - listIds: string; - }>; - - export type GetCustomerHistoryRecordsOptions = { - startTime: number; - endTime: number; - recordType: string; - maxRecordSize: number; - }; - - export type GetConversationsOptions = Partial<{ - latest: boolean; - includeHomegroup: boolean; - unread: boolean; - modifiedSinceDate: string; - includeUserName: boolean; - }>; - - export type MessageCommands = - | "play" - | "pause" - | "next" - | "previous" - | "forward" - | "rewind" - | "volume" - | "shuffle" - | "repeat"; - - export type SequenceNodeCommand = - | "weather" - | "traffic" - | "flashbriefing" - | "goodmorning" - | "funfact" - | "joke" - | "cleanup" - | "singasong" - | "tellstory" - | "calendarToday" - | "calendarTomorrow" - | "calendarNext" - | "textCommand" - | "curatedtts" - | "volume" - | "deviceStop" - | "speak" - | "skill" - | "notification" - | "announcement" - | "ssml"; - - export type SequneceType = "SerialNode" | "ParallelNode"; - - export type EntityType = "APPLIANCE" | "GROUP"; - - export type MultiSequenceCommand = { - command: SequenceNodeCommand; - value: Value; - device?: SerialOrName; - }; - - export default class AlexaRemote extends EventEmitter { - serialNumbers: Record; - cookie?: string; - csrf?: string; - cookieData?: string; - baseUrl: string; - friendlyNames: Record; - names: Record; - lastAuthCheck: number | null; - - setCookie(_cookie: string): void; - - init(cookie: string | InitOptions, callback: CallbackWithError); - - prepare(callback: CallbackWithError): void; - - initNotifications(callback: CallbackWithError): void; - - initWakewords(callback: CallbackWithError): void; - - initDeviceState(callback: CallbackWithError): void; - - initBluetoothState(callback: CallbackWithError): void; - - initWsMqttConnection(): void; - - getPushedActivities(): void; - - stop(): void; - - generateCookie( - email: string, - password: string, - callback: CallbackWithError - ): void; - - refreshCookie(callback: CallbackWithError): void; - - httpsGet( - noCheck: boolean, - path: string, - callback: CallbackWithError, - flags: Record = {} - ): void; - - httpsGetCall( - path: string, - callback, - callback: CallbackWithErrorAndBody, - flags: Record = {} - ): void; - - /// Public - checkAuthentication(callback: CallbackWithErrorAndBody): void; - - getDevices(callback: CallbackWithErrorAndBody): void; - - getCards( - limit: number, - beforeCreationTime: string, - callback: CallbackWithErrorAndBody - ): void; - - getMedia( - serialOrName: SerialOrName, - callback: CallbackWithErrorAndBody - ): void; - - getPlayerInfo( - serialOrName: SerialOrName, - callback: CallbackWithErrorAndBody - ): void; - - getLists(callback: CallbackWithErrorAndBody): void; - - getList(listId: string, callback: CallbackWithErrorAndBody): void; - - getListItems( - listId: string, - options: ListItemOptions, - callback: CallbackWithErrorAndBody - ): void; + macDms: { + device_private_key: string; + adp_token: string; + }; + formerRegistrationData: { + macDms: { + device_private_key: string; + adp_token: string; + }; + localCookie: string; + frc: string; + "map-md": string; + "deviceId": string; + "deviceSerial": string; + "refreshToken": string; + "tokenDate": number; + "amazonPage": string; + "csrf": string; + } + }>; + + export type AppDevice = { + deviceAccountId: string; + deviceType: string; + serialNumber: string; + }; + + export type Serial = { + accountName: string; + appDeviceList: AppDevice[]; + capabilities: string[]; + charging: string; + deviceAccountId: string; + deviceFamily: string; + deviceOwnerCustomerId: string; + deviceType: string; + deviceTypeFriendlyName: string; + essid: string; + language: string; + macAddress: string; + online: boolean; + postalCode: string; + registrationId: string; + remainingBatteryLevel: string; + serialNumber: string; + softwareVersion: string; + isControllable: boolean; + hasMusicPlayer: boolean; + isMultiroomDevice: boolean; + isMultiroomMember: boolean; + wakeWord: string; + }; + + export type CallbackWithError = (err?: Error) => void; + + export type CallbackWithErrorAndBody = (err?: Error, body?: T) => void; + + export type SerialOrName = Serial | string; + + export type Value = string | number | boolean; + + export type Sound = { + displayName: string; + folder: string; + id: string; + providerId: string; + sampleUrl: string; + }; + + export type Status = "ON" | "OFF"; + + export type Notification = { + alarmTime: number; + createdDate: number; + deferredAtTime: number | null; + deviceSerialNumber: string; + deviceType: string; + geoLocationTriggerData: string | null; + id: string; + musicAlarmId: string | null; + musicEntity: string | null; + notificationIndex: string; + originalDate: string; + originalTime: string; + provider: string | null; + recurringPattern: string | null; + remainingTime: number; + reminderLabel: string | null; + sound: Sound; + status: Status; + timeZoneId: string | null; + timerLabel: string | null; + triggerTime: number; + type: string; + version: string; + }; + + type GetContactsOptions = Partial<{ + includePreferencesByLevel: string; + includeNonAlexaContacts: boolean; + includeHomeGroupMembers: boolean; + bulkImportOnly: boolean; + includeBlockStatus: boolean; + dedupeMode: string; + homeGroupId: string; + }>; + + export type ListItemOptions = Partial<{ + startTime: string; + endTime: string; + completed: string; + listIds: string; + }>; + + export type GetCustomerHistoryRecordsOptions = { + startTime: number; + endTime: number; + recordType: string; + maxRecordSize: number; + }; + + export type GetConversationsOptions = Partial<{ + latest: boolean; + includeHomegroup: boolean; + unread: boolean; + modifiedSinceDate: string; + includeUserName: boolean; + }>; + + export type MessageCommands = + | "play" + | "pause" + | "next" + | "previous" + | "forward" + | "rewind" + | "volume" + | "shuffle" + | "repeat"; + + export type SequenceNodeCommand = + | "weather" + | "traffic" + | "flashbriefing" + | "goodmorning" + | "funfact" + | "joke" + | "cleanup" + | "singasong" + | "tellstory" + | "calendarToday" + | "calendarTomorrow" + | "calendarNext" + | "textCommand" + | "curatedtts" + | "volume" + | "deviceStop" + | "speak" + | "skill" + | "notification" + | "announcement" + | "ssml"; + + export type SequneceType = "SerialNode" | "ParallelNode"; + + export type EntityType = "APPLIANCE" | "GROUP"; + + export type MultiSequenceCommand = { + command: SequenceNodeCommand; + value: Value; + device?: SerialOrName; + }; + + import {EventEmitter} from 'events'; + export default class AlexaRemote extends EventEmitter { + serialNumbers: Record; + cookie?: string; + csrf?: string; + cookieData?: string; + baseUrl: string; + friendlyNames: Record; + names: Record; + lastAuthCheck: number | null; + + setCookie(_cookie: string): void; + + init(cookie: string | InitOptions, callback: CallbackWithError); + + prepare(callback: CallbackWithError): void; + + initNotifications(callback: CallbackWithError): void; + + initWakewords(callback: CallbackWithError): void; + + initDeviceState(callback: CallbackWithError): void; + + initBluetoothState(callback: CallbackWithError): void; + + initWsMqttConnection(): void; + + getPushedActivities(): void; + + stop(): void; + + generateCookie( + email: string, + password: string, + callback: CallbackWithError + ): void; + + refreshCookie(callback: CallbackWithError): void; + + httpsGet( + noCheck: boolean, + path: string, + callback: CallbackWithError, + flags?: Record + ): void; + + httpsGetCall( + path: string, + callback: CallbackWithErrorAndBody, + flags?: Record + ): void; + + /// Public + checkAuthentication(callback: CallbackWithErrorAndBody): void; + + getDevices(callback: CallbackWithErrorAndBody): void; + + getCards( + limit: number, + beforeCreationTime: string, + callback: CallbackWithErrorAndBody + ): void; + + getMedia( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + getPlayerInfo( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + getLists(callback: CallbackWithErrorAndBody): void; + + getList(listId: string, callback: CallbackWithErrorAndBody): void; + + getListItems( + listId: string, + options: ListItemOptions, + callback: CallbackWithErrorAndBody + ): void; - addListItem( - listId: string, - options: ListItemOptions, - callback: CallbackWithErrorAndBody - ): void; + addListItem( + listId: string, + options: ListItemOptions, + callback: CallbackWithErrorAndBody + ): void; - updateListItem( - listId: string, - listItem: string, - options: ListItemOptions, - callback: CallbackWithErrorAndBody - ): void; - - deleteListItem( - listId: string, - listItem: string, - callback: CallbackWithErrorAndBody - ): void; + updateListItem( + listId: string, + listItem: string, + options: ListItemOptions, + callback: CallbackWithErrorAndBody + ): void; + + deleteListItem( + listId: string, + listItem: string, + callback: CallbackWithErrorAndBody + ): void; - getWakeWords(callback: CallbackWithErrorAndBody): void; + getWakeWords(callback: CallbackWithErrorAndBody): void; - getReminders(cached: boolean, callback: CallbackWithErrorAndBody): void; + getReminders(cached: boolean, callback: CallbackWithErrorAndBody): void; - getNotifications(cached: boolean, callback: CallbackWithErrorAndBody): void; + getNotifications(cached: boolean, callback: CallbackWithErrorAndBody): void; - getSkills(callback: CallbackWithErrorAndBody): void; + getSkills(callback: CallbackWithErrorAndBody): void; - createNotificationObject( - serialOrName: SerialOrName, - type: string, - label: string, - value: Value, - status: Status, - sound: string - ): Notification; - - parseValue4Notification( - notification: Notification, - value: Value - ): Notification; - - createNotification( - notification: Notification, - callback: CallbackWithErrorAndBody - ): void; - - changeNotification( - notification: Notification, - value: Value, - callback: CallbackWithErrorAndBody - ): void; - - deleteNotification( - notification: Notification, - callback: CallbackWithErrorAndBody - ): void; - - getDoNotDisturb(callback: CallbackWithErrorAndBody): void; - - getDeviceStatusList(callback: CallbackWithErrorAndBody): void; - - // alarm volume - getDeviceNotificationState( - serialOrName: SerialOrName, - callback: CallbackWithErrorAndBody - ): void; - - getBluetooth(cached: boolean, callback: CallbackWithErrorAndBody): void; - - tuneinSearchRaw(query: string, callback: CallbackWithErrorAndBody): void; - - tuneinSearch(query: string, callback: CallbackWithErrorAndBody): void; - - setTunein( - serialOrName: SerialOrName, - guideId: string, - contentType: string, - callback: CallbackWithErrorAndBody - ): void; - - getCustomerHistoryRecords( - options: GetCustomerHistoryRecordsOptions, - callback: CallbackWithErrorAndBody - ): void; - - getAccount(callback: CallbackWithErrorAndBody): void; - - getContacts( - options: GetContactsOptions, - callback: CallbackWithErrorAndBody - ): void; - - getConversations( - options: GetConversationsOptions, - callback: CallbackWithErrorAndBody - ): void; - - connectBluetooth( - serialOrName: SerialOrName, - btAddress: string, - callback: CallbackWithErrorAndBody - ): void; - - disconnectBluetooth( - serialOrName: SerialOrName, - btAddress: string, - callback: CallbackWithErrorAndBody - ): void; - - setDoNotDisturb( - serialOrName: SerialOrName, - enabled: boolean, - callback: CallbackWithErrorAndBody - ): void; - - find(serialOrName: SerialOrName): SerialOrName | null; - - setAlarmVolume( - serialOrName: SerialOrName, - volume: number, - callback: CallbackWithErrorAndBody - ): void; - - sendCommand( - serialOrName: SerialOrName, - command: MessageCommands, - value: Value, - callback: CallbackWithErrorAndBody - ): void; - - sendMessage( - serialOrName: SerialOrName, - command: MessageCommands, - value: Value, - callback: CallbackWithErrorAndBody - ): void; - - createSequenceNode( - command: SequenceNodeCommand, - value: Value, - serialOrName: SerialOrName, - callback: CallbackWithErrorAndBody - ): void; - - sendMultiSequenceCommand( - serialOrName: SerialOrName, - commands: MultiSequenceCommand[], - sequenceType?: SequneceType | CallbackWithErrorAndBody, - callback?: CallbackWithErrorAndBody - ): void; - - sendSequenceCommand( - serialOrName: SerialOrName, - command: SequenceNodeCommand, - value: Value, - callback: CallbackWithErrorAndBody - ): void; - - getAutomationRoutines( - limit: number, - callback: CallbackWithErrorAndBody - ): void; - - executeAutomationRoutine( - serialOrName: SerialOrName, - routine: string, - callback: CallbackWithErrorAndBody - ): void; - - getMusicProviders(callback: CallbackWithErrorAndBody): void; - - playMusicProvider( - serialOrName: SerialOrName, - providerId: string, - searchPhrase: string, - callback: CallbackWithErrorAndBody - ): void; - - sendTextMessage( - conversationId: string, - text: string, - callback: CallbackWithErrorAndBody - ): void; - - deleteConversation( - conversationId: string, - callback: CallbackWithErrorAndBody - ): void; - - setReminder( - serialOrName: SerialOrName, - timestamp: number, - label: string, - callback: CallbackWithErrorAndBody - ): void; - - getHomeGroup(callback: CallbackWithErrorAndBody): void; - - getDevicePreferences(callback: CallbackWithErrorAndBody): void; - - getAllDeviceVolumes(callback: CallbackWithErrorAndBody): void; - - getSmarthomeDevices(callback: CallbackWithErrorAndBody): void; - - getSmarthomeGroups(callback: CallbackWithErrorAndBody): void; - - getSmarthomeEntities(callback: CallbackWithErrorAndBody): void; - - getSmarthomeBehaviourActionDefinitions( - callback: CallbackWithErrorAndBody - ): void; - - renameDevice( - serialOrName: SerialOrName, - newName: string, - callback: CallbackWithErrorAndBody - ): void; - - deleteSmarthomeDevice( - smarthomeDevice: string, - callback: CallbackWithErrorAndBody - ): void; - - deleteSmarthomeGroup( - smarthomeGroup: string, - callback: CallbackWithErrorAndBody - ): void; - - deleteAllSmarthomeDevices(callback: CallbackWithErrorAndBody): void; - - discoverSmarthomeDevice(callback: CallbackWithErrorAndBody): void; - - querySmarthomeDevices( - applicanceIds: string[], - entityType: EntityType, - callback: CallbackWithErrorAndBody - ): void; - - executeSmarthomeDeviceAction( - entityIds: string[], - parameters: string[], - entityType: EntityType, - callback: CallbackWithErrorAndBody - ): void; - - unpaireBluetooth( - serialOrName: SerialOrName, - btAddress: string, - callback: CallbackWithErrorAndBody - ): void; - - deleteDevice( - serialOrName: SerialOrName, - callback: CallbackWithErrorAndBody - ): void; - } + createNotificationObject( + serialOrName: SerialOrName, + type: string, + label: string, + value: Value, + status: Status, + sound: string + ): Notification; + + parseValue4Notification( + notification: Notification, + value: Value + ): Notification; + + createNotification( + notification: Notification, + callback: CallbackWithErrorAndBody + ): void; + + changeNotification( + notification: Notification, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + deleteNotification( + notification: Notification, + callback: CallbackWithErrorAndBody + ): void; + + getDoNotDisturb(callback: CallbackWithErrorAndBody): void; + + getDeviceStatusList(callback: CallbackWithErrorAndBody): void; + + // alarm volume + getDeviceNotificationState( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + getBluetooth(cached: boolean, callback: CallbackWithErrorAndBody): void; + + tuneinSearchRaw(query: string, callback: CallbackWithErrorAndBody): void; + + tuneinSearch(query: string, callback: CallbackWithErrorAndBody): void; + + setTunein( + serialOrName: SerialOrName, + guideId: string, + contentType: string, + callback: CallbackWithErrorAndBody + ): void; + + getCustomerHistoryRecords( + options: GetCustomerHistoryRecordsOptions, + callback: CallbackWithErrorAndBody + ): void; + + getAccount(callback: CallbackWithErrorAndBody): void; + + getContacts( + options: GetContactsOptions, + callback: CallbackWithErrorAndBody + ): void; + + getConversations( + options: GetConversationsOptions, + callback: CallbackWithErrorAndBody + ): void; + + connectBluetooth( + serialOrName: SerialOrName, + btAddress: string, + callback: CallbackWithErrorAndBody + ): void; + + disconnectBluetooth( + serialOrName: SerialOrName, + btAddress: string, + callback: CallbackWithErrorAndBody + ): void; + + setDoNotDisturb( + serialOrName: SerialOrName, + enabled: boolean, + callback: CallbackWithErrorAndBody + ): void; + + find(serialOrName: SerialOrName): SerialOrName | null; + + setAlarmVolume( + serialOrName: SerialOrName, + volume: number, + callback: CallbackWithErrorAndBody + ): void; + + sendCommand( + serialOrName: SerialOrName, + command: MessageCommands, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + sendMessage( + serialOrName: SerialOrName, + command: MessageCommands, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + createSequenceNode( + command: SequenceNodeCommand, + value: Value, + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + + sendMultiSequenceCommand( + serialOrName: SerialOrName, + commands: MultiSequenceCommand[], + sequenceType?: SequneceType | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody + ): void; + + sendSequenceCommand( + serialOrName: SerialOrName, + command: SequenceNodeCommand, + value: Value, + callback: CallbackWithErrorAndBody + ): void; + + getAutomationRoutines( + limit: number, + callback: CallbackWithErrorAndBody + ): void; + + executeAutomationRoutine( + serialOrName: SerialOrName, + routine: string, + callback: CallbackWithErrorAndBody + ): void; + + getMusicProviders(callback: CallbackWithErrorAndBody): void; + + playMusicProvider( + serialOrName: SerialOrName, + providerId: string, + searchPhrase: string, + callback: CallbackWithErrorAndBody + ): void; + + sendTextMessage( + conversationId: string, + text: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteConversation( + conversationId: string, + callback: CallbackWithErrorAndBody + ): void; + + setReminder( + serialOrName: SerialOrName, + timestamp: number, + label: string, + callback: CallbackWithErrorAndBody + ): void; + + getHomeGroup(callback: CallbackWithErrorAndBody): void; + + getDevicePreferences(callback: CallbackWithErrorAndBody): void; + + getAllDeviceVolumes(callback: CallbackWithErrorAndBody): void; + + getSmarthomeDevices(callback: CallbackWithErrorAndBody): void; + + getSmarthomeGroups(callback: CallbackWithErrorAndBody): void; + + getSmarthomeEntities(callback: CallbackWithErrorAndBody): void; + + getSmarthomeBehaviourActionDefinitions( + callback: CallbackWithErrorAndBody + ): void; + + renameDevice( + serialOrName: SerialOrName, + newName: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteSmarthomeDevice( + smarthomeDevice: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteSmarthomeGroup( + smarthomeGroup: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteAllSmarthomeDevices(callback: CallbackWithErrorAndBody): void; + + discoverSmarthomeDevice(callback: CallbackWithErrorAndBody): void; + + querySmarthomeDevices( + applicanceIds: string[], + entityType: EntityType, + callback: CallbackWithErrorAndBody + ): void; + + executeSmarthomeDeviceAction( + entityIds: string[], + parameters: string[], + entityType: EntityType, + callback: CallbackWithErrorAndBody + ): void; + + unpaireBluetooth( + serialOrName: SerialOrName, + btAddress: string, + callback: CallbackWithErrorAndBody + ): void; + + deleteDevice( + serialOrName: SerialOrName, + callback: CallbackWithErrorAndBody + ): void; + } } diff --git a/alexa-remote.js b/alexa-remote.js index ea95347a..a4b242d5 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -66,7 +66,8 @@ class AlexaRemote extends EventEmitter { } this._options.csrf = this.csrf; this._options.cookie = this.cookie; - this.emit('cookie', this.cookie, this.csrf); + this.macDms = this._options.macDms = this._options.macDms || (this.cookieData && this.cookieData.macDms); + this.emit('cookie', this.cookie, this.csrf, this.macDms); } init(cookie, callback) { @@ -154,11 +155,13 @@ class AlexaRemote extends EventEmitter { return callback && callback(new Error('Error while checking Authentication: ' + err)); } this._options.logger && this._options.logger('Alexa-Remote: Authentication checked: ' + authenticated); - if (! authenticated && !this._options.cookieJustCreated) { + if ((!authenticated && !this._options.cookieJustCreated) || !this.macDms) { + this._options.logger && !this.macDms && this._options.logger('Alexa-Remote: JWT missing, forcing a refresh ...'); this._options.logger && this._options.logger('Alexa-Remote: Cookie was set, but authentication invalid'); delete this._options.cookie; delete this._options.csrf; delete this._options.localCookie; + delete this._options.macDms; return this.init(this._options, callback); } this.lastAuthCheck = new Date().getTime(); @@ -333,7 +336,7 @@ class AlexaRemote extends EventEmitter { this.alexaWsMqtt.disconnect(); this.alexaWsMqtt = null; } - this.alexaWsMqtt = new AlexaWsMqtt(this._options, this.cookie); + this.alexaWsMqtt = new AlexaWsMqtt(this._options, this.cookie, this.macDms); if (!this.alexaWsMqtt) return; this.activityUpdateQueue = []; @@ -748,8 +751,8 @@ class AlexaRemote extends EventEmitter { delete this._options.cookie; this.init(this._options, function(err) { if (err) { - this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error and renew unsuccessfull. STOP'); - return callback && callback(new Error('Cookie invalid, Renew unsuccessfull')); + this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error and renew unsuccessful. STOP'); + return callback && callback(new Error('Cookie invalid, Renew unsuccessful')); } return this.httpsGet(path, callback, flags); }); @@ -797,6 +800,7 @@ class AlexaRemote extends EventEmitter { 'Accept': 'application/json', 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, + 'x-amzn-alexa-app': 'eyJ2ZXJzaW9uIjoiMS4wIiwiYXBwSWQiOiJhbXpuMS5hcHBsaWNhdGlvbi40NTc4NmVlMDliMDI0YTA4YTY5OGQzMGIwYWQzMTAzNyJ9', //'Content-Type': 'application/json', //'Connection': 'keep-alive', 'csrf' : this.csrf, @@ -831,7 +835,7 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers['Accept-Encoding']; delete logOptions.headers['User-Agent']; delete logOptions.headers['Content-Type']; - delete logOptions.headers['Accept']; + delete logOptions.headers.Accept; delete logOptions.headers.Referer; delete logOptions.headers.Origin; this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); @@ -1080,7 +1084,7 @@ class AlexaRemote extends EventEmitter { if (cached === undefined) cached = true; this.httpsGet (`/api/notifications?cached=${cached}&_=%t`, callback); } - + getSkills(callback) { // request options @@ -1539,8 +1543,12 @@ class AlexaRemote extends EventEmitter { ); } - getAccount(callback) { - this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/accounts`, callback); + getAccount(includeActors, callback) { + if (typeof includeActors === 'function') { + callback = includeActors; + includeActors = false; + } + this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/accounts${includeActors ? '?includeActors=true' : ''}`, callback); } getContacts(options, callback) { diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 9c58f789..379e8c32 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -5,16 +5,18 @@ /* jslint esversion: 6 */ const WebSocket = require('ws'); const EventEmitter = require('events'); +const crypto = require('crypto'); class AlexaWsMqtt extends EventEmitter { - constructor(options, cookie) { + constructor(options, cookie, macDms) { super(); this._options = options; this.stop = false; let serialArr = null; this.cookie = cookie; + this.macDms = macDms; if (cookie) serialArr = cookie.match(/ubid-[a-z]+=([^;]+);/); if (!serialArr || !serialArr[1]) { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Cookie incomplete : ' + JSON.stringify(serialArr)); @@ -31,34 +33,129 @@ class AlexaWsMqtt extends EventEmitter { this.messageId = Math.floor(1E9 * Math.random()); } - connect() { + connectType1() { const urlTime = Date.now(); let amazonPage = '.' + this._options.amazonPage; if (amazonPage === '.amazon.com') amazonPage = '-js.amazon.com'; // Special Handling for US! const url = `https://dp-gw-na${amazonPage}/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=${this.accountSerial}-${urlTime}`; + + this.websocket = new WebSocket(url, [], + { + 'perMessageDeflate': true, + 'protocolVersion': 13, + + 'timeout': 5000, + + 'headers': { + 'Connection': 'keep-alive, Upgrade', + 'Upgrade': 'websocket', + 'Host': 'dp-gw-na.' + this._options.amazonPage, + 'Origin': 'https://alexa.' + this._options.amazonPage, + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + //'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + //'Accept-Language': 'de,en-US;q=0.7,en;q=0.3', + //'Sec-WebSocket-Key': 'aV/ud2q+G4pTtOhlt/Amww==', + //'Sec-WebSocket-Extensions': 'permessage-deflate', // 'x-webkit-deflate-frame', + //'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77 PitanguiBridge/2.2.219248.0-[HARDWARE=iPhone10_4][SOFTWARE=11.4.1]', + 'Cookie': this.cookie, + } + } + ); + return url; + } + + /** + * @param method The http request method (GET, POST, DELETE, ...). + * @param path The requested http url path and query. + * @param body The http message body. + * @return {string} + */ + createRequestSignature(method, path, body) { + /* + date = datetime.utcnow().isoformat("T") + "Z" + body = body.decode("utf-8") + + data = f"{method}\n{path}\n{date}\n{body}\n{adp_token}" + + key = rsa.PrivateKey.load_pkcs1(private_key.encode("utf-8")) + cipher = rsa.pkcs1.sign(data.encode(), key, "SHA-256") + signed_encoded = base64.b64encode(cipher) + + signature = f"{signed_encoded.decode()}:{date}" + + return { + "x-adp-token": adp_token, + "x-adp-alg": "SHA256withRSA:1.0", + "x-adp-signature": signature + } + + :2021-10-08T23:49:33Z + */ + const now = new Date().toISOString(); + + const sign = crypto.createSign('SHA256'); + sign.write(method + '\n'); + sign.write(path + '\n'); + sign.write(now + '\n'); + sign.write(body.toString('utf-8') + '\n'); + sign.write(this.macDms.adp_token); + sign.end(); + + const privateKey = '-----BEGIN PRIVATE KEY-----\n' + this.macDms.device_private_key + '\n-----END PRIVATE KEY-----'; + + return `${sign.sign(privateKey, 'base64')}:${now}`; + } + + connectType2() { + let amazonPage = '.' + this._options.amazonPage; + if (amazonPage === '.amazon.com') amazonPage = '-js.amazon.com'; // Special Handling for US! + const url = `https://dp-gw-na${amazonPage}/tcomm/`; + + this.websocket = new WebSocket(url, [], + { + 'perMessageDeflate': true, + 'protocolVersion': 13, + + 'timeout': 5000, + + 'headers': { + 'Connection': 'keep-alive, Upgrade', + 'Upgrade': 'websocket', + 'Host': 'dp-gw-na.' + this._options.amazonPage, + 'Origin': 'https://alexa.' + this._options.amazonPage, + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + //'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + //'Accept-Language': 'de,en-US;q=0.7,en;q=0.3', + //'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77 PitanguiBridge/2.2.219248.0-[HARDWARE=iPhone10_4][SOFTWARE=11.4.1]', + 'Cookie': this.cookie, + 'x-dp-comm-tuning': 'A:F;A:H', + 'x-dp-reason': 'ClientInitiated;1', + 'x-dp-tcomm-purpose': 'Regular', + //'x-dp-deviceVersion': 'motorola/osprey_reteu_2gb/osprey_u2:6.0.1/MPI24.107-55/33:user/release-keys', + //'x-dp-networkType': 'WIFI', + //'x-dp-tcomm-versionCode': '894920010', + //'x-dp-oui': 'dca632', + 'x-dp-obfuscatedBssid': '-2019514039', + 'x-dp-tcomm-versionName': '2.2.443692.0', + 'x-adp-signature': this.createRequestSignature('GET', '/tcomm/', ''), + 'x-adp-token': this.macDms.adp_token, + 'x-adp-alg': 'SHA256WithRSA:1.0', + } + } + ); + return url; + } + + connect() { + let url; try { - this.websocket = new WebSocket(url, [], - { - 'perMessageDeflate': true, - 'protocolVersion': 13, - - 'timeout': 5000, - - 'headers': { - 'Connection': 'keep-alive, Upgrade', - 'Upgrade': 'websocket', - 'Host': 'dp-gw-na.' + this._options.amazonPage, - 'Origin': 'https://alexa.' + this._options.amazonPage, - 'Pragma': 'no-cache', - 'Cache-Control': 'no-cache', - //'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - //'Accept-Language': 'de,en-US;q=0.7,en;q=0.3', - //'Sec-WebSocket-Key': 'aV/ud2q+G4pTtOhlt/Amww==', - //'Sec-WebSocket-Extensions': 'permessage-deflate', // 'x-webkit-deflate-frame', - //'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77 PitanguiBridge/2.2.219248.0-[HARDWARE=iPhone10_4][SOFTWARE=11.4.1]', - 'Cookie': this.cookie, - } - }); + if (!this.macDms) { + url = this.connectType1(); + } else { + url = this.connectType2(); + } } catch (err) { this.emit('error', err); @@ -68,6 +165,7 @@ class AlexaWsMqtt extends EventEmitter { let initTimeout = null; const onWebsocketClose = (code, reason) => { + reason = reason.toString(); this.websocket = null; this.connectionActive = false; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Close: ' + code + ': ' + reason); @@ -127,12 +225,14 @@ class AlexaWsMqtt extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Open: ' + url); this.connectionActive = false; - // tell Tuning Service that we support "A:H" protocol = AlphaPrococol - const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE'); - //console.log('SEND: ' + msg.toString('ascii')); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent'); - if (this.websocket.readyState !== 1 /* OPEN */) return; - this.websocket.send(msg); + if (!this.macDms) { + // tell Tuning Service that we support "A:H" protocol = AlphaPrococol + const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE'); + //console.log('SEND: ' + msg.toString('ascii')); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent'); + if (this.websocket.readyState !== 1 /* OPEN */) return; + this.websocket.send(msg); + } }); this.websocket.on('close', onWebsocketClose); @@ -152,31 +252,48 @@ class AlexaWsMqtt extends EventEmitter { let message = this.parseIncomingMessage(data); if (msgCounter === 0) { // initialization if (message.content.protocolName) { - if (message.content.protocolName !== 'A:H') { - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Server requests unknown protocol: ' + message.content.protocolName); + this.protocolName = message.content.protocolName; + if (this.protocolName !== 'A:H' && this.protocolName !== 'A:F') { + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Server requests unknown protocol: ' + this.protocolName); } } else { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + JSON.stringify(message)); + this.protocolName = this.macDms ? 'A:F' : 'A:H'; + } + let msg; + if (this.protocolName === 'A:F') { // A:F + msg = Buffer.from('0xfe88bc52 0x0000009c {"protocolName":"A:F","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); + this.websocket.send(msg); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 2 sent'); + + msg = this.encodeGWRegisterAF(); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 3 (Register Connection) sent'); + //console.log('SEND: ' + msg.toString('ascii')); + this.websocket.send(msg); + } else { // A:H + msg = Buffer.from('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); + //console.log('SEND: ' + msg.toString('ascii')); + this.websocket.send(msg); + + //msg = new Buffer('MSG 0x00000361 0x0e414e45 f 0x00000001 0xd7c62f29 0x0000009b INI 0x00000003 1.0 0x00000024 ff1c4525-c036-4942-bf6c-a098755ac82f 0x00000164d106ce6b END FABE'); + msg = this.encodeGWHandshake(); + //console.log('SEND: ' + msg.toString('ascii')); + this.websocket.send(msg); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A-H Initialization Msg 2+3 sent'); } - let msg = Buffer.from('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); - //console.log('SEND: ' + msg.toString('ascii')); - this.websocket.send(msg); - //msg = new Buffer('MSG 0x00000361 0x0e414e45 f 0x00000001 0xd7c62f29 0x0000009b INI 0x00000003 1.0 0x00000024 ff1c4525-c036-4942-bf6c-a098755ac82f 0x00000164d106ce6b END FABE'); - msg = this.encodeGWHandshake(); - //console.log('SEND: ' + msg.toString('ascii')); - this.websocket.send(msg); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 2+3 sent'); } else if (msgCounter === 1) { - //let msg = new Buffer('MSG 0x00000362 0x0e414e46 f 0x00000001 0xf904b9f5 0x00000109 GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE'); - let msg = this.encodeGWRegister(); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 4 (Register Connection) sent'); - //console.log('SEND: ' + msg.toString('ascii')); - this.websocket.send(msg); + if (this.protocolName === 'A:H') { + //let msg = new Buffer('MSG 0x00000362 0x0e414e46 f 0x00000001 0xf904b9f5 0x00000109 GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE'); + let msg = this.encodeGWRegisterAH(); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 4 (Register Connection) sent'); + //console.log('SEND: ' + msg.toString('ascii')); + this.websocket.send(msg); + } //msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" - msg = this.encodePing(); + let msg = this.encodePing(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send First Ping'); //console.log('SEND: ' + msg.toString('hex')); this.websocket.send(msg); @@ -229,7 +346,6 @@ class AlexaWsMqtt extends EventEmitter { }); } - encodeNumber(val, byteLen) { if (!byteLen) byteLen = 8; let str = val.toString(16); @@ -272,7 +388,7 @@ class AlexaWsMqtt extends EventEmitter { return completeBuffer; } - encodeGWRegister() { + encodeGWRegisterAH() { //pubrelBuf = new Buffer('MSG 0x00000362 0x0e414e46 f 0x00000001 0xf904b9f5 0x00000109 GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE'); this.messageId++; let msg = 'MSG 0x00000362 '; // Message-type and Channel = GW_CHANNEL; @@ -290,7 +406,32 @@ class AlexaWsMqtt extends EventEmitter { return completeBuffer; } + encodeGWRegisterAF() { + this.messageId++; + const completeBuffer = Buffer.alloc(0xe4); + completeBuffer.write('MSG', 0,'ascii'); + completeBuffer.writeUInt32BE(0x00000362, 3); // Message-type and Channel = GW_CHANNEL; + completeBuffer.writeUInt32BE(this.messageId, 7); + completeBuffer.write('f', 11, 'ascii'); + completeBuffer.writeUInt32BE(0x00000001, 12); + completeBuffer.writeUInt32BE(0x00000000, 16); // Checksum! + completeBuffer.writeUInt32BE(0x000000e4, 20); // length content + completeBuffer.write('GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE', 24, 'ascii'); + + let checksum = this.computeChecksum(completeBuffer, 16, 20); + completeBuffer.writeUInt32BE(checksum, 16); // Checksum! + return completeBuffer; + } + encodePing() { + if (this.protocolName === 'A:H') { + return this.encodePingAH(); + } else { + return this.encodePingAF(); + } + } + + encodePingAH() { function encode(a, b, c, h) { a = new Uint8Array(a, c, h); for (c = 0; c < h; c++) a[c] = b >> 8 * (h - 1 - c) & 255; @@ -342,6 +483,54 @@ class AlexaWsMqtt extends EventEmitter { return completeBuffer; } + encodePingAF() { + function encode(a, b, c, h) { + a = new Uint8Array(a, c, h); + for (c = 0; c < h; c++) a[c] = b >> 8 * (h - 1 - c) & 255; + } + + this.messageId++; + const completeBuffer = Buffer.alloc(0x3d); + completeBuffer.write('MSG', 0,'ascii'); + completeBuffer.writeUInt32BE(0x00000065, 3); // Message-type and Channel = CHANNEL_FOR_HEARTBEAT; + completeBuffer.writeUInt32BE(this.messageId, 7); + completeBuffer.write('f', 11, 'ascii'); + completeBuffer.writeUInt32BE(0x00000001, 12); + completeBuffer.writeUInt32BE(0x00000000, 16); // Checksum! + completeBuffer.writeUInt32BE(0x0000003d, 20); // length content + + const header = 'PIN'; + const payload = 'Regular'; // g = h.length + let n = new ArrayBuffer(header.length + 4 + 8 + 4 + 2 * payload.length); + let idx = 0; + let u = new Uint8Array(n, idx, header.length); + let l = 0; + let e = Date.now(); + + for (let q = 0; q < header.length; q++) u[q] = header.charCodeAt(q); + idx += header.length; + encode(n, l, idx, 4); + idx += 4; + encode(n, e, idx, 8); + idx += 8; + encode(n, payload.length, idx, 4); + idx += 4; + u = new Uint8Array(n, idx, payload.length * 2); + let q; + for (q = 0; q < payload.length; q++) { + u[q * 2] = 0; + u[q * 2 + 1] = payload.charCodeAt(q); + } + let buf = Buffer.from(n); + buf.copy(completeBuffer, 24); + + completeBuffer.write('FABE', buf.length + 24, 'ascii'); + + let checksum = this.computeChecksum(completeBuffer, 16, 20); + completeBuffer.writeUInt32BE(checksum, 16); // Checksum! + return completeBuffer; + } + computeChecksum(a, f, k) { function b(a, b) { for (a = c(a); 0 != b && 0 != a;) a = Math.floor(a / 2), b--; @@ -361,6 +550,14 @@ class AlexaWsMqtt extends EventEmitter { } parseIncomingMessage(data) { + if (this.protocolName === 'A:H') { + return this.parseIncomingMessageAH(data); + } else { + return this.parseIncomingMessageAF(data); + } + } + + parseIncomingMessageAH(data) { function readHex(index, length) { let str = data.toString('ascii', index, index + length); if (str.startsWith('0x')) str = str.substr(2); @@ -472,6 +669,111 @@ class AlexaWsMqtt extends EventEmitter { return message; } + parseIncomingMessageAF(data) { + function readHex(index, length) { + let str = data.toString('ascii', index, index + length); + if (str.startsWith('0x')) str = str.substr(2); + return parseInt(str, 16); + } + + function readString(index, length) { + return data.toString('ascii', index, index + length); + } + + let idx = 0; + const message = {}; + message.service = readString(data.length - 4, 4); + + if (message.service === 'TUNE') { + message.checksum = readHex(idx, 10); + idx += 11; // 10 + delimiter; + let contentLength = readHex(idx, 10); + idx += 11; // 10 + delimiter; + message.content = readString(idx, contentLength - 4 - idx); + if (message.content.startsWith('{') && message.content.endsWith('}')) { + try { + message.content = JSON.parse(message.content); + } + catch (e) {} + } + } + else if (message.service === 'FABE') { + message.messageType = readString(0, 3); + message.channel = data.readUint32(3); + message.messageId = data.readUint32(7); + message.moreFlag = data.readUint32(11); + message.seq = data.readUint32(12); + message.checksum = data.readUint32(16); + + let contentLength = data.readUint32(20); + + message.content = {}; + message.content.messageType = readString(24, 3); + idx = 28; + + if (message.channel === 0x361) { // GW_HANDSHAKE_CHANNEL + if (message.content.messageType === 'ACK') { + let length = readHex(idx, 10); + idx += 11; // 10 + delimiter; + message.content.protocolVersion = readString(idx, length); + idx += length + 1; + length = readHex(idx, 10); + idx += 11; // 10 + delimiter; + message.content.connectionUUID = readString(idx, length); + idx += length + 1; + message.content.established = readHex(idx, 10); + idx += 11; // 10 + delimiter; + message.content.timestampINI = readHex(idx, 18); + idx += 19; // 18 + delimiter; + message.content.timestampACK = readHex(idx, 18); + idx += 19; // 18 + delimiter; + } + } + else if (message.channel === 0x362) { // GW_CHANNEL + if (message.content.messageType === 'GWM') { + message.content.subMessageType = readString(idx, 3); + idx += 4; + message.content.channel = readHex(idx, 10); + idx += 11; // 10 + delimiter; + + if (message.content.channel === 0xb479) { // DEE_WEBSITE_MESSAGING + let length = readHex(idx, 10); + idx += 11; // 10 + delimiter; + message.content.destinationIdentityUrn = readString(idx, length); + idx += length + 1; + + length = readHex(idx, 10); + idx += 11; // 10 + delimiter; + let idData = readString(idx, length); + idx += length + 1; + + idData = idData.split(' '); + message.content.deviceIdentityUrn = idData[0]; + message.content.payload = idData[1]; + if (!message.content.payload) { + message.content.payload = readString(idx, data.length - 4 - idx); + } + if (message.content.payload.startsWith('{') && message.content.payload.endsWith('}')) { + try { + message.content.payload = JSON.parse(message.content.payload); + if (message.content.payload && message.content.payload.payload && typeof message.content.payload.payload === 'string') { + message.content.payload.payload = JSON.parse(message.content.payload.payload); + } + } + catch (e) {} + } + } + } + } + else if (message.channel === 0x65) { // CHANNEL_FOR_HEARTBEAT + idx -= 1; // no delimiter! + message.content.payloadData = data.slice(idx, data.length - 4); + } + } + //console.log(JSON.stringify(message, null, 4)); + return message; + } + disconnect() { if (this.reconnectTimeout) { clearTimeout(this.reconnectTimeout); diff --git a/example/example.js b/example/example.js index 86a14e8a..f63b555f 100644 --- a/example/example.js +++ b/example/example.js @@ -7,9 +7,7 @@ let alexa = new Alexa(); let cookie = { ... }; alexa.init({ - cookie: cookie, // cookie if already known, else can be generated using email/password - email: '...', // optional, amazon email for login to get new cookie - password: '...', // optional, amazon password for login to get new cookie + cookie: cookie, // cookie if already known, else can be generated using proxy proxyOnly: true, proxyOwnIp: 'localhost', proxyPort: 3001, @@ -21,7 +19,10 @@ alexa.init({ // acceptLanguage: '...', // optional, override Accept-Language-Header for cookie determination // amazonPage: '...', // optional, override Amazon-Login-Page for cookie determination and referer for requests useWsMqtt: true, // optional, true to use the Websocket/MQTT direct push connection - cookieRefreshInterval: 7*24*60*1000 // optional, cookie refresh intervall, set to 0 to disable refresh + cookieRefreshInterval: 7*24*60*1000, // optional, cookie refresh intervall, set to 0 to disable refresh + formerDataStorePath: '...', // optional: overwrite path where some of the formerRegistrationData are persisted to optimize against Amazon security measures + formerRegistrationData: { ... }, // optional/preferred: provide the result object from subsequent proxy usages here and some generated data will be reused for next proxy call too + macDms: { ... }, // required since version 4.0 to use Push connection! Is returned in cookieData.macDms }, function (err) { if (err) { diff --git a/package-lock.json b/package-lock.json index b61cb31c..2dcd9745 100644 --- a/package-lock.json +++ b/package-lock.json @@ -115,17 +115,17 @@ } }, "@types/http-proxy": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.5.tgz", - "integrity": "sha512-GNkDE7bTv6Sf8JbV2GksknKOsk7OznNYHSdrtvPJXO0qJ9odZig6IZKUi5RFGi6d1bf6dgIAe4uXi3DBc7069Q==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", + "integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==", "requires": { "@types/node": "*" } }, "@types/node": { - "version": "14.14.41", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz", - "integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==" + "version": "16.10.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz", + "integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==" }, "accepts": { "version": "1.3.7", @@ -163,13 +163,12 @@ } }, "alexa-cookie2": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-3.4.3.tgz", - "integrity": "sha512-tjewy2tWwmMTB5/j+pA1QqreuC+1M+nCiT38FXv/zM14RgDtZ7Tuj2zDaq5QwWpdDLiY/O780yUrz95xFB/YPw==", + "version": "github:Apollon77/alexa-cookie#02c352e3b150dcc1f1a81e08b369c4fea38af3f7", + "from": "github:Apollon77/alexa-cookie", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", - "http-proxy-middleware": "^1.2.0", + "http-proxy-middleware": "^2.0.1", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.1" @@ -331,9 +330,9 @@ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "cross-spawn": { "version": "7.0.3", @@ -499,14 +498,14 @@ } }, "follow-redirects": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz", - "integrity": "sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg==" + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" }, "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" }, "fresh": { "version": "0.5.2", @@ -577,9 +576,9 @@ } }, "http-proxy-middleware": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.2.0.tgz", - "integrity": "sha512-vNw+AxT0+6VTM1rCJw1bpiIaUQ1Ww/vTyIEOUzdW9kNX4yuhhqV3jLSKDJo/Y/lqEIshaKCDujtvEqWiD9Dn6Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.1.tgz", + "integrity": "sha512-cfaXRVoZxSed/BmkA7SwBVNI9Kj7HFltaE5rqYOub5kWzWZ+gofV2koVN1j2rMW7pEfSSlCHGJ31xmuyFyfLOg==", "requires": { "@types/http-proxy": "^1.17.5", "http-proxy": "^1.18.1", @@ -638,9 +637,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "requires": { "is-extglob": "^2.1.1" } @@ -727,16 +726,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.47.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", - "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", + "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==" }, "mime-types": { - "version": "2.1.30", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", - "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "version": "2.1.33", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", + "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", "requires": { - "mime-db": "1.47.0" + "mime-db": "1.50.0" } }, "mimic-fn": { @@ -798,9 +797,9 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" }, "process-nextick-args": { "version": "2.0.1", @@ -808,11 +807,11 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "requires": { - "forwarded": "~0.1.2", + "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, @@ -1094,9 +1093,9 @@ } }, "ws": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.2.tgz", - "integrity": "sha512-Q6B6H2oc8QY3llc3cB8kVmQ6pnJWVQbP7Q5algTcIxx7YEpc0oU4NBVHlztA7Ekzfhw2r0rPducMUiCGWKQRzw==" + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==" }, "y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index 58d2bdfc..da4cc621 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,10 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^3.4.3", + "alexa-cookie2": "Apollon77/alexa-cookie", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.2.2", + "ws": "^8.2.3", "extend": "^3.0.2", "uuid": "^8.3.2" }, @@ -51,7 +51,7 @@ "url": "https://github.com/Apollon77/alexa-remote/issues" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.0.0" }, "types": "alexa-remote.d.ts", "main": "alexa-remote.js", From 3564c1e0307f10bb5d6349f9f7ad20ac8ab3882e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 22:16:17 +0200 Subject: [PATCH 159/356] * fixes --- alexa-remote.js | 3 +++ alexa-wsmqtt.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/alexa-remote.js b/alexa-remote.js index a4b242d5..9f24047e 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -339,6 +339,8 @@ class AlexaRemote extends EventEmitter { this.alexaWsMqtt = new AlexaWsMqtt(this._options, this.cookie, this.macDms); if (!this.alexaWsMqtt) return; + this._options.logger && this._options.logger('Alexa-Remote: Initialize WS-MQTT Push Connection'); + this.activityUpdateQueue = []; this.activityUpdateNotFoundCounter = 0; this.activityUpdateTimeout = null; @@ -838,6 +840,7 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers.Accept; delete logOptions.headers.Referer; delete logOptions.headers.Origin; + delete logOptions.headers['x-amzn-alexa-app']; this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); let req; diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 379e8c32..c1d44060 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -158,6 +158,8 @@ class AlexaWsMqtt extends EventEmitter { } } catch (err) { + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Error on Init ' + err.message); + this._options.logger && this._options.logger(err.stack); this.emit('error', err); return; } From 448d6b5ec4ce3fd0ef16e5b9c57c91afa8f2b067 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 22:19:28 +0200 Subject: [PATCH 160/356] * fixes --- alexa-wsmqtt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index c1d44060..31636b5e 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -37,7 +37,7 @@ class AlexaWsMqtt extends EventEmitter { const urlTime = Date.now(); let amazonPage = '.' + this._options.amazonPage; if (amazonPage === '.amazon.com') amazonPage = '-js.amazon.com'; // Special Handling for US! - const url = `https://dp-gw-na${amazonPage}/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=${this.accountSerial}-${urlTime}`; + const url = `wss://dp-gw-na${amazonPage}/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=${this.accountSerial}-${urlTime}`; this.websocket = new WebSocket(url, [], { @@ -110,7 +110,7 @@ class AlexaWsMqtt extends EventEmitter { connectType2() { let amazonPage = '.' + this._options.amazonPage; if (amazonPage === '.amazon.com') amazonPage = '-js.amazon.com'; // Special Handling for US! - const url = `https://dp-gw-na${amazonPage}/tcomm/`; + const url = `wss://dp-gw-na${amazonPage}/tcomm/`; this.websocket = new WebSocket(url, [], { From d12c29da6af3a091f9932da61938809f7d5d288c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 22:32:49 +0200 Subject: [PATCH 161/356] * fixes --- alexa-wsmqtt.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 31636b5e..d5598676 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -251,7 +251,10 @@ class AlexaWsMqtt extends EventEmitter { this.websocket.on('message', (data) => { if (!this.websocket || this.websocket.readyState !== 1 /* OPEN */) return; + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming RAW messagae: ' + data.toString('hex')); let message = this.parseIncomingMessage(data); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming messagae: ' + JSON.stringify(message)); + if (msgCounter === 0) { // initialization if (message.content.protocolName) { this.protocolName = message.content.protocolName; @@ -263,6 +266,8 @@ class AlexaWsMqtt extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + JSON.stringify(message)); this.protocolName = this.macDms ? 'A:F' : 'A:H'; } + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Detected protocol ' + this.protocolName); + let msg; if (this.protocolName === 'A:F') { // A:F msg = Buffer.from('0xfe88bc52 0x0000009c {"protocolName":"A:F","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); From 585e42267d528e0e0e7d9aad9f14c6ac3f583505 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 22:40:02 +0200 Subject: [PATCH 162/356] * fixes --- alexa-wsmqtt.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index d5598676..59171439 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -251,9 +251,9 @@ class AlexaWsMqtt extends EventEmitter { this.websocket.on('message', (data) => { if (!this.websocket || this.websocket.readyState !== 1 /* OPEN */) return; - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming RAW messagae: ' + data.toString('hex')); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming RAW message: ' + data.toString('hex')); let message = this.parseIncomingMessage(data); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming messagae: ' + JSON.stringify(message)); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message: ' + JSON.stringify(message)); if (msgCounter === 0) { // initialization if (message.content.protocolName) { @@ -278,6 +278,7 @@ class AlexaWsMqtt extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 3 (Register Connection) sent'); //console.log('SEND: ' + msg.toString('ascii')); this.websocket.send(msg); + msgCounter++; } else { // A:H msg = Buffer.from('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); //console.log('SEND: ' + msg.toString('ascii')); @@ -290,7 +291,7 @@ class AlexaWsMqtt extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A-H Initialization Msg 2+3 sent'); } } - else if (msgCounter === 1) { + if (msgCounter === 1) { if (this.protocolName === 'A:H') { //let msg = new Buffer('MSG 0x00000362 0x0e414e46 f 0x00000001 0xf904b9f5 0x00000109 GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE'); let msg = this.encodeGWRegisterAH(); @@ -691,6 +692,8 @@ class AlexaWsMqtt extends EventEmitter { const message = {}; message.service = readString(data.length - 4, 4); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message Service: ' + message.service); + if (message.service === 'TUNE') { message.checksum = readHex(idx, 10); idx += 11; // 10 + delimiter; From 76b285d94e3a258ce0542be0c8954a9311c6fae1 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 22:51:52 +0200 Subject: [PATCH 163/356] * fixes --- alexa-wsmqtt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 59171439..f7e41b9e 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -108,7 +108,7 @@ class AlexaWsMqtt extends EventEmitter { } connectType2() { - let amazonPage = '.' + this._options.amazonPage; + let amazonPage = '.amazon.com'; // + this._options.amazonPage; if (amazonPage === '.amazon.com') amazonPage = '-js.amazon.com'; // Special Handling for US! const url = `wss://dp-gw-na${amazonPage}/tcomm/`; @@ -322,7 +322,7 @@ class AlexaWsMqtt extends EventEmitter { }, 180000); } msgCounter++; - if (msgCounter < 3) return; + if (msgCounter < 1 || !this.pingPongInterval) return; const incomingMsg = data.toString('ascii'); //if (incomingMsg.includes('PON') && incomingMsg.includes('\u0000R\u0000e\u0000g\u0000u\u0000l\u0000a\u0000r')) { From d80fd9c87dad422d03808aa35b7538ee62c37e15 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 23:06:41 +0200 Subject: [PATCH 164/356] * fixes --- alexa-wsmqtt.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index f7e41b9e..12253acd 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -231,7 +231,7 @@ class AlexaWsMqtt extends EventEmitter { // tell Tuning Service that we support "A:H" protocol = AlphaPrococol const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE'); //console.log('SEND: ' + msg.toString('ascii')); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent'); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:H Initialization Msg 1 sent'); if (this.websocket.readyState !== 1 /* OPEN */) return; this.websocket.send(msg); } @@ -322,7 +322,7 @@ class AlexaWsMqtt extends EventEmitter { }, 180000); } msgCounter++; - if (msgCounter < 1 || !this.pingPongInterval) return; + if (msgCounter < 2 || !this.pingPongInterval) return; const incomingMsg = data.toString('ascii'); //if (incomingMsg.includes('PON') && incomingMsg.includes('\u0000R\u0000e\u0000g\u0000u\u0000l\u0000a\u0000r')) { @@ -721,6 +721,8 @@ class AlexaWsMqtt extends EventEmitter { message.content.messageType = readString(24, 3); idx = 28; + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message Service Channel: ' + message.channel); + if (message.channel === 0x361) { // GW_HANDSHAKE_CHANNEL if (message.content.messageType === 'ACK') { let length = readHex(idx, 10); @@ -776,11 +778,11 @@ class AlexaWsMqtt extends EventEmitter { } } else if (message.channel === 0x65) { // CHANNEL_FOR_HEARTBEAT - idx -= 1; // no delimiter! message.content.payloadData = data.slice(idx, data.length - 4); } } //console.log(JSON.stringify(message, null, 4)); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Parsed Message: ' + JSON.stringify(message)); return message; } From 1f6c355bc0a6b84c4505782ab44120dee4acdb87 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 23:08:33 +0200 Subject: [PATCH 165/356] * fixes --- alexa-wsmqtt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 12253acd..fb1436a9 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -272,10 +272,10 @@ class AlexaWsMqtt extends EventEmitter { if (this.protocolName === 'A:F') { // A:F msg = Buffer.from('0xfe88bc52 0x0000009c {"protocolName":"A:F","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); this.websocket.send(msg); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 2 sent'); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 2 sent: ' + msg.toString('hex')); msg = this.encodeGWRegisterAF(); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 3 (Register Connection) sent'); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 3 (Register Connection) sent: ' + msg.toString('hex')); //console.log('SEND: ' + msg.toString('ascii')); this.websocket.send(msg); msgCounter++; From c179e41fc6a15a7a2269cface57f619dee3622d6 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 23:17:08 +0200 Subject: [PATCH 166/356] * fixes --- alexa-wsmqtt.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index fb1436a9..4932b3a8 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -709,13 +709,13 @@ class AlexaWsMqtt extends EventEmitter { } else if (message.service === 'FABE') { message.messageType = readString(0, 3); - message.channel = data.readUint32(3); - message.messageId = data.readUint32(7); - message.moreFlag = data.readUint32(11); - message.seq = data.readUint32(12); - message.checksum = data.readUint32(16); + message.channel = data.readUInt32(3); + message.messageId = data.readUInt32(7); + message.moreFlag = data.readUInt32(11); + message.seq = data.readUInt32(12); + message.checksum = data.readUInt32(16); - let contentLength = data.readUint32(20); + let contentLength = data.readUInt32(20); message.content = {}; message.content.messageType = readString(24, 3); From 0b19edc5b48060a73d5871a0d376740200e85e70 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 23:22:43 +0200 Subject: [PATCH 167/356] * fixes --- alexa-wsmqtt.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 4932b3a8..66794ac3 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -709,13 +709,13 @@ class AlexaWsMqtt extends EventEmitter { } else if (message.service === 'FABE') { message.messageType = readString(0, 3); - message.channel = data.readUInt32(3); - message.messageId = data.readUInt32(7); - message.moreFlag = data.readUInt32(11); - message.seq = data.readUInt32(12); - message.checksum = data.readUInt32(16); + message.channel = data.readUInt32BE(3); + message.messageId = data.readUInt32BE(7); + message.moreFlag = data.readUInt32BE(11); + message.seq = data.readUInt32BE(12); + message.checksum = data.readUInt32BE(16); - let contentLength = data.readUInt32(20); + let contentLength = data.readUInt32BE(20); message.content = {}; message.content.messageType = readString(24, 3); From 06c6a44d36e8979f268e70eea360a171330c7473 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 23:26:55 +0200 Subject: [PATCH 168/356] * lower debug --- alexa-wsmqtt.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 66794ac3..5f3f3d80 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -322,7 +322,7 @@ class AlexaWsMqtt extends EventEmitter { }, 180000); } msgCounter++; - if (msgCounter < 2 || !this.pingPongInterval) return; + if (msgCounter < 3 || !this.pingPongInterval) return; const incomingMsg = data.toString('ascii'); //if (incomingMsg.includes('PON') && incomingMsg.includes('\u0000R\u0000e\u0000g\u0000u\u0000l\u0000a\u0000r')) { @@ -692,7 +692,7 @@ class AlexaWsMqtt extends EventEmitter { const message = {}; message.service = readString(data.length - 4, 4); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message Service: ' + message.service); + //this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message Service: ' + message.service); if (message.service === 'TUNE') { message.checksum = readHex(idx, 10); @@ -721,7 +721,7 @@ class AlexaWsMqtt extends EventEmitter { message.content.messageType = readString(24, 3); idx = 28; - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message Service Channel: ' + message.channel); + //this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message Service Channel: ' + message.channel); if (message.channel === 0x361) { // GW_HANDSHAKE_CHANNEL if (message.content.messageType === 'ACK') { @@ -782,7 +782,7 @@ class AlexaWsMqtt extends EventEmitter { } } //console.log(JSON.stringify(message, null, 4)); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Parsed Message: ' + JSON.stringify(message)); + //this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Parsed Message: ' + JSON.stringify(message)); return message; } From 56ec06c8a8daf3ffd56ee0bb6ab3811e17d1707e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 10 Oct 2021 23:35:22 +0200 Subject: [PATCH 169/356] * try if also works with other domain --- alexa-wsmqtt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 5f3f3d80..55c52410 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -108,7 +108,7 @@ class AlexaWsMqtt extends EventEmitter { } connectType2() { - let amazonPage = '.amazon.com'; // + this._options.amazonPage; + let amazonPage = '.' + this._options.amazonPage; if (amazonPage === '.amazon.com') amazonPage = '-js.amazon.com'; // Special Handling for US! const url = `wss://dp-gw-na${amazonPage}/tcomm/`; From dd9a8117b3befe43451034bd1e7941cccb591d06 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 08:21:29 +0200 Subject: [PATCH 170/356] * work on automatic refresh of data --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 9f24047e..c64aeeb5 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -121,7 +121,7 @@ class AlexaRemote extends EventEmitter { self._options.logger && self._options.logger('Alexa-Remote: cookie was provided'); if (self._options.formerRegistrationData) { const tokensValidSince = Date.now() - self._options.formerRegistrationData.tokenDate; - if (tokensValidSince < 24 * 60 * 60 * 1000) { + if (tokensValidSince < 24 * 60 * 60 * 1000 && this._options.macDms) { return callback(null); } self._options.logger && self._options.logger('Alexa-Remote: former registration data exist, try refresh'); From 7c211981a6fae0a4d72d60c47081b199805cb8de Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 08:22:45 +0200 Subject: [PATCH 171/356] * work on automatic refresh of data --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index c64aeeb5..826f7371 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -121,7 +121,7 @@ class AlexaRemote extends EventEmitter { self._options.logger && self._options.logger('Alexa-Remote: cookie was provided'); if (self._options.formerRegistrationData) { const tokensValidSince = Date.now() - self._options.formerRegistrationData.tokenDate; - if (tokensValidSince < 24 * 60 * 60 * 1000 && this._options.macDms) { + if (tokensValidSince < 24 * 60 * 60 * 1000 && self._options.macDms) { return callback(null); } self._options.logger && self._options.logger('Alexa-Remote: former registration data exist, try refresh'); From a86dbbbc44b5b85b26b3f4e463380a58ae798e69 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 08:40:19 +0200 Subject: [PATCH 172/356] * prepare release --- package-lock.json | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2dcd9745..eaf88034 100644 --- a/package-lock.json +++ b/package-lock.json @@ -163,8 +163,9 @@ } }, "alexa-cookie2": { - "version": "github:Apollon77/alexa-cookie#02c352e3b150dcc1f1a81e08b369c4fea38af3f7", - "from": "github:Apollon77/alexa-cookie", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.0.tgz", + "integrity": "sha512-PPtToQoI6m9rFBeDrzkHipaPCgRMeHk/unEAWoSMvDscgqBkwZCLVA0+nS/1QSbPwEwPKS8Tq4UT78DIt4wNEg==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", diff --git a/package.json b/package.json index da4cc621..81b98eaf 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "Apollon77/alexa-cookie", + "alexa-cookie2": "^4.0.0", "https": "^1.0.0", "querystring": "^0.2.1", "ws": "^8.2.3", From 4d9996981a2fad841c4752e5d8da019adb44d118 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 08:44:53 +0200 Subject: [PATCH 173/356] chore: release v4.0.0 * IMPORTANT: Node.js 10 support is dropped, supports LTS versions of Node.js starting with 12.x * (Apollon77) Change Push connection to new signed flow * (RodolfoSilva) Add TypeScript Type definitions --- README.md | 33 ++++++--------------------------- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index a1825b8a..b8a46734 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.0.0 (2021-10-11) * IMPORTANT: Node.js 10 support is dropped, supports LTS versions of Node.js starting with 12.x * (Apollon77) Change Push connection to new signed flow * (RodolfoSilva) Add TypeScript Type definitions @@ -74,11 +73,11 @@ Thank you for that work. ### 3.3.2 (2020-11-23) * (Apollon77) handle potential crash case (Sentry IOBROKER-ALEXA2-27) * (Apollon77) also ignore PUSH_DEVICE_SETUP_STATE_CHANGE push messages -* (Apollon77) Optimize WSMQTT Reconnection handling for timeout cases +* (Apollon77) Optimize WSMQTT Reconnection handling for timeout cases ### 3.3.1 (2020-07-24) * (Apollon77) Update cookie lib to maybe be more backward compatible if login/baseUrl was changed -* (Apollon77) Increase timeout when reading routines +* (Apollon77) Increase timeout when reading routines ### 3.3.0 (2020-07-19) * (Apollon77) update amazon-cookie library again to optimize upgrades from earlier versions @@ -110,7 +109,7 @@ Thank you for that work. * (hive) add new command curatedtts with allowed values ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"] to play random curated sentences ### 3.1.0 (2019-12-30) -* (Apollon77) remove device._orig because really big objects happened and got exceptions on deep copy using JSION.stringify +* (Apollon77) remove device._orig because really big objects happened and got exceptions on deep copy using JSION.stringify ### 3.0.3 (2019-12-28) * (Apollon77) update cookie lib @@ -139,7 +138,7 @@ Thank you for that work. * (Apollon77) enhance announce/ssml to allow send to multiple devices using one command ### 2.4.0 (2019-07-21) -* (Apollon77) Finalize methods and logix to send and read and delete messages and what's needed for this +* (Apollon77) Finalize methods and logix to send and read and delete messages and what's needed for this ### 2.3.7 (2019-07-06) * (Apollon77) fix (finally) special case on authentication check @@ -217,26 +216,6 @@ Thank you for that work. * (Apollon77) reworked the "prepare" step and only initialize what's really needed and allow extra "init" methods also to update Devices, Bluetooth and such. Docs will follow * (Apollon77) API breaking: executeAutomationRoutine is not expecting a routineId anymore, but the complete routine definition. -### 0.2.x -* (Apollon77) 0.2.8: fixes, fix shuffle/repeat commands, make sure speak object is a string -* (Apollon77) 0.2.7: speak maximum are 250 characters, routines will now queried 2000 at once (instead of only 20 before) -* (Apollon77) 0.2.6: fixes -* (Apollon77) 0.2.5: new functions to read musicproviders and send searchphrases for them -* (Apollon77) 0.2.5: by default direct all calls to "alexa."+amazonPage to be more generic, overwritable -* (Apollon77) 0.2.4: several smaller bugfixes -* (Apollon77) 0.2.4: an speak call with empty string will return an error -* (Apollon77) 0.2.4: add infos if multiroom device or member -* (Apollon77) 0.2.3: in non .com replace numbers with points into numbers with comma -* (Apollon77) 0.2.0: several optimizations and publish as alexa-remote2 on npm -* (Apollon77) 0.2.0: use alexa-cookie@0.2.0 library to also offer proxy support -* (Apollon77) 0.2.0: retrieve automation routines in prepare -* (Apollon77) 0.2.0: enhanced sendCommand and added support for Routines and sequencial Commands - -### 0.1.x -* (Apollon77) 0.1.3: Use specific User-Agents for Win32, MacOS and linux based platforms -* (Apollon77) 0.1.2: add logging for used Alexa-URL and user-Agent once at init -* (Apollon77) 0.1.1: rename "shuffle" to "ShuffleCommand" and repeat to RepeatCommand) - ### 0.1.0 * (Apollon77) added automatic cookie renewal when email and password are provided * (Apollon77) added authentication checks by bootstrap call (like [alexa-remote-control](https://github.com/thorsten-gehrig/alexa-remote-control)) @@ -244,4 +223,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef +* Versions by soef \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index eaf88034..39d46d48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.9.0", + "version": "4.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 81b98eaf..0bab540d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "3.9.0", + "version": "4.0.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 613e0f7b9f7d48f0e2a31f560939f9f7bb1d2b73 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 09:11:45 +0200 Subject: [PATCH 174/356] * (Apollon77) Adjust call headers --- README.md | 6 +++++- alexa-remote.js | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b8a46734..a68b9dc4 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Adjust call headers + ### 4.0.0 (2021-10-11) * IMPORTANT: Node.js 10 support is dropped, supports LTS versions of Node.js starting with 12.x * (Apollon77) Change Push connection to new signed flow @@ -223,4 +227,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef \ No newline at end of file +* Versions by soef diff --git a/alexa-remote.js b/alexa-remote.js index 826f7371..af461db6 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -802,7 +802,6 @@ class AlexaRemote extends EventEmitter { 'Accept': 'application/json', 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, - 'x-amzn-alexa-app': 'eyJ2ZXJzaW9uIjoiMS4wIiwiYXBwSWQiOiJhbXpuMS5hcHBsaWNhdGlvbi40NTc4NmVlMDliMDI0YTA4YTY5OGQzMGIwYWQzMTAzNyJ9', //'Content-Type': 'application/json', //'Connection': 'keep-alive', 'csrf' : this.csrf, @@ -840,7 +839,6 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers.Accept; delete logOptions.headers.Referer; delete logOptions.headers.Origin; - delete logOptions.headers['x-amzn-alexa-app']; this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); let req; From 0bb52fe58e707d2c58049d9b288efc3256e56097 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 09:14:50 +0200 Subject: [PATCH 175/356] * prepare release --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39d46d48..e961c4ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -163,9 +163,9 @@ } }, "alexa-cookie2": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.0.tgz", - "integrity": "sha512-PPtToQoI6m9rFBeDrzkHipaPCgRMeHk/unEAWoSMvDscgqBkwZCLVA0+nS/1QSbPwEwPKS8Tq4UT78DIt4wNEg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.1.tgz", + "integrity": "sha512-Ylk+iulA9/LHmxvH1PW/0z0GbW82vfaQG3ubjejGBlQVuK8nDoH7uwY5XJgA3Fy0FK0etj6ce6AtxBMx4aJkJA==", "requires": { "cookie": "^0.4.1", "express": "^4.17.1", diff --git a/package.json b/package.json index 0bab540d..18e7f93e 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^4.0.0", + "alexa-cookie2": "^4.0.1", "https": "^1.0.0", "querystring": "^0.2.1", "ws": "^8.2.3", From f0e53fc60578298d9959391e9f9bf2e0efeb2059 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 09:15:16 +0200 Subject: [PATCH 176/356] chore: release v4.0.1 * (Apollon77) Adjust call headers --- README.md | 5 ++--- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a68b9dc4..54f11bd8 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.0.1 (2021-10-11) * (Apollon77) Adjust call headers ### 4.0.0 (2021-10-11) @@ -227,4 +226,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef +* Versions by soef \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e961c4ee..3174ba61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.0", + "version": "4.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 18e7f93e..85176361 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.0", + "version": "4.0.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 3c9d524f79794b954c5515a0bad6dadd300e37aa Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Oct 2021 09:16:20 +0200 Subject: [PATCH 177/356] * prepare release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54f11bd8..d26d5662 100644 --- a/README.md +++ b/README.md @@ -226,4 +226,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef \ No newline at end of file +* Versions by soef From db65baa1951a7d808367d7ba4e0951d144a3f367 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 07:54:55 +0200 Subject: [PATCH 178/356] * (Apollon77) Adjust Timing on Push Connection initialization * (Apollon77) Adjust timing when matching History entries because sometimes Amazon seems to need a bit longer for new infos become available --- README.md | 5 +++++ alexa-remote.js | 4 ++-- alexa-wsmqtt.js | 24 +++++++++++++++++------- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d26d5662..14cfd1b6 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,11 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Adjust Timing on Push Connection initialization +* (Apollon77) Adjust timing when matching History entries because sometimes Amazon seems to need a bit longer for new infos become available + ### 4.0.1 (2021-10-11) * (Apollon77) Adjust call headers diff --git a/alexa-remote.js b/alexa-remote.js index af461db6..b0364aff 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -682,7 +682,7 @@ class AlexaRemote extends EventEmitter { if (lastFoundQueueIndex === -1) { this._options.logger && this._options.logger('Alexa-Remote: No activities from stored ' + this.activityUpdateQueue.length + ' entries found in queue (' + this.activityUpdateNotFoundCounter + ')'); this.activityUpdateNotFoundCounter++; - if (this.activityUpdateNotFoundCounter > 2) { + if (this.activityUpdateNotFoundCounter > 5) { this._options.logger && this._options.logger('Alexa-Remote: Reset expected activities'); this.activityUpdateQueue = []; this.activityUpdateNotFoundCounter = 0; @@ -699,7 +699,7 @@ class AlexaRemote extends EventEmitter { this.activityUpdateTimeout = setTimeout(() => { this.activityUpdateTimeout = null; this.getPushedActivities(); - }, 200); + }, 300); } diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 55c52410..b30cfcd9 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -148,6 +148,16 @@ class AlexaWsMqtt extends EventEmitter { return url; } + sendWs(data) { + return new Promise(resolve => { + if (!this.websocket) { + resolve(); + return; + } + this.websocket.send(data, () => resolve()); + }); + } + connect() { let url; try { @@ -249,7 +259,7 @@ class AlexaWsMqtt extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + response); }); - this.websocket.on('message', (data) => { + this.websocket.on('message', async (data) => { if (!this.websocket || this.websocket.readyState !== 1 /* OPEN */) return; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming RAW message: ' + data.toString('hex')); let message = this.parseIncomingMessage(data); @@ -271,23 +281,23 @@ class AlexaWsMqtt extends EventEmitter { let msg; if (this.protocolName === 'A:F') { // A:F msg = Buffer.from('0xfe88bc52 0x0000009c {"protocolName":"A:F","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); - this.websocket.send(msg); + await this.sendWs(msg); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 2 sent: ' + msg.toString('hex')); msg = this.encodeGWRegisterAF(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 3 (Register Connection) sent: ' + msg.toString('hex')); //console.log('SEND: ' + msg.toString('ascii')); - this.websocket.send(msg); + await this.sendWs(msg); msgCounter++; } else { // A:H msg = Buffer.from('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE'); //console.log('SEND: ' + msg.toString('ascii')); - this.websocket.send(msg); + await this.sendWs(msg); //msg = new Buffer('MSG 0x00000361 0x0e414e45 f 0x00000001 0xd7c62f29 0x0000009b INI 0x00000003 1.0 0x00000024 ff1c4525-c036-4942-bf6c-a098755ac82f 0x00000164d106ce6b END FABE'); msg = this.encodeGWHandshake(); //console.log('SEND: ' + msg.toString('ascii')); - this.websocket.send(msg); + await this.sendWs(msg); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A-H Initialization Msg 2+3 sent'); } } @@ -297,14 +307,14 @@ class AlexaWsMqtt extends EventEmitter { let msg = this.encodeGWRegisterAH(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 4 (Register Connection) sent'); //console.log('SEND: ' + msg.toString('ascii')); - this.websocket.send(msg); + await this.sendWs(msg); } //msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" let msg = this.encodePing(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send First Ping'); //console.log('SEND: ' + msg.toString('hex')); - this.websocket.send(msg); + await this.sendWs(msg); this.pingPongInterval = setInterval(() => { if (!this.websocket) return; From 82c60340f90b49d16f9b906ab188cef30639d600 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 08:00:14 +0200 Subject: [PATCH 179/356] * add 100ms delay --- alexa-wsmqtt.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index b30cfcd9..d14f29af 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -158,6 +158,12 @@ class AlexaWsMqtt extends EventEmitter { }); } + wait(delay) { + return new Promise(resolve => { + setTimeout(() => resolve(), delay); + }); + } + connect() { let url; try { @@ -284,6 +290,7 @@ class AlexaWsMqtt extends EventEmitter { await this.sendWs(msg); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 2 sent: ' + msg.toString('hex')); + await this.wait(100); msg = this.encodeGWRegisterAF(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 3 (Register Connection) sent: ' + msg.toString('hex')); //console.log('SEND: ' + msg.toString('ascii')); @@ -294,6 +301,7 @@ class AlexaWsMqtt extends EventEmitter { //console.log('SEND: ' + msg.toString('ascii')); await this.sendWs(msg); + await this.wait(100); //msg = new Buffer('MSG 0x00000361 0x0e414e45 f 0x00000001 0xd7c62f29 0x0000009b INI 0x00000003 1.0 0x00000024 ff1c4525-c036-4942-bf6c-a098755ac82f 0x00000164d106ce6b END FABE'); msg = this.encodeGWHandshake(); //console.log('SEND: ' + msg.toString('ascii')); From 3f0d344f253aab49e3730b39a074ecf5ec680b2c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 08:03:56 +0200 Subject: [PATCH 180/356] * add 100ms delay --- alexa-wsmqtt.js | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index d14f29af..baeb1ba0 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -318,26 +318,29 @@ class AlexaWsMqtt extends EventEmitter { await this.sendWs(msg); } - //msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" - let msg = this.encodePing(); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send First Ping'); - //console.log('SEND: ' + msg.toString('hex')); - await this.sendWs(msg); - - this.pingPongInterval = setInterval(() => { - if (!this.websocket) return; - //let msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" + setTimeout(() => { + + //msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" let msg = this.encodePing(); - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send Ping'); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send First Ping'); //console.log('SEND: ' + msg.toString('hex')); - this.websocket.send(msg); - - this.pongTimeout = setTimeout(() => { - this.pongTimeout = null; - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: No Pong received after 30s'); - this.websocket && this.websocket.close(); - }, 30000); - }, 180000); + await this.sendWs(msg); + + this.pingPongInterval = setInterval(() => { + if (!this.websocket) return; + //let msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" + let msg = this.encodePing(); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send Ping'); + //console.log('SEND: ' + msg.toString('hex')); + this.websocket.send(msg); + + this.pongTimeout = setTimeout(() => { + this.pongTimeout = null; + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: No Pong received after 30s'); + this.websocket && this.websocket.close(); + }, 30000); + }, 180000); + }, 100); } msgCounter++; if (msgCounter < 3 || !this.pingPongInterval) return; From affc0f1a070c1d9876a1d31392971e0d1df0be96 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 08:05:39 +0200 Subject: [PATCH 181/356] * fix --- alexa-wsmqtt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index baeb1ba0..5fe1b6ff 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -324,7 +324,7 @@ class AlexaWsMqtt extends EventEmitter { let msg = this.encodePing(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send First Ping'); //console.log('SEND: ' + msg.toString('hex')); - await this.sendWs(msg); + this.websocket.send(msg); this.pingPongInterval = setInterval(() => { if (!this.websocket) return; From a91024f2e9dd422422a5624bfdd937ab03d6d41c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 08:44:38 +0200 Subject: [PATCH 182/356] * adjust timings a bit again --- alexa-wsmqtt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 5fe1b6ff..4064130b 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -290,7 +290,7 @@ class AlexaWsMqtt extends EventEmitter { await this.sendWs(msg); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 2 sent: ' + msg.toString('hex')); - await this.wait(100); + await this.wait(50); msg = this.encodeGWRegisterAF(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: A:F Initialization Msg 3 (Register Connection) sent: ' + msg.toString('hex')); //console.log('SEND: ' + msg.toString('ascii')); @@ -301,7 +301,7 @@ class AlexaWsMqtt extends EventEmitter { //console.log('SEND: ' + msg.toString('ascii')); await this.sendWs(msg); - await this.wait(100); + await this.wait(50); //msg = new Buffer('MSG 0x00000361 0x0e414e45 f 0x00000001 0xd7c62f29 0x0000009b INI 0x00000003 1.0 0x00000024 ff1c4525-c036-4942-bf6c-a098755ac82f 0x00000164d106ce6b END FABE'); msg = this.encodeGWHandshake(); //console.log('SEND: ' + msg.toString('ascii')); From 8c2f17c7315a0f514c89d08eae8481aefa216a4f Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 11:12:15 +0200 Subject: [PATCH 183/356] chore: release v4.0.2 * (Apollon77) Adjust Timing on Push Connection initialization * (Apollon77) Adjust timing when matching History entries because sometimes Amazon seems to need a bit longer for new infos become available --- README.md | 5 ++--- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 14cfd1b6..411272e4 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.0.2 (2021-10-12) * (Apollon77) Adjust Timing on Push Connection initialization * (Apollon77) Adjust timing when matching History entries because sometimes Amazon seems to need a bit longer for new infos become available @@ -231,4 +230,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef +* Versions by soef \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3174ba61..aa6206f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.1", + "version": "4.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 85176361..da0bd55e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.1", + "version": "4.0.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From ab668d3c73fe4551517d3b09b6ee80c2f2c143ae Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 11:13:58 +0200 Subject: [PATCH 184/356] * prepare release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 411272e4..1927ad1c 100644 --- a/README.md +++ b/README.md @@ -230,4 +230,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef \ No newline at end of file +* Versions by soef From 7706560388be91a82810de51e184b4c75a454deb Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 21:54:14 +0200 Subject: [PATCH 185/356] * (Apollon77) Fix crash case (Sentry IOBROKER-ALEXA2-AT) --- README.md | 4 ++++ alexa-wsmqtt.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1927ad1c..eb9af1a6 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix crash case (Sentry IOBROKER-ALEXA2-AT) + ### 4.0.2 (2021-10-12) * (Apollon77) Adjust Timing on Push Connection initialization * (Apollon77) Adjust timing when matching History entries because sometimes Amazon seems to need a bit longer for new infos become available diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 4064130b..49ca51ce 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -183,7 +183,9 @@ class AlexaWsMqtt extends EventEmitter { let initTimeout = null; const onWebsocketClose = (code, reason) => { - reason = reason.toString(); + if (reason) { + reason = reason.toString(); + } this.websocket = null; this.connectionActive = false; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Close: ' + code + ': ' + reason); From 66a2414a12f73342c8a2d58f39a79a17c294af6d Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 21:54:32 +0200 Subject: [PATCH 186/356] chore: release v4.0.3 * (Apollon77) Fix crash case (Sentry IOBROKER-ALEXA2-AT) --- README.md | 5 ++--- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index eb9af1a6..75c5d7e7 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.0.3 (2021-10-12) * (Apollon77) Fix crash case (Sentry IOBROKER-ALEXA2-AT) ### 4.0.2 (2021-10-12) @@ -234,4 +233,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef +* Versions by soef \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index aa6206f1..9f4bd91a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.2", + "version": "4.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index da0bd55e..4f4c250f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.2", + "version": "4.0.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 52278b1a86d00a789eebd11ed05caf7cc3951016 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Nov 2021 03:02:37 +0000 Subject: [PATCH 187/356] chore(deps-dev): bump @alcalzone/release-script from 3.4.0 to 3.4.1 (#141) --- package-lock.json | 72 +++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 33 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f4bd91a..0285b7f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,17 +30,17 @@ } }, "@alcalzone/release-script": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.4.0.tgz", - "integrity": "sha512-FaqGQUNQ1H1Wg0e6fG0SbVScfhJEutiVFV32cFzC0gESUag03+zWNEEKGAUTs+krUVJ/n3dw4R+p6/6fFVswtw==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.4.1.tgz", + "integrity": "sha512-HGOOfgJp1LXBRPzTCqcJb1MqJFZqrKyN6GW4q4dn0a/Iq9JeS3nnMlxe8yhRlZKbHm/p6n7ws+2Wxx8RKE4cpw==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.3.0", - "@alcalzone/release-script-plugin-changelog": "3.4.0", - "@alcalzone/release-script-plugin-exec": "3.3.0", - "@alcalzone/release-script-plugin-git": "3.3.0", - "@alcalzone/release-script-plugin-package": "3.3.0", - "@alcalzone/release-script-plugin-version": "3.3.0", + "@alcalzone/release-script-core": "3.4.1", + "@alcalzone/release-script-plugin-changelog": "3.4.1", + "@alcalzone/release-script-plugin-exec": "3.4.1", + "@alcalzone/release-script-plugin-git": "3.4.1", + "@alcalzone/release-script-plugin-package": "3.4.1", + "@alcalzone/release-script-plugin-version": "3.4.1", "alcalzone-shared": "^4.0.0", "axios": "^0.21.4", "colors": "^1.4.0", @@ -52,63 +52,63 @@ } }, "@alcalzone/release-script-core": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.3.0.tgz", - "integrity": "sha512-Jq3MGBPYJTMxU+NLH7kuIndSN9pHCKMc7i7rL8ry2JS3SdVW7pATHMhmClsjMCvtQuBm4scsLiYac0UFW+AOmA==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.4.1.tgz", + "integrity": "sha512-UMY95dCg5cAJzbOcZf+Jsw2hC73aUiucSeiT9af7RFeQckJfG9leFT0ZVH0stLhFofHll19EY5IH9ZLvdkMe4w==", "dev": true, "requires": { "execa": "^5.1.1" } }, "@alcalzone/release-script-plugin-changelog": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.4.0.tgz", - "integrity": "sha512-Sgs2MXQT0KDzkTV7K/QYKuOhjizB/WIYZP0jZE6I+aoO8LZea2y0L9LhNua6lt5yYxK2zGWR6T15yN4u7iXODQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.4.1.tgz", + "integrity": "sha512-FRi6eB67mGwT2hX/yWANpvN46BF1V5sblhitQMAZjUf9TmjxElYLXv/v9dVFCHHGPQWkQz+3WNFQrQL9YFAqNQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.3.0", + "@alcalzone/release-script-core": "3.4.1", "alcalzone-shared": "^4.0.0" } }, "@alcalzone/release-script-plugin-exec": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.3.0.tgz", - "integrity": "sha512-eIAg3+RA9Qp0K8csjPwmgzECCwoKTyYvuz4n6OJ5rkKn832MugmO41O708JgMBVwBLF06BlEAJSEBXkVBLllrg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.4.1.tgz", + "integrity": "sha512-mCesHN35hq6DkziYBGQDPn2T8BxXU0Yp28J3H4RnO21OcbMffRGfJ/YFJiQ9lZPekc1xqOvNZsLxzJNLmWPyPQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.3.0", + "@alcalzone/release-script-core": "3.4.1", "alcalzone-shared": "^4.0.0" } }, "@alcalzone/release-script-plugin-git": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.3.0.tgz", - "integrity": "sha512-dQMVaSCnw1nYMdOP14iGgYqswiAFyodBFP/02YkYjYFSJmo10Cnz716R8tlgnbisCnSvxrDsTOdr2L3eOq34kQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.4.1.tgz", + "integrity": "sha512-9M3OsFR+ESZM3/Z2E0p+zfYVjB0CXyinSFo0YVBkyGEO3ix1cdWNC1W8YzBh/A1CQS09rXNi6apudkHJDPlsyA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.3.0", + "@alcalzone/release-script-core": "3.4.1", "fs-extra": "^10.0.0" } }, "@alcalzone/release-script-plugin-package": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.3.0.tgz", - "integrity": "sha512-d3ZmGs3KCb5X0QEq5nDBCqbqbTTO10TCqSRSi5uTSPBXAaOIs0uGnlarmcUH1Y/QLiR2vS5Jk9M1kENzcm/sHw==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.4.1.tgz", + "integrity": "sha512-6iciRFjdGyhIMMexb8EfOns0gl0kaRdbkBB13DMN9ggLoAqwTCNi3Bd+cGYQP9sGK33L5pkcuZXoysJe12lIkQ==", "dev": true, "requires": { "@alcalzone/pak": "^0.7.0", - "@alcalzone/release-script-core": "3.3.0", + "@alcalzone/release-script-core": "3.4.1", "alcalzone-shared": "^4.0.0", "semver": "^7.3.5" } }, "@alcalzone/release-script-plugin-version": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.3.0.tgz", - "integrity": "sha512-f/a/PBLggGBq6rDTGDCrYHcfaC3A2rxS45wRAVLcRHR07rEIWDu2gQdY0Lv+wAEI1vx913WSpSFjUj9G9XHNiA==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.4.1.tgz", + "integrity": "sha512-a2QMoo4KyeHreSzkJCNeI7ETldC/W1derfrnfV5brEEsCl+TXTySGQl9Sz+dFshFo3QvOAkTclRD/ZxGItUtcQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.3.0", + "@alcalzone/release-script-core": "3.4.1", "alcalzone-shared": "^4.0.0", "semver": "^7.3.5", "tiny-glob": "^0.2.9" @@ -214,14 +214,6 @@ "dev": true, "requires": { "follow-redirects": "^1.14.0" - }, - "dependencies": { - "follow-redirects": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", - "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==", - "dev": true - } } }, "body-parser": { diff --git a/package.json b/package.json index 4f4c250f..d49d089a 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^3.4.0" + "@alcalzone/release-script": "^3.4.1" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 873ae554c85bc521b1e5da950c8ee7e6b446f28e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Oct 2021 21:56:19 +0200 Subject: [PATCH 188/356] * prepare release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75c5d7e7..e77083e3 100644 --- a/README.md +++ b/README.md @@ -233,4 +233,4 @@ Thank you for that work. * (Apollon77) added logger option ### 0.0.x -* Versions by soef \ No newline at end of file +* Versions by soef From ce612be1bb5b20055ac7d4b2db8636980913a0fa Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 6 Nov 2021 13:31:25 +0100 Subject: [PATCH 189/356] * fix crash case --- README.md | 4 ++++ alexa-wsmqtt.js | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e77083e3..d42d4029 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix crash case + ### 4.0.3 (2021-10-12) * (Apollon77) Fix crash case (Sentry IOBROKER-ALEXA2-AT) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 49ca51ce..15b23b99 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -167,7 +167,8 @@ class AlexaWsMqtt extends EventEmitter { connect() { let url; try { - if (!this.macDms) { + if (!this.macDms || !this.macDms.adp_token || !this.macDms.device_private_key) { + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Try to initialize old style push connection because macDms data missing'); url = this.connectType1(); } else { url = this.connectType2(); @@ -264,11 +265,13 @@ class AlexaWsMqtt extends EventEmitter { }); this.websocket.on('unexpected-response', (request, response) => { - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + response); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + JSON.stringify(response)); }); this.websocket.on('message', async (data) => { - if (!this.websocket || this.websocket.readyState !== 1 /* OPEN */) return; + if (!this.websocket || this.websocket.readyState !== 1 /* OPEN */) { + return; + } this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming RAW message: ' + data.toString('hex')); let message = this.parseIncomingMessage(data); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message: ' + JSON.stringify(message)); @@ -321,6 +324,9 @@ class AlexaWsMqtt extends EventEmitter { } setTimeout(() => { + if (!this.websocket || this.websocket.readyState !== 1 /* OPEN */) { + return; + } //msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" let msg = this.encodePing(); From 53b10226aacb02685d9f89c27ccd2e49ce6566e2 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 6 Nov 2021 13:31:45 +0100 Subject: [PATCH 190/356] chore: release v4.0.4 * (Apollon77) Fix crash case --- README.md | 3 +-- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d42d4029..12207580 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.0.4 (2021-11-06) * (Apollon77) Fix crash case ### 4.0.3 (2021-10-12) diff --git a/package-lock.json b/package-lock.json index 0285b7f9..f294fd14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.3", + "version": "4.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d49d089a..40a285ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.3", + "version": "4.0.4", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From e621a47226b6ffd9a0e764cc8468637d7c69c5ca Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 6 Nov 2021 21:25:20 +0100 Subject: [PATCH 191/356] * (Apollon77) SequenceNodes created for a device are also bound to the "deviceOwnCustomer" - should help in mixed owner groups --- README.md | 4 ++++ alexa-remote.js | 46 +++++++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 12207580..7f5d50f6 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) SequenceNodes created for a device are also bound to the "deviceOwnCustomer" - should help in mixed owner groups + ### 4.0.4 (2021-11-06) * (Apollon77) Fix crash case diff --git a/alexa-remote.js b/alexa-remote.js index b0364aff..4008d084 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -943,14 +943,14 @@ class AlexaRemote extends EventEmitter { getMedia(serialOrName, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/media/state?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); } getPlayerInfo(serialOrName, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/np/player?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); } @@ -1311,7 +1311,7 @@ class AlexaRemote extends EventEmitter { // alarm volume getDeviceNotificationState(serialOrName, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/device-notification-state/${dev.deviceType}/${dev.softwareVersion}/${dev.serialNumber}&_=%t`, callback); } @@ -1340,7 +1340,7 @@ class AlexaRemote extends EventEmitter { contentType = 'station'; } let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/tunein/queue-and-play ?deviceSerialNumber=${dev.serialNumber} @@ -1606,7 +1606,7 @@ class AlexaRemote extends EventEmitter { connectBluetooth(serialOrName, btAddress, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); let flags = { data: JSON.stringify({ bluetoothDeviceAddress: btAddress}), @@ -1617,7 +1617,7 @@ class AlexaRemote extends EventEmitter { disconnectBluetooth(serialOrName, btAddress, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); let flags = { //data: JSON.stringify({ bluetoothDeviceAddress: btAddress}), @@ -1628,7 +1628,7 @@ class AlexaRemote extends EventEmitter { setDoNotDisturb(serialOrName, enabled, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); let flags = { data: JSON.stringify({ @@ -1641,7 +1641,7 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`/api/dnd/status`, callback, flags); } - find(serialOrName, callback) { + find(serialOrName) { if (typeof serialOrName === 'object') return serialOrName; if (!serialOrName) return null; let dev = this.serialNumbers[serialOrName]; @@ -1654,7 +1654,7 @@ class AlexaRemote extends EventEmitter { setAlarmVolume(serialOrName, volume, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); let flags = { data: JSON.stringify ({ @@ -1673,7 +1673,7 @@ class AlexaRemote extends EventEmitter { } sendMessage(serialOrName, command, value, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); const commandObj = { contentFocusClientId: null }; switch (command) { @@ -1720,10 +1720,14 @@ class AlexaRemote extends EventEmitter { } let deviceSerialNumber = 'ALEXA_CURRENT_DSN'; let deviceType= 'ALEXA_CURRENT_DEVICE_TYPE'; + let deviceOwnerCustomerId = 'ALEXA_CUSTOMER_ID'; if (serialOrName && !Array.isArray(serialOrName)) { const currDevice = this.find(serialOrName); - deviceSerialNumber = currDevice.serialNumber; - deviceType = currDevice.deviceType; + if (currDevice) { + deviceSerialNumber = currDevice.serialNumber; + deviceType = currDevice.deviceType; + deviceOwnerCustomerId = currDevice.deviceOwnerCustomerId; + } } const seqNode = { '@type': 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode', @@ -1731,7 +1735,7 @@ class AlexaRemote extends EventEmitter { 'deviceType': deviceType, 'deviceSerialNumber': deviceSerialNumber, 'locale': 'ALEXA_CURRENT_LOCALE', - 'customerId':'ALEXA_CUSTOMER_ID' + 'customerId': deviceOwnerCustomerId } }; switch (command) { @@ -1868,7 +1872,7 @@ class AlexaRemote extends EventEmitter { seqNode.type = 'Alexa.Notifications.SendMobilePush'; if (typeof value !== 'string') value = String(value); if (value.length === 0) { - return callback && callback(new Error('Can not notify empty string', null)); + return callback && callback(new Error('Can not notify empty string'), null); } seqNode.operationPayload.notificationMessage = value; seqNode.operationPayload.alexaUrl = '#v2/behaviors'; @@ -1910,7 +1914,7 @@ class AlexaRemote extends EventEmitter { } ]; seqNode.operationPayload.target = { - "customerId": "ALEXA_CUSTOMER_ID", + "customerId": deviceOwnerCustomerId, "devices": [ { "deviceSerialNumber": deviceSerialNumber, @@ -1969,7 +1973,7 @@ class AlexaRemote extends EventEmitter { sendSequenceCommand(serialOrName, command, value, callback) { let dev = this.find(Array.isArray(serialOrName) ? serialOrName[0] : serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); if (typeof value === 'function') { callback = value; @@ -2035,8 +2039,8 @@ class AlexaRemote extends EventEmitter { playMusicProvider(serialOrName, providerId, searchPhrase, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); - if (searchPhrase === '') return callback && callback(new Error ('Searchphrase empty', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + if (searchPhrase === '') return callback && callback(new Error('Searchphrase empty'), null); const operationPayload = { 'deviceType': dev.deviceType, @@ -2183,7 +2187,7 @@ class AlexaRemote extends EventEmitter { renameDevice(serialOrName, newName, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); let o = { accountName: newName, @@ -2332,7 +2336,7 @@ class AlexaRemote extends EventEmitter { unpaireBluetooth(serialOrName, btAddress, callback) { let dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); let flags = { method: 'POST', @@ -2346,7 +2350,7 @@ class AlexaRemote extends EventEmitter { deleteDevice(serialOrName, callback) { let dev = this.find(serialOrName, callback); - if (!dev) return callback && callback(new Error ('Unknown Device or Serial number', null)); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); let flags = { method: 'DELETE', From 446ff625f412e1b550fbe198cb4d1338b446e8fa Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 8 Nov 2021 23:05:17 +0100 Subject: [PATCH 192/356] * (Apollon77) Allow to overritde user id and not use deviceOwnerId --- alexa-remote.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 4008d084..8343794c 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1713,7 +1713,11 @@ class AlexaRemote extends EventEmitter { ); } - createSequenceNode(command, value, serialOrName, callback) { + createSequenceNode(command, value, serialOrName, overrideCustomerId, callback) { + if (typeof overrideCustomerId === 'function') { + callback = overrideCustomerId; + overrideCustomerId = null; + } if (typeof serialOrName === 'function') { callback = serialOrName; serialOrName = undefined; @@ -1729,6 +1733,9 @@ class AlexaRemote extends EventEmitter { deviceOwnerCustomerId = currDevice.deviceOwnerCustomerId; } } + if (overrideCustomerId) { + deviceOwnerCustomerId = overrideCustomerId; + } const seqNode = { '@type': 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode', 'operationPayload': { @@ -1944,7 +1951,11 @@ class AlexaRemote extends EventEmitter { return seqNode; } - sendMultiSequenceCommand(serialOrName, commands, sequenceType, callback) { + sendMultiSequenceCommand(serialOrName, commands, sequenceType, overrideCustomerId, callback) { + if (typeof overrideCustomerId === 'function') { + callback = overrideCustomerId; + overrideCustomerId = null; + } if (typeof sequenceType === 'function') { callback = sequenceType; sequenceType = null; @@ -1953,7 +1964,7 @@ class AlexaRemote extends EventEmitter { let nodes = []; for (let command of commands) { - const commandNode = this.createSequenceNode(command.command, command.value, command.device ? command.device : serialOrName, callback); + const commandNode = this.createSequenceNode(command.command, command.value, command.device ? command.device : serialOrName, overrideCustomerId, callback); if (commandNode) nodes.push(commandNode); } @@ -1971,7 +1982,12 @@ class AlexaRemote extends EventEmitter { this.sendSequenceCommand(serialOrName, sequenceObj, callback); } - sendSequenceCommand(serialOrName, command, value, callback) { + sendSequenceCommand(serialOrName, command, value, overrideCustomerId, callback) { + if (typeof overrideCustomerId === 'function') { + callback = overrideCustomerId; + overrideCustomerId = null; + } + let dev = this.find(Array.isArray(serialOrName) ? serialOrName[0] : serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); @@ -1987,7 +2003,7 @@ class AlexaRemote extends EventEmitter { else { seqCommandObj = { '@type': 'com.amazon.alexa.behaviors.model.Sequence', - 'startNode': this.createSequenceNode(command, value) + 'startNode': this.createSequenceNode(command, value, dev, overrideCustomerId); }; } From 1b0b91abc41abe36a4c84d33a667a79d78d83054 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Thu, 11 Nov 2021 18:37:35 -0800 Subject: [PATCH 193/356] Remove extraneous ; Closes #143 --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 8343794c..0f0c9f86 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2003,7 +2003,7 @@ class AlexaRemote extends EventEmitter { else { seqCommandObj = { '@type': 'com.amazon.alexa.behaviors.model.Sequence', - 'startNode': this.createSequenceNode(command, value, dev, overrideCustomerId); + 'startNode': this.createSequenceNode(command, value, dev, overrideCustomerId) }; } From b09883463bd10efce9d6a2c77b76ec3b90884766 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 13 Nov 2021 20:31:37 +0100 Subject: [PATCH 194/356] * (Apollon77) SequenceNodes created for a device are now bound to the "deviceOwnCustomer" - should help in mixed owner groups * eslint and release script update --- .eslintrc.json | 40 +++ .releaseconfig.json | 3 + README.md | 2 +- alexa-remote.js | 723 ++++++++++++++++++++++---------------------- alexa-wsmqtt.js | 115 +++---- package-lock.json | 622 +++++++++++++++++++++++++++++++++++++ package.json | 4 +- 7 files changed, 1090 insertions(+), 419 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .releaseconfig.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..5484cc8f --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,40 @@ +{ + "root": true, + "env": { + "es6": true, + "node": true, + "mocha": true + }, + "extends": [ + "eslint:recommended" + ], + "plugins": [], + "rules": { + "indent": [ + "error", + 4, + { + "SwitchCase": 1 + } + ], + "no-console": "off", + "no-var": "error", + "no-trailing-spaces": "error", + "prefer-const": "error", + "quotes": [ + "error", + "single", + { + "avoidEscape": true, + "allowTemplateLiterals": true + } + ], + "semi": [ + "error", + "always" + ] + }, + "parserOptions": { + "ecmaVersion": 2018 + } +} \ No newline at end of file diff --git a/.releaseconfig.json b/.releaseconfig.json new file mode 100644 index 00000000..ec65c03f --- /dev/null +++ b/.releaseconfig.json @@ -0,0 +1,3 @@ +{ + "plugins": ["license"] +} diff --git a/README.md b/README.md index 7f5d50f6..fe8f461e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Thank you for that work. ## Changelog: ### __WORK IN PROGRESS__ -* (Apollon77) SequenceNodes created for a device are also bound to the "deviceOwnCustomer" - should help in mixed owner groups +* (Apollon77) SequenceNodes created for a device are now bound to the "deviceOwnCustomer" - should help in mixed owner groups ### 4.0.4 (2021-11-06) * (Apollon77) Fix crash case diff --git a/alexa-remote.js b/alexa-remote.js index 0f0c9f86..6be529a3 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1,10 +1,3 @@ -/* jshint -W097 */ -/* jshint -W030 */ -/* jshint strict: false */ -/* jslint node: true */ -/* jslint esversion: 6 */ -'use strict'; - const https = require('https'); const querystring = require('querystring'); const os = require('os'); @@ -74,7 +67,7 @@ class AlexaRemote extends EventEmitter { if (typeof cookie === 'object') { this._options = cookie; if (!this._options.userAgent) { - let platform = os.platform(); + const platform = os.platform(); if (platform === 'win32') { this._options.userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0'; } @@ -212,14 +205,14 @@ class AlexaRemote extends EventEmitter { this.getNotifications((err, res) => { if (err || !res || !res.notifications || !Array.isArray(res.notifications)) return callback && callback(); - for (var serialNumber in this.serialNumbers) { + for (const serialNumber in this.serialNumbers) { if (this.serialNumbers.hasOwnProperty(serialNumber)) { this.serialNumbers[serialNumber].notifications = []; } } res.notifications.forEach((noti) => { - let device = this.find(noti.deviceSerialNumber); + const device = this.find(noti.deviceSerialNumber); if (!device) { //TODO: new stuff return; @@ -240,7 +233,7 @@ class AlexaRemote extends EventEmitter { if (err || !wakeWords || !Array.isArray(wakeWords.wakeWords)) return callback && callback(); wakeWords.wakeWords.forEach((o) => { - let device = this.find(o.deviceSerialNumber); + const device = this.find(o.deviceSerialNumber); if (!device) { //TODO: new stuff return; @@ -256,7 +249,7 @@ class AlexaRemote extends EventEmitter { initDeviceState(callback) { this.getDevices((err, result) => { if (!err && result && Array.isArray(result.devices)) { - let customerIds = {}; + const customerIds = {}; result.devices.forEach((device) => { const existingDevice = this.find(device.serialNumber); if (!existingDevice) { @@ -360,7 +353,7 @@ class AlexaRemote extends EventEmitter { }); this.alexaWsMqtt.on('command', (command, payload) => { - this.emit('command', { 'command': command, 'payload': payload }); + this.emit('command', { 'command': command, 'payload': payload }); switch(command) { case 'PUSH_DOPPLER_CONNECTION_CHANGE': @@ -624,7 +617,7 @@ class AlexaRemote extends EventEmitter { case 'PUSH_TODO_CHANGE': // does not exist? case 'PUSH_LIST_CHANGE': // does not exist? case 'PUSH_LIST_ITEM_CHANGE': - /* + /* { destinationUserId:'A12XXXXXWISGT', listId:'YW16bjEuYWNjb3VudC5BRzJGWEpGWE5DRDZNVzNRSUdFM0xLWkZCWFhRLVRBU0s=', @@ -633,13 +626,13 @@ class AlexaRemote extends EventEmitter { listItemId:'c6852978-bb79-44dc-b7e5-8f5e577432cf' } */ - this.emit('ws-todo-change', { - destinationUserId: payload.destinationUserId, - eventType: payload.eventName, // itemCreated, itemUpdated (including checked ToDo), itemDeleted - listId: payload.listId, - listItemVersion: payload.version, - listItemId: payload.listItemId - }); + this.emit('ws-todo-change', { + destinationUserId: payload.destinationUserId, + eventType: payload.eventName, // itemCreated, itemUpdated (including checked ToDo), itemDeleted + listId: payload.listId, + listItemVersion: payload.version, + listItemId: payload.listItemId + }); return; case 'PUSH_MICROPHONE_STATE': @@ -791,7 +784,7 @@ class AlexaRemote extends EventEmitter { callback = null; }; - let options = { + const options = { host: flags.host || this.baseUrl, path: '', method: 'GET', @@ -814,13 +807,13 @@ class AlexaRemote extends EventEmitter { if (!path.startsWith('/')) { path = path.replace(/^https:\/\//, ''); //let ar = path.match(/^([^\/]+)(\/.*$)/); - let ar = path.match(/^([^\/]+)([\/]*.*$)/); + const ar = path.match(/^([^\/]+)([\/]*.*$)/); options.host = ar[1]; path = ar[2]; } else { options.host = this.baseUrl; } - let time = new Date().getTime(); + const time = new Date().getTime(); path = path.replace(/%t/g, time); options.path = path; @@ -836,7 +829,7 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers['Accept-Encoding']; delete logOptions.headers['User-Agent']; delete logOptions.headers['Content-Type']; - delete logOptions.headers.Accept; + delete logOptions.headers.Accept; delete logOptions.headers.Referer; delete logOptions.headers.Origin; this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); @@ -910,7 +903,7 @@ class AlexaRemote extends EventEmitter { req.end(); } -/// Public + /// Public checkAuthentication(callback) { this.httpsGetCall ('/api/bootstrap?version=0', function (err, res) { if (res && res.authentication && res.authentication.authenticated !== undefined) { @@ -942,14 +935,14 @@ class AlexaRemote extends EventEmitter { } getMedia(serialOrName, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/media/state?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); } getPlayerInfo(serialOrName, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/np/player?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); @@ -957,13 +950,13 @@ class AlexaRemote extends EventEmitter { getLists(callback) { this.httpsGet ('/api/namedLists?_=%t', (err, res) => callback && callback(err, res && res.lists)); - } + } getList(listId, callback) { this.httpsGet ('/api/namedLists/' + listId + '?_=%t', callback); - } + } - /** + /** * Get items from a list. * * @param {String} listId List ID to retrieve items from @@ -972,6 +965,7 @@ class AlexaRemote extends EventEmitter { * @param {String} [options.endTime] filter items regarding end time * @param {String} [options.completed] filter items regarding completion * @param {String} [options.listIds] list IDs + * @param {function} callback * */ getListItems(listId, options, callback) { @@ -982,93 +976,93 @@ class AlexaRemote extends EventEmitter { options = {}; } - // get params by options - let params = ''; - for (let option in options) { - params += '&' + option + '=' + options[option]; - } + // get params by options + let params = ''; + for (const option in options) { + params += '&' + option + '=' + options[option]; + } - // send request + // send request this.httpsGet ('/api/namedLists/' + listId + '/items?_=%t' + params, (err, res) => callback && callback(err, res && res.list)); - } + } - addListItem(listId, options, callback) { + addListItem(listId, options, callback) { // get function params if (typeof options === 'string') { options = { 'value': options }; } - // request options - let request = { - 'method': 'POST', - 'data': JSON.stringify({ - 'listId': listId, - 'createdDateTime': new Date().getTime(), - 'completed': false, - ...options - }) + // request options + const request = { + 'method': 'POST', + 'data': JSON.stringify({ + 'listId': listId, + 'createdDateTime': new Date().getTime(), + 'completed': false, + ...options + }) }; - // send request + // send request this.httpsGet ('/api/namedLists/' + listId + '/item', callback, request); - } - - updateListItem(listId, listItem, options, callback) { - - // providing a version is mandatory - if (typeof options !== 'object' || !options.version || !options.value) { - let errors = []; - - if (!options.version && callback) { - errors.push('Providing the current version via options is mandatory!'); - } - - if (!options.value && callback) { - errors.push('Providing a new value (description) via options is mandatory!'); - } - - callback && callback(errors); - return false; - } - - // request options - let request = { - 'method': 'PUT', - 'data': JSON.stringify({ - 'listId': listId, - 'id': listItem, - 'updatedDateTime': new Date().getTime(), - ...options - }) + } + + updateListItem(listId, listItem, options, callback) { + + // providing a version is mandatory + if (typeof options !== 'object' || !options.version || !options.value) { + const errors = []; + + if (!options.version && callback) { + errors.push('Providing the current version via options is mandatory!'); + } + + if (!options.value && callback) { + errors.push('Providing a new value (description) via options is mandatory!'); + } + + callback && callback(errors); + return false; + } + + // request options + const request = { + 'method': 'PUT', + 'data': JSON.stringify({ + 'listId': listId, + 'id': listItem, + 'updatedDateTime': new Date().getTime(), + ...options + }) }; - // send request + // send request this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); - } - - deleteListItem(listId, listItem, callback) { - - // data - let data = JSON.stringify({ - 'listId': listId, - 'id': listItem, - 'value': '' // must be provided, but value doesn't matter - }); - - // request options - let request = { - 'method': 'DELETE', - 'data': data, - 'headers': { - 'Content-Type': 'application/json', - 'Content-Length': data.length - } + } + + deleteListItem(listId, listItem, callback) { + + // data + const data = JSON.stringify({ + 'listId': listId, + 'id': listItem, + 'value': '' // must be provided, but value doesn't matter + }); + + // request options + const request = { + 'method': 'DELETE', + 'data': data, + 'headers': { + 'Content-Type': 'application/json', + 'Content-Length': data.length + } }; - // send request + // send request this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); - } + } getWakeWords(callback) { this.httpsGet (`/api/wake-word?_=%t`, callback); @@ -1089,7 +1083,7 @@ class AlexaRemote extends EventEmitter { getSkills(callback) { // request options - let request = { + const request = { 'method': 'GET', 'headers': { 'Accept': 'application/vnd+amazon.uitoolkit+json;ns=1;fl=0' @@ -1123,7 +1117,7 @@ class AlexaRemote extends EventEmitter { value = new Date().getTime() + 5000; } - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return null; const now = new Date(); @@ -1167,40 +1161,52 @@ class AlexaRemote extends EventEmitter { parseValue4Notification(notification, value) { switch (typeof value) { case 'object': - notification = extend(notification, value); // we combine the objects - /* - { - 'alarmTime': 0, - 'createdDate': 1522585752734, - 'deferredAtTime': null, - 'deviceSerialNumber': 'G090LF09643202VS', - 'deviceType': 'A3S5BH2HU6VAYF', - 'geoLocationTriggerData': null, - 'id': 'A3S5BH2HU6VAYF-G090LF09643202VS-17ef9b04-cb1d-31ed-ab2c-245705d904be', - 'musicAlarmId': null, - 'musicEntity': null, - 'notificationIndex': '17ef9b04-cb1d-31ed-ab2c-245705d904be', - 'originalDate': '2018-04-01', - 'originalTime': '20:00:00.000', - 'provider': null, - 'recurringPattern': null, - 'remainingTime': 0, - 'reminderLabel': null, - 'sound': { - 'displayName': 'Countertop', - 'folder': null, - 'id': 'system_alerts_repetitive_04', - 'providerId': 'ECHO', - 'sampleUrl': 'https://s3.amazonaws.com/deeappservice.prod.notificationtones/system_alerts_repetitive_04.mp3' - }, - 'status': 'OFF', - 'timeZoneId': null, - 'timerLabel': null, - 'triggerTime': 0, - 'type': 'Alarm', - 'version': '4' + if (value instanceof Date) { + if (notification.type !== 'Timer') { + notification.alarmTime = value.getTime(); + notification.originalTime = `${_00 (value.getHours ())}:${_00 (value.getMinutes ())}:${_00 (value.getSeconds ())}.000`; + } + /*else { + let duration = value.getTime() - Date.now(); + if (duration < 0) duration = value.getTime(); + notification.remainingTime = duration; + }*/ + } else { + notification = extend(notification, value); // we combine the objects + /* + { + 'alarmTime': 0, + 'createdDate': 1522585752734, + 'deferredAtTime': null, + 'deviceSerialNumber': 'G090LF09643202VS', + 'deviceType': 'A3S5BH2HU6VAYF', + 'geoLocationTriggerData': null, + 'id': 'A3S5BH2HU6VAYF-G090LF09643202VS-17ef9b04-cb1d-31ed-ab2c-245705d904be', + 'musicAlarmId': null, + 'musicEntity': null, + 'notificationIndex': '17ef9b04-cb1d-31ed-ab2c-245705d904be', + 'originalDate': '2018-04-01', + 'originalTime': '20:00:00.000', + 'provider': null, + 'recurringPattern': null, + 'remainingTime': 0, + 'reminderLabel': null, + 'sound': { + 'displayName': 'Countertop', + 'folder': null, + 'id': 'system_alerts_repetitive_04', + 'providerId': 'ECHO', + 'sampleUrl': 'https://s3.amazonaws.com/deeappservice.prod.notificationtones/system_alerts_repetitive_04.mp3' + }, + 'status': 'OFF', + 'timeZoneId': null, + 'timerLabel': null, + 'triggerTime': 0, + 'type': 'Alarm', + 'version': '4' + } + */ } - */ break; case 'number': if (notification.type !== 'Timer') { @@ -1215,25 +1221,14 @@ class AlexaRemote extends EventEmitter { //notification.remainingTime = value; }*/ break; - case 'date': - if (notification.type !== 'Timer') { - notification.alarmTime = value.getTime(); - notification.originalTime = `${_00 (value.getHours ())}:${_00 (value.getMinutes ())}:${_00 (value.getSeconds ())}.000`; - } - /*else { - let duration = value.getTime() - Date.now(); - if (duration < 0) duration = value.getTime(); - notification.remainingTime = duration; - }*/ - break; case 'boolean': notification.status = value ? 'ON' : 'OFF'; break; - case 'string': - let ar = value.split(':'); + case 'string': { + const ar = value.split(':'); if (notification.type !== 'Timer') { - let date = new Date(notification.alarmTime); - date.setHours(parseInt(ar[0], 10), ar.length>1 ? parseInt(ar[1], 10) : 0, ar.length > 2 ? parseInt(ar[2], 10) : 0); + const date = new Date(notification.alarmTime); + date.setHours(parseInt(ar[0], 10), ar.length > 1 ? parseInt(ar[1], 10) : 0, ar.length > 2 ? parseInt(ar[2], 10) : 0); notification.alarmTime = date.getTime(); notification.originalTime = `${_00(date.getHours())}:${_00(date.getMinutes())}:${_00(date.getSeconds())}.000`; } @@ -1247,6 +1242,7 @@ class AlexaRemote extends EventEmitter { notification.remainingTime = duration; }*/ break; + } } const originalDateTime = notification.originalDate + ' ' + notification.originalTime; @@ -1262,42 +1258,42 @@ class AlexaRemote extends EventEmitter { } createNotification(notification, callback) { - let flags = { + const flags = { data: JSON.stringify(notification), method: 'PUT' }; this.httpsGet (`/api/notifications/createReminder`, function(err, res) { - // {'Message':null} - callback && callback(err, res); - }, - flags + // {'Message':null} + callback && callback(err, res); + }, + flags ); } changeNotification(notification, value, callback) { notification = this.parseValue4Notification(notification, value); - let flags = { + const flags = { data: JSON.stringify(notification), method: 'PUT' }; this.httpsGet (`/api/notifications/${notification.id}`, function(err, res) { - // {'Message':null} - callback && callback(err, res); - }, - flags + // {'Message':null} + callback && callback(err, res); + }, + flags ); } deleteNotification(notification, callback) { - let flags = { + const flags = { data: JSON.stringify (notification), method: 'DELETE' }; this.httpsGet (`/api/notifications/${notification.id}`, function(err, res) { - // {'Message':null} - callback && callback(err, res); - }, - flags + // {'Message':null} + callback && callback(err, res); + }, + flags ); } @@ -1310,7 +1306,7 @@ class AlexaRemote extends EventEmitter { // alarm volume getDeviceNotificationState(serialOrName, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/device-notification-state/${dev.deviceType}/${dev.softwareVersion}/${dev.serialNumber}&_=%t`, callback); @@ -1339,7 +1335,7 @@ class AlexaRemote extends EventEmitter { callback = contentType; contentType = 'station'; } - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); this.httpsGet (`/api/tunein/queue-and-play @@ -1349,8 +1345,8 @@ class AlexaRemote extends EventEmitter { &contentType=${contentType} &callSign= &mediaOwnerCustomerId=${dev.deviceOwnerCustomerId}`, - callback, - { method: 'POST' }); + callback, + { method: 'POST' }); } /** @@ -1371,66 +1367,66 @@ class AlexaRemote extends EventEmitter { `?startTime=${options.startTime || ''}` + `&size=${options.size || 1}` + `&offset=${options.offset || 1}`, - (err, result) => { - if (err || !result) return callback/*.length >= 2*/ && callback(err, result); - - let ret = []; - if (result.activities) { - for (let r = 0; r < result.activities.length; r++) { - let res = result.activities[r]; - let o = { - data: res - }; - try { - o.description = JSON.parse(res.description); - } catch (e) { - if (res.description) { - o.description = {'summary': res.description}; - } else { - return; - } + (err, result) => { + if (err || !result) return callback/*.length >= 2*/ && callback(err, result); + + const ret = []; + if (result.activities) { + for (let r = 0; r < result.activities.length; r++) { + const res = result.activities[r]; + const o = { + data: res + }; + try { + o.description = JSON.parse(res.description); + } catch (e) { + if (res.description) { + o.description = {'summary': res.description}; + } else { + return; } - if (!o.description) continue; - o.description.summary = (o.description.summary || '').trim(); - if (options.filter) { - switch (o.description.summary) { - case 'stopp': - case 'alexa': - case 'echo': - case 'computer': - case 'amazon': - case ',': - case '': - continue; - } + } + if (!o.description) continue; + o.description.summary = (o.description.summary || '').trim(); + if (options.filter) { + switch (o.description.summary) { + case 'stopp': + case 'alexa': + case 'echo': + case 'computer': + case 'amazon': + case ',': + case '': + continue; + } + } + for (let i = 0; i < res.sourceDeviceIds.length; i++) { + o.deviceSerialNumber = res.sourceDeviceIds[i].serialNumber; + if (!this.serialNumbers[o.deviceSerialNumber]) continue; + o.name = this.serialNumbers[o.deviceSerialNumber].accountName; + const dev = this.find(o.deviceSerialNumber); + const wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; + if (wakeWord && o.description.summary.startsWith(wakeWord)) { + o.description.summary = o.description.summary.substr(wakeWord.length).trim(); + } else if (o.description.summary.startsWith('alexa')) { + o.description.summary = o.description.summary.substr(5).trim(); } - for (let i = 0; i < res.sourceDeviceIds.length; i++) { - o.deviceSerialNumber = res.sourceDeviceIds[i].serialNumber; - if (!this.serialNumbers[o.deviceSerialNumber]) continue; - o.name = this.serialNumbers[o.deviceSerialNumber].accountName; - const dev = this.find(o.deviceSerialNumber); - let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; - if (wakeWord && o.description.summary.startsWith(wakeWord)) { - o.description.summary = o.description.summary.substr(wakeWord.length).trim(); - } else if (o.description.summary.startsWith('alexa')) { - o.description.summary = o.description.summary.substr(5).trim(); - } - o.deviceType = res.sourceDeviceIds[i].deviceType || null; - o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; - - o.creationTimestamp = res.creationTimestamp || null; - o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED - try { - o.domainAttributes = res.domainAttributes ? JSON.parse(res.domainAttributes) : null; - } catch (e) { - o.domainAttributes = res.domainAttributes || null; - } - if (o.description.summary || !options.filter) ret.push(o); + o.deviceType = res.sourceDeviceIds[i].deviceType || null; + o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; + + o.creationTimestamp = res.creationTimestamp || null; + o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED + try { + o.domainAttributes = res.domainAttributes ? JSON.parse(res.domainAttributes) : null; + } catch (e) { + o.domainAttributes = res.domainAttributes || null; } + if (o.description.summary || !options.filter) ret.push(o); } } - if (typeof callback === 'function') return callback (err, ret); } + if (typeof callback === 'function') return callback (err, ret); + } ); } @@ -1444,103 +1440,103 @@ class AlexaRemote extends EventEmitter { `&endTime=${options.endTime || Date.now() + 24 * 60 * 60 * 1000}` + `&recordType=${options.recordType || 'VOICE_HISTORY'}` + `&maxRecordSize=${options.maxRecordSize || 1}`, - (err, result) => { - if (err || !result) return callback/*.length >= 2*/ && callback(err, result); - - let ret = []; - if (result.customerHistoryRecords) { - for (let r = 0; r < result.customerHistoryRecords.length; r++) { - let res = result.customerHistoryRecords[r]; - let o = { - data: res - }; - const convParts = {}; - if (res.voiceHistoryRecordItems && Array.isArray(res.voiceHistoryRecordItems)) { - res.voiceHistoryRecordItems.forEach(item => { - convParts[item.recordItemType] = convParts[item.recordItemType] || []; - convParts[item.recordItemType].push(item); + (err, result) => { + if (err || !result) return callback/*.length >= 2*/ && callback(err, result); + + const ret = []; + if (result.customerHistoryRecords) { + for (let r = 0; r < result.customerHistoryRecords.length; r++) { + const res = result.customerHistoryRecords[r]; + const o = { + data: res + }; + const convParts = {}; + if (res.voiceHistoryRecordItems && Array.isArray(res.voiceHistoryRecordItems)) { + res.voiceHistoryRecordItems.forEach(item => { + convParts[item.recordItemType] = convParts[item.recordItemType] || []; + convParts[item.recordItemType].push(item); + }); + o.conversionDetails = convParts; + } + + const recordKey = res.recordKey.split('#'); // A3NSX4MMJVG96V#1612297041815#A1RABVCI4QCIKC#G0911W0793360TLG + + o.deviceType = recordKey[2] || null; + //o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; + o.creationTimestamp = res.timestamp || null; + //o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED + + o.deviceSerialNumber = recordKey[3]; + if (!this.serialNumbers[o.deviceSerialNumber]) continue; + o.name = this.serialNumbers[o.deviceSerialNumber].accountName; + const dev = this.find(o.deviceSerialNumber); + const wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; + + o.description = {'summary': ''}; + if (convParts.CUSTOMER_TRANSCRIPT || convParts.ASR_REPLACEMENT_TEXT) { + if (convParts.CUSTOMER_TRANSCRIPT) { + convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { + let text = trans.transcriptText; + if (wakeWord && text.startsWith(wakeWord)) { + text = text.substr(wakeWord.length).trim(); + } else if (text.startsWith('alexa')) { + text = text.substr(5).trim(); + } + o.description.summary += text + ', '; }); - o.conversionDetails = convParts; } - - const recordKey = res.recordKey.split('#'); // A3NSX4MMJVG96V#1612297041815#A1RABVCI4QCIKC#G0911W0793360TLG - - o.deviceType = recordKey[2] || null; - //o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; - o.creationTimestamp = res.timestamp || null; - //o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED - - o.deviceSerialNumber = recordKey[3]; - if (!this.serialNumbers[o.deviceSerialNumber]) continue; - o.name = this.serialNumbers[o.deviceSerialNumber].accountName; - const dev = this.find(o.deviceSerialNumber); - let wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; - - o.description = {'summary': ''}; - if (convParts.CUSTOMER_TRANSCRIPT || convParts.ASR_REPLACEMENT_TEXT) { - if (convParts.CUSTOMER_TRANSCRIPT) { - convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { - let text = trans.transcriptText; - if (wakeWord && text.startsWith(wakeWord)) { - text = text.substr(wakeWord.length).trim(); - } else if (text.startsWith('alexa')) { - text = text.substr(5).trim(); - } - o.description.summary += text + ', '; - }); - } - if (convParts.ASR_REPLACEMENT_TEXT) { - convParts.ASR_REPLACEMENT_TEXT.forEach(trans => { - let text = trans.transcriptText; - if (wakeWord && text.startsWith(wakeWord)) { - text = text.substr(wakeWord.length).trim(); - } else if (text.startsWith('alexa')) { - text = text.substr(5).trim(); - } - o.description.summary += text + ', '; - }); - } - o.description.summary = o.description.summary.substring(0, o.description.summary.length - 2).trim(); + if (convParts.ASR_REPLACEMENT_TEXT) { + convParts.ASR_REPLACEMENT_TEXT.forEach(trans => { + let text = trans.transcriptText; + if (wakeWord && text.startsWith(wakeWord)) { + text = text.substr(wakeWord.length).trim(); + } else if (text.startsWith('alexa')) { + text = text.substr(5).trim(); + } + o.description.summary += text + ', '; + }); } - o.alexaResponse = ''; - if (convParts.ALEXA_RESPONSE || convParts.TTS_REPLACEMENT_TEXT) { - if (convParts.ALEXA_RESPONSE) { - convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); - } - if (convParts.TTS_REPLACEMENT_TEXT) { - convParts.TTS_REPLACEMENT_TEXT.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); - } - o.alexaResponse = o.alexaResponse.substring(0, o.alexaResponse.length - 2).trim(); + o.description.summary = o.description.summary.substring(0, o.description.summary.length - 2).trim(); + } + o.alexaResponse = ''; + if (convParts.ALEXA_RESPONSE || convParts.TTS_REPLACEMENT_TEXT) { + if (convParts.ALEXA_RESPONSE) { + convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); } - if (options.filter) { - if (!o.description || !o.description.summary.length) continue; + if (convParts.TTS_REPLACEMENT_TEXT) { + convParts.TTS_REPLACEMENT_TEXT.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); + } + o.alexaResponse = o.alexaResponse.substring(0, o.alexaResponse.length - 2).trim(); + } + if (options.filter) { + if (!o.description || !o.description.summary.length) continue; - if (res.utteranceType === 'WAKE_WORD_ONLY') { - continue; - } - - switch (o.description.summary) { - case 'stopp': - case 'alexa': - case 'echo': - case 'computer': - case 'amazon': - case ',': - case '': - continue; - } + if (res.utteranceType === 'WAKE_WORD_ONLY') { + continue; } - if (o.description.summary || !options.filter) ret.push(o); + switch (o.description.summary) { + case 'stopp': + case 'alexa': + case 'echo': + case 'computer': + case 'amazon': + case ',': + case '': + continue; + } } + + if (o.description.summary || !options.filter) ret.push(o); } - if (typeof callback === 'function') return callback (err, ret); - }, - { - headers: { - 'authority': 'www.amazon.de' - } } + if (typeof callback === 'function') return callback (err, ret); + }, + { + headers: { + 'authority': 'www.amazon.de' + } + } ); } @@ -1605,10 +1601,10 @@ class AlexaRemote extends EventEmitter { } connectBluetooth(serialOrName, btAddress, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - let flags = { + const flags = { data: JSON.stringify({ bluetoothDeviceAddress: btAddress}), method: 'POST' }; @@ -1616,10 +1612,10 @@ class AlexaRemote extends EventEmitter { } disconnectBluetooth(serialOrName, btAddress, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - let flags = { + const flags = { //data: JSON.stringify({ bluetoothDeviceAddress: btAddress}), method: 'POST' }; @@ -1627,10 +1623,10 @@ class AlexaRemote extends EventEmitter { } setDoNotDisturb(serialOrName, enabled, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - let flags = { + const flags = { data: JSON.stringify({ deviceSerialNumber: dev.serialNumber, deviceType: dev.deviceType, @@ -1653,10 +1649,10 @@ class AlexaRemote extends EventEmitter { } setAlarmVolume(serialOrName, volume, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - let flags = { + const flags = { data: JSON.stringify ({ deviceSerialNumber: dev.serialNumber, deviceType: dev.deviceType, @@ -1672,7 +1668,7 @@ class AlexaRemote extends EventEmitter { return this.sendMessage(serialOrName, command, value, callback); } sendMessage(serialOrName, command, value, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); const commandObj = { contentFocusClientId: null }; @@ -1787,12 +1783,15 @@ class AlexaRemote extends EventEmitter { seqNode.skillId = 'amzn1.ask.1p.tellalexa'; seqNode.operationPayload.text = value.toString(); break; - case 'curatedtts': - let supportedValues = ["goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome"]; - if(!supportedValues.includes(value)) { return null } + case 'curatedtts': { + const supportedValues = ['goodbye', 'confirmations', 'goodmorning', 'compliments', 'birthday', 'goodnight', 'iamhome']; + if (!supportedValues.includes(value)) { + return null; + } seqNode.type = 'Alexa.CannedTts.Speak'; seqNode.operationPayload.cannedTtsStringId = `alexa.cannedtts.speak.curatedtts-category-${value}/alexa.cannedtts.speak.curatedtts-random`; break; + } case 'volume': seqNode.type = 'Alexa.DeviceControls.Volume'; value = ~~value; @@ -1805,8 +1804,8 @@ class AlexaRemote extends EventEmitter { seqNode.type = 'Alexa.DeviceControls.Stop'; seqNode.operationPayload.devices = [ { - "deviceSerialNumber": deviceSerialNumber, - "deviceType": deviceType + 'deviceSerialNumber': deviceSerialNumber, + 'deviceType': deviceType } ]; seqNode.operationPayload.isAssociatedDevice = false; @@ -1856,7 +1855,7 @@ class AlexaRemote extends EventEmitter { } seqNode.operationPayload.textToSpeak = value; break; - case 'skill': + case 'skill': seqNode.type = 'Alexa.Operation.SkillConnections.Launch'; if (typeof value !== 'string') value = String(value); if (value.length === 0) { @@ -1866,11 +1865,11 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.targetDevice = { deviceType: seqNode.operationPayload.deviceType, deviceSerialNumber: seqNode.operationPayload.deviceSerialNumber - } + }; seqNode.operationPayload.connectionRequest = { uri: `connection://AMAZON.Launch/${value}`, input: {} - } + }; seqNode.name = null; delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; @@ -1909,23 +1908,23 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.expireAfter = 'PT5S'; seqNode.operationPayload.content = [ { - "locale": "de-DE", - "display": { - "title": "ioBroker", - "body": value.replace(/<[^>]+>/g, '') + 'locale': 'de-DE', + 'display': { + 'title': 'ioBroker', + 'body': value.replace(/<[^>]+>/g, '') }, - "speak": { - "type": (command === 'ssml') ? 'ssml' : 'text', - "value": value + 'speak': { + 'type': (command === 'ssml') ? 'ssml' : 'text', + 'value': value } } ]; seqNode.operationPayload.target = { - "customerId": deviceOwnerCustomerId, - "devices": [ + 'customerId': deviceOwnerCustomerId, + 'devices': [ { - "deviceSerialNumber": deviceSerialNumber, - "deviceTypeId": deviceType + 'deviceSerialNumber': deviceSerialNumber, + 'deviceTypeId': deviceType } ] }; @@ -1935,8 +1934,8 @@ class AlexaRemote extends EventEmitter { const currDevice = this.find(deviceId); if (!currDevice) return; seqNode.operationPayload.target.devices.push({ - "deviceSerialNumber": currDevice.serialNumber, - "deviceTypeId": currDevice.deviceType + 'deviceSerialNumber': currDevice.serialNumber, + 'deviceTypeId': currDevice.deviceType }); }); } @@ -1962,8 +1961,8 @@ class AlexaRemote extends EventEmitter { } if (!sequenceType) sequenceType = 'SerialNode'; // or ParallelNode - let nodes = []; - for (let command of commands) { + const nodes = []; + for (const command of commands) { const commandNode = this.createSequenceNode(command.command, command.value, command.device ? command.device : serialOrName, overrideCustomerId, callback); if (commandNode) nodes.push(commandNode); } @@ -1988,7 +1987,7 @@ class AlexaRemote extends EventEmitter { overrideCustomerId = null; } - let dev = this.find(Array.isArray(serialOrName) ? serialOrName[0] : serialOrName); + const dev = this.find(Array.isArray(serialOrName) ? serialOrName[0] : serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); if (typeof value === 'function') { @@ -2054,7 +2053,7 @@ class AlexaRemote extends EventEmitter { } playMusicProvider(serialOrName, providerId, searchPhrase, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); if (searchPhrase === '') return callback && callback(new Error('Searchphrase empty'), null); @@ -2111,7 +2110,7 @@ class AlexaRemote extends EventEmitter { // "status": 1 // }] - let message = [{ + const message = [{ conversationId: 'amzn1.comms.messaging.id.conversationV2~' + uuidv1(), clientMessageId: uuidv1(), messageId: 0.001, @@ -2134,7 +2133,7 @@ class AlexaRemote extends EventEmitter { } deleteConversation(conversationId, callback) { - let flags = { + const flags = { method: 'DELETE' }; this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}`, callback, flags); @@ -2202,10 +2201,10 @@ class AlexaRemote extends EventEmitter { renameDevice(serialOrName, newName, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - let o = { + const o = { accountName: newName, serialNumber: dev.serialNumber, deviceAccountId: dev.deviceAccountId, @@ -2222,7 +2221,7 @@ class AlexaRemote extends EventEmitter { } deleteSmarthomeDevice(smarthomeDevice, callback) { - let flags = { + const flags = { method: 'DELETE' //data: JSON.stringify (o), }; @@ -2230,7 +2229,7 @@ class AlexaRemote extends EventEmitter { } deleteSmarthomeGroup(smarthomeGroup, callback) { - let flags = { + const flags = { method: 'DELETE' //data: JSON.stringify (o), }; @@ -2238,7 +2237,7 @@ class AlexaRemote extends EventEmitter { } deleteAllSmarthomeDevices(callback) { - let flags = { + const flags = { method: 'DELETE' //data: JSON.stringify (o), }; @@ -2246,7 +2245,7 @@ class AlexaRemote extends EventEmitter { } discoverSmarthomeDevice(callback) { - let flags = { + const flags = { method: 'POST' //data: JSON.stringify (o), }; @@ -2259,16 +2258,16 @@ class AlexaRemote extends EventEmitter { entityType = 'APPLIANCE'; // other value 'GROUP' } - let reqArr = []; + const reqArr = []; if (!Array.isArray(applicanceIds)) applicanceIds = [applicanceIds]; - for (let id of applicanceIds) { + for (const id of applicanceIds) { reqArr.push({ 'entityId': id, 'entityType': entityType }); } - let flags = { + const flags = { method: 'POST', data: JSON.stringify ({ 'stateRequests': reqArr @@ -2305,9 +2304,9 @@ class AlexaRemote extends EventEmitter { entityType = 'APPLIANCE'; // other value 'GROUP' } - let reqArr = []; + const reqArr = []; if (!Array.isArray(entityIds)) entityIds = [entityIds]; - for (let id of entityIds) { + for (const id of entityIds) { reqArr.push({ 'entityId': id, 'entityType': entityType, @@ -2315,7 +2314,7 @@ class AlexaRemote extends EventEmitter { }); } - let flags = { + const flags = { method: 'PUT', data: JSON.stringify ({ 'controlRequests': reqArr @@ -2351,10 +2350,10 @@ class AlexaRemote extends EventEmitter { unpaireBluetooth(serialOrName, btAddress, callback) { - let dev = this.find(serialOrName); + const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - let flags = { + const flags = { method: 'POST', data: JSON.stringify ({ bluetoothDeviceAddress: btAddress, @@ -2365,10 +2364,10 @@ class AlexaRemote extends EventEmitter { } deleteDevice(serialOrName, callback) { - let dev = this.find(serialOrName, callback); + const dev = this.find(serialOrName, callback); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - let flags = { + const flags = { method: 'DELETE', data: JSON.stringify ({ deviceType: dev.deviceType diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 15b23b99..f8cfc8de 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -1,8 +1,3 @@ -/* jshint -W097 */ -/* jshint -W030 */ -/* jshint strict: false */ -/* jslint node: true */ -/* jslint esversion: 6 */ const WebSocket = require('ws'); const EventEmitter = require('events'); const crypto = require('crypto'); @@ -215,7 +210,7 @@ class AlexaWsMqtt extends EventEmitter { this.errorRetryCounter++; } - let retryDelay = Math.min(60, (this.errorRetryCounter * 5) + 5); + const retryDelay = Math.min(60, (this.errorRetryCounter * 5) + 5); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Retry Connection in ' + retryDelay + 's'); this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); this.reconnectTimeout && clearTimeout(this.reconnectTimeout); @@ -273,7 +268,7 @@ class AlexaWsMqtt extends EventEmitter { return; } this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming RAW message: ' + data.toString('hex')); - let message = this.parseIncomingMessage(data); + const message = this.parseIncomingMessage(data); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Incoming message: ' + JSON.stringify(message)); if (msgCounter === 0) { // initialization @@ -317,7 +312,7 @@ class AlexaWsMqtt extends EventEmitter { if (msgCounter === 1) { if (this.protocolName === 'A:H') { //let msg = new Buffer('MSG 0x00000362 0x0e414e46 f 0x00000001 0xf904b9f5 0x00000109 GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE'); - let msg = this.encodeGWRegisterAH(); + const msg = this.encodeGWRegisterAH(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 4 (Register Connection) sent'); //console.log('SEND: ' + msg.toString('ascii')); await this.sendWs(msg); @@ -329,7 +324,7 @@ class AlexaWsMqtt extends EventEmitter { } //msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" - let msg = this.encodePing(); + const msg = this.encodePing(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send First Ping'); //console.log('SEND: ' + msg.toString('hex')); this.websocket.send(msg); @@ -337,7 +332,7 @@ class AlexaWsMqtt extends EventEmitter { this.pingPongInterval = setInterval(() => { if (!this.websocket) return; //let msg = new Buffer('4D53472030783030303030303635203078306534313465343720662030783030303030303031203078626332666262356620307830303030303036322050494E00000000D1098D8CD1098D8C000000070052006500670075006C0061007246414245', 'hex'); // "MSG 0x00000065 0x0e414e47 f 0x00000001 0xbc2fbb5f 0x00000062 PIN" + 30 + "FABE" - let msg = this.encodePing(); + const msg = this.encodePing(); this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Send Ping'); //console.log('SEND: ' + msg.toString('hex')); this.websocket.send(msg); @@ -371,8 +366,8 @@ class AlexaWsMqtt extends EventEmitter { return; } else if (message.content && message.content.payload) { - let command = message.content.payload.command; - let payload = message.content.payload.payload; + const command = message.content.payload.command; + const payload = message.content.payload.payload; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Command ' + command + ': ' + JSON.stringify(payload, null, 4)); this.emit('command', command, payload); @@ -391,16 +386,17 @@ class AlexaWsMqtt extends EventEmitter { } generateUUID() { - for (var a = [], b = 0; 36 > b; b++) { - var c = "rrrrrrrr-rrrr-4rrr-srrr-rrrrrrrrrrrr".charAt(b); - if ("r" === c || "s" === c) { - var d = Math.floor(16 * Math.random()); - "s" === c && (d = d & 3 | 8); + const a = []; + for (let b = 0; 36 > b; b++) { + const c = 'rrrrrrrr-rrrr-4rrr-srrr-rrrrrrrrrrrr'.charAt(b); + if ('r' === c || 's' === c) { + let d = Math.floor(16 * Math.random()); + 's' === c && (d = d & 3 | 8); a.push(d.toString(16)); } else a.push(c); } - return a.join(""); + return a.join(''); } encodeGWHandshake() { @@ -408,19 +404,19 @@ class AlexaWsMqtt extends EventEmitter { this.messageId++; let msg = 'MSG 0x00000361 '; // Message-type and Channel = GW_HANDSHAKE_CHANNEL; msg += this.encodeNumber(this.messageId) + ' f 0x00000001 '; - let idx1 = msg.length; + const idx1 = msg.length; msg += '0x00000000 '; // Checksum! - let idx2 = msg.length; + const idx2 = msg.length; msg += '0x0000009b '; // length content msg += 'INI 0x00000003 1.0 0x00000024 '; // content part 1 msg += this.generateUUID(); msg += ' '; msg += this.encodeNumber(Date.now(), 16); msg += ' END FABE'; - let completeBuffer = Buffer.from(msg, 'ascii'); + const completeBuffer = Buffer.from(msg, 'ascii'); - let checksum = this.computeChecksum(completeBuffer, idx1, idx2); - let checksumBuf = Buffer.from(this.encodeNumber(checksum)); + const checksum = this.computeChecksum(completeBuffer, idx1, idx2); + const checksumBuf = Buffer.from(this.encodeNumber(checksum)); checksumBuf.copy(completeBuffer, 39); return completeBuffer; } @@ -430,15 +426,15 @@ class AlexaWsMqtt extends EventEmitter { this.messageId++; let msg = 'MSG 0x00000362 '; // Message-type and Channel = GW_CHANNEL; msg += this.encodeNumber(this.messageId) + ' f 0x00000001 '; - let idx1 = msg.length; + const idx1 = msg.length; msg += '0x00000000 '; // Checksum! - let idx2 = msg.length; + const idx2 = msg.length; msg += '0x00000109 '; // length content msg += 'GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE'; - let completeBuffer = Buffer.from(msg, 'ascii'); + const completeBuffer = Buffer.from(msg, 'ascii'); - let checksum = this.computeChecksum(completeBuffer, idx1, idx2); - let checksumBuf = Buffer.from(this.encodeNumber(checksum)); + const checksum = this.computeChecksum(completeBuffer, idx1, idx2); + const checksumBuf = Buffer.from(this.encodeNumber(checksum)); checksumBuf.copy(completeBuffer, 39); return completeBuffer; } @@ -455,7 +451,7 @@ class AlexaWsMqtt extends EventEmitter { completeBuffer.writeUInt32BE(0x000000e4, 20); // length content completeBuffer.write('GWM MSG 0x0000b479 0x0000003b urn:tcomm-endpoint:device:deviceType:0:deviceSerialNumber:0 0x00000041 urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService {"command":"REGISTER_CONNECTION"}FABE', 24, 'ascii'); - let checksum = this.computeChecksum(completeBuffer, 16, 20); + const checksum = this.computeChecksum(completeBuffer, 16, 20); completeBuffer.writeUInt32BE(checksum, 16); // Checksum! return completeBuffer; } @@ -477,22 +473,22 @@ class AlexaWsMqtt extends EventEmitter { this.messageId++; let msg = 'MSG 0x00000065 '; // Message-type and Channel = CHANNEL_FOR_HEARTBEAT; msg += this.encodeNumber(this.messageId) + ' f 0x00000001 '; - let idx1 = msg.length; + const idx1 = msg.length; msg += '0x00000000 '; // Checksum! - let idx2 = msg.length; + const idx2 = msg.length; msg+= '0x00000062 '; // length content - let completeBuffer = Buffer.alloc(0x62, 0); - let startBuffer = Buffer.from(msg, 'ascii'); + const completeBuffer = Buffer.alloc(0x62, 0); + const startBuffer = Buffer.from(msg, 'ascii'); startBuffer.copy(completeBuffer); const header = 'PIN'; const payload = 'Regular'; // g = h.length - let n = new ArrayBuffer(header.length + 4 + 8 + 4 + 2 * payload.length); + const n = new ArrayBuffer(header.length + 4 + 8 + 4 + 2 * payload.length); let idx = 0; let u = new Uint8Array(n, idx, header.length); - let l = 0; - let e = Date.now(); + const l = 0; + const e = Date.now(); for (let q = 0; q < header.length; q++) u[q] = header.charCodeAt(q); idx += header.length; @@ -508,14 +504,14 @@ class AlexaWsMqtt extends EventEmitter { u[q * 2] = 0; u[q * 2 + 1] = payload.charCodeAt(q); } - let buf = Buffer.from(n); + const buf = Buffer.from(n); buf.copy(completeBuffer, msg.length); - let buf2End = Buffer.from('FABE', 'ascii'); + const buf2End = Buffer.from('FABE', 'ascii'); buf2End.copy(completeBuffer, msg.length + buf.length); - let checksum = this.computeChecksum(completeBuffer, idx1, idx2); - let checksumBuf = Buffer.from(this.encodeNumber(checksum)); + const checksum = this.computeChecksum(completeBuffer, idx1, idx2); + const checksumBuf = Buffer.from(this.encodeNumber(checksum)); checksumBuf.copy(completeBuffer, 39); return completeBuffer; } @@ -538,11 +534,11 @@ class AlexaWsMqtt extends EventEmitter { const header = 'PIN'; const payload = 'Regular'; // g = h.length - let n = new ArrayBuffer(header.length + 4 + 8 + 4 + 2 * payload.length); + const n = new ArrayBuffer(header.length + 4 + 8 + 4 + 2 * payload.length); let idx = 0; let u = new Uint8Array(n, idx, header.length); - let l = 0; - let e = Date.now(); + const l = 0; + const e = Date.now(); for (let q = 0; q < header.length; q++) u[q] = header.charCodeAt(q); idx += header.length; @@ -558,12 +554,12 @@ class AlexaWsMqtt extends EventEmitter { u[q * 2] = 0; u[q * 2 + 1] = payload.charCodeAt(q); } - let buf = Buffer.from(n); + const buf = Buffer.from(n); buf.copy(completeBuffer, 24); completeBuffer.write('FABE', buf.length + 24, 'ascii'); - let checksum = this.computeChecksum(completeBuffer, 16, 20); + const checksum = this.computeChecksum(completeBuffer, 16, 20); completeBuffer.writeUInt32BE(checksum, 16); // Checksum! return completeBuffer; } @@ -579,9 +575,10 @@ class AlexaWsMqtt extends EventEmitter { return a; } - if (k < f) throw "Invalid checksum exclusion window!"; + if (k < f) throw 'Invalid checksum exclusion window!'; a = new Uint8Array(a); - for (var h = 0, l = 0, e = 0; e < a.length; e++) e != f ? (l += c(a[e] << ((e & 3 ^ 3) << 3)), h += b(l, 32), l = c(l & 4294967295)) : e = k - 1; + let h = 0, l = 0; + for (let e = 0; e < a.length; e++) e != f ? (l += c(a[e] << ((e & 3 ^ 3) << 3)), h += b(l, 32), l = c(l & 4294967295)) : e = k - 1; for (; h;) l += h, h = b(l, 32), l &= 4294967295; return c(l); } @@ -612,14 +609,16 @@ class AlexaWsMqtt extends EventEmitter { if (message.service === 'TUNE') { message.checksum = readHex(idx, 10); idx += 11; // 10 + delimiter; - let contentLength = readHex(idx, 10); + const contentLength = readHex(idx, 10); idx += 11; // 10 + delimiter; message.content = readString(idx, contentLength - 4 - idx); if (message.content.startsWith('{') && message.content.endsWith('}')) { try { message.content = JSON.parse(message.content); } - catch (e) {} + catch (e) { + // ignore + } } } else if (message.service === 'FABE') { @@ -636,7 +635,7 @@ class AlexaWsMqtt extends EventEmitter { message.checksum = readHex(idx, 10); idx += 11; // 10 + delimiter; - let contentLength = readHex(idx, 10); + //const contentLength = readHex(idx, 10); idx += 11; // 10 + delimiter; message.content = {}; @@ -692,7 +691,9 @@ class AlexaWsMqtt extends EventEmitter { message.content.payload.payload = JSON.parse(message.content.payload.payload); } } - catch (e) {} + catch (e) { + // Ignore + } } } } @@ -726,14 +727,16 @@ class AlexaWsMqtt extends EventEmitter { if (message.service === 'TUNE') { message.checksum = readHex(idx, 10); idx += 11; // 10 + delimiter; - let contentLength = readHex(idx, 10); + const contentLength = readHex(idx, 10); idx += 11; // 10 + delimiter; message.content = readString(idx, contentLength - 4 - idx); if (message.content.startsWith('{') && message.content.endsWith('}')) { try { message.content = JSON.parse(message.content); } - catch (e) {} + catch (e) { + // Ignore + } } } else if (message.service === 'FABE') { @@ -744,7 +747,7 @@ class AlexaWsMqtt extends EventEmitter { message.seq = data.readUInt32BE(12); message.checksum = data.readUInt32BE(16); - let contentLength = data.readUInt32BE(20); + //const contentLength = data.readUInt32BE(20); message.content = {}; message.content.messageType = readString(24, 3); @@ -801,7 +804,9 @@ class AlexaWsMqtt extends EventEmitter { message.content.payload.payload = JSON.parse(message.content.payload.payload); } } - catch (e) {} + catch (e) { + // Ignore + } } } } diff --git a/package-lock.json b/package-lock.json index f294fd14..40b8235b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -90,6 +90,17 @@ "fs-extra": "^10.0.0" } }, + "@alcalzone/release-script-plugin-license": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.4.1.tgz", + "integrity": "sha512-e5E/BLH8Jrjk7SSR08BvK+t+Y5acY4zBy5Li3/kLt3eYA/md8mXoOu83KHbWVxHzXvQEnpAPdkIeKSMmqf9gqg==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.4.1", + "fs-extra": "^10.0.0", + "tiny-glob": "^0.2.9" + } + }, "@alcalzone/release-script-plugin-package": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.4.1.tgz", @@ -114,6 +125,74 @@ "tiny-glob": "^0.2.9" } }, + "@eslint/eslintrc": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", + "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@types/http-proxy": { "version": "1.17.7", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", @@ -136,6 +215,30 @@ "negotiator": "0.6.2" } }, + "acorn": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "alcalzone-shared": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.0.tgz", @@ -196,6 +299,12 @@ "color-convert": "^2.0.1" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -216,6 +325,12 @@ "follow-redirects": "^1.14.0" } }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -233,6 +348,16 @@ "type-is": "~1.6.17" } }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", @@ -256,6 +381,22 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -288,6 +429,12 @@ "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", @@ -346,6 +493,12 @@ "ms": "2.0.0" } }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -356,6 +509,15 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -392,6 +554,149 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", + "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.0.4", + "@humanwhocodes/config-array": "^0.6.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^6.0.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "eslint-scope": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", + "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true + }, + "espree": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", + "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "dev": true, + "requires": { + "acorn": "^8.5.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.0.0" + } + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -468,6 +773,33 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -490,6 +822,22 @@ "unpipe": "~1.0.0" } }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "dev": true + }, "follow-redirects": { "version": "1.14.4", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", @@ -516,6 +864,18 @@ "universalify": "^2.0.0" } }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -528,6 +888,38 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, "globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -546,6 +938,12 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "http-errors": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", @@ -608,6 +1006,38 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -664,6 +1094,27 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -674,6 +1125,22 @@ "universalify": "^2.0.0" } }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -737,11 +1204,26 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", @@ -764,6 +1246,15 @@ "ee-first": "1.1.1" } }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, "onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -773,11 +1264,40 @@ "mimic-fn": "^2.1.0" } }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -794,11 +1314,23 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -808,6 +1340,12 @@ "ipaddr.js": "1.9.1" } }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -848,6 +1386,12 @@ "util-deprecate": "~1.0.1" } }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -859,6 +1403,21 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -997,6 +1556,27 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "tiny-glob": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", @@ -1020,6 +1600,21 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -1045,6 +1640,15 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -1060,6 +1664,12 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -1074,6 +1684,12 @@ "isexe": "^2.0.0" } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -1085,6 +1701,12 @@ "strip-ansi": "^6.0.0" } }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, "ws": { "version": "8.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", diff --git a/package.json b/package.json index 40a285ec..9fe33f80 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,9 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^3.4.1" + "@alcalzone/release-script": "^3.4.1", + "@alcalzone/release-script-plugin-license": "^3.4.1", + "eslint": "^8.2.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From ee2ea56e450cee4e20f376dbc5f4c519decafff0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 13 Nov 2021 20:31:57 +0100 Subject: [PATCH 195/356] chore: release v4.1.0 * (Apollon77) SequenceNodes created for a device are now bound to the "deviceOwnCustomer" - should help in mixed owner groups --- README.md | 3 +-- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fe8f461e..63a832ec 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.1.0 (2021-11-13) * (Apollon77) SequenceNodes created for a device are now bound to the "deviceOwnCustomer" - should help in mixed owner groups ### 4.0.4 (2021-11-06) diff --git a/package-lock.json b/package-lock.json index 40b8235b..c323274f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.4", + "version": "4.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9fe33f80..68aa0ac2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.0.4", + "version": "4.1.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 80ecebe1a45de9da7119e3a699286e6cdcfd4ae0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 13 Nov 2021 21:22:18 +0100 Subject: [PATCH 196/356] * (Apollon77) Prevent crash case in edge cases when unexpected WSMQTT responses are received --- README.md | 4 ++++ alexa-wsmqtt.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 63a832ec..fb40ed2e 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Prevent crash case in edge cases when unexpected WSMQTT responses are received + ### 4.1.0 (2021-11-13) * (Apollon77) SequenceNodes created for a device are now bound to the "deviceOwnCustomer" - should help in mixed owner groups diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index f8cfc8de..da3fdf53 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -259,8 +259,8 @@ class AlexaWsMqtt extends EventEmitter { this.websocket && this.websocket.terminate(); }); - this.websocket.on('unexpected-response', (request, response) => { - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + JSON.stringify(response)); + this.websocket.on('unexpected-response', () => { + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response'); }); this.websocket.on('message', async (data) => { From ad145e5d07fc97ea6d66d776136193a9b061a7d9 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 13 Nov 2021 21:22:32 +0100 Subject: [PATCH 197/356] chore: release v4.1.1 * (Apollon77) Prevent crash case in edge cases when unexpected WSMQTT responses are received --- README.md | 3 +-- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fb40ed2e..d2874db7 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.1.1 (2021-11-13) * (Apollon77) Prevent crash case in edge cases when unexpected WSMQTT responses are received ### 4.1.0 (2021-11-13) diff --git a/package-lock.json b/package-lock.json index c323274f..e1166b33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.1.0", + "version": "4.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 68aa0ac2..12a643ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.1.0", + "version": "4.1.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 5dceca79668caa66e124d77292125848e889c19c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Dec 2021 03:03:58 +0000 Subject: [PATCH 198/356] chore(deps-dev): bump eslint from 8.2.0 to 8.3.0 (#146) --- package-lock.json | 52 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index e1166b33..faac3fcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -143,9 +143,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -171,9 +171,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -216,9 +216,9 @@ } }, "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true }, "acorn-jsx": { @@ -561,9 +561,9 @@ "dev": true }, "eslint": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.2.0.tgz", - "integrity": "sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", + "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", "dev": true, "requires": { "@eslint/eslintrc": "^1.0.4", @@ -575,10 +575,10 @@ "doctrine": "^3.0.0", "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", + "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.1.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -607,9 +607,9 @@ }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -624,9 +624,9 @@ } }, "eslint-scope": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-6.0.0.tgz", - "integrity": "sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -657,14 +657,14 @@ "dev": true }, "espree": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.0.0.tgz", - "integrity": "sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", + "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", "dev": true, "requires": { - "acorn": "^8.5.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.0.0" + "eslint-visitor-keys": "^3.1.0" } }, "esquery": { diff --git a/package.json b/package.json index 12a643ed..750a7fad 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.4.1", "@alcalzone/release-script-plugin-license": "^3.4.1", - "eslint": "^8.2.0" + "eslint": "^8.3.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 6145c1b6b015122863c26d0a45de110cf71a16da Mon Sep 17 00:00:00 2001 From: TactfulElf Date: Wed, 22 Dec 2021 21:19:23 +0000 Subject: [PATCH 199/356] Allow csrf to be updated on cookie refresh and add 401 error handling --- alexa-remote.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 6be529a3..efe3580e 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -49,8 +49,7 @@ class AlexaRemote extends EventEmitter { if (!this.cookie || typeof this.cookie !== 'string') return; let ar = this.cookie.match(/csrf=([^;]+)/); - if (!ar || ar.length < 2) ar = this.cookie.match(/csrf=([^;]+)/); - if (!this.csrf && ar && ar.length >= 2) { + if (ar && ar.length >= 2) { this.csrf = ar[1]; } if (!this.csrf) { @@ -757,6 +756,11 @@ class AlexaRemote extends EventEmitter { httpsGetCall(path, callback, flags = {}) { const handleResponse = (err, res, body) => { + if (!err && typeof res.statusCode === 'number' && res.statusCode == 401) { + this._options.logger && this._options.logger('Alexa-Remote: Response: 401 Unauthorized'); + return callback(new Error('401 Unauthorized'), null); + } + if (err || !body) { // Method 'DELETE' may return HTTP STATUS 200 without body this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); return typeof res.statusCode === 'number' && res.statusCode >= 200 && res.statusCode < 300 ? callback(null, {'success': true}) : callback(new Error('no body'), null); From d0dc8ec407ed666a8042102d8afbe39743793fd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jan 2022 03:00:57 +0000 Subject: [PATCH 200/356] chore(deps): bump actions/setup-node from 2.4.1 to 2.5.1 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.4.1 to 2.5.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.4.1...v2.5.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 9976640e..270d8f2b 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.4.1 + uses: actions/setup-node@v2.5.1 with: node-version: ${{ matrix.node-version }} @@ -59,7 +59,7 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.4.1 + uses: actions/setup-node@v2.5.1 with: node-version: ${{ matrix.node-version }} From b325ebc1a647bb828d4a19eed380519391132255 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jan 2022 03:02:10 +0000 Subject: [PATCH 201/356] chore(deps-dev): bump eslint from 8.3.0 to 8.6.0 (#150) --- package-lock.json | 42 +++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index faac3fcb..b8fe4040 100644 --- a/package-lock.json +++ b/package-lock.json @@ -126,14 +126,14 @@ } }, "@eslint/eslintrc": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", - "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.0.0", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", @@ -160,12 +160,12 @@ } }, "@humanwhocodes/config-array": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", - "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -216,9 +216,9 @@ } }, "acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true }, "acorn-jsx": { @@ -561,13 +561,13 @@ "dev": true }, "eslint": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", - "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz", + "integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.4", - "@humanwhocodes/config-array": "^0.6.0", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -578,7 +578,7 @@ "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.1.0", - "espree": "^9.1.0", + "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -657,12 +657,12 @@ "dev": true }, "espree": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", - "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", + "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", "dev": true, "requires": { - "acorn": "^8.6.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^3.1.0" } diff --git a/package.json b/package.json index 750a7fad..32ea4e5c 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.4.1", "@alcalzone/release-script-plugin-license": "^3.4.1", - "eslint": "^8.3.0" + "eslint": "^8.6.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 6016518d725ab29e0fc63b9b1662735ead5f0f47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jan 2022 04:13:53 +0000 Subject: [PATCH 202/356] chore(deps-dev): bump @alcalzone/release-script from 3.4.1 to 3.4.2 (#151) --- package-lock.json | 50 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index b8fe4040..3c17df45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,16 +30,16 @@ } }, "@alcalzone/release-script": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.4.1.tgz", - "integrity": "sha512-HGOOfgJp1LXBRPzTCqcJb1MqJFZqrKyN6GW4q4dn0a/Iq9JeS3nnMlxe8yhRlZKbHm/p6n7ws+2Wxx8RKE4cpw==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.4.2.tgz", + "integrity": "sha512-SpQhbKu2lUDUaneRu6+yc2PSnH26VIyyry/E6ZAUDSBE07nySB5pz0g2UAHlLPrX4qwF9ABfAIi/QXCCd22P9w==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.4.1", "@alcalzone/release-script-plugin-changelog": "3.4.1", "@alcalzone/release-script-plugin-exec": "3.4.1", "@alcalzone/release-script-plugin-git": "3.4.1", - "@alcalzone/release-script-plugin-package": "3.4.1", + "@alcalzone/release-script-plugin-package": "3.4.2", "@alcalzone/release-script-plugin-version": "3.4.1", "alcalzone-shared": "^4.0.0", "axios": "^0.21.4", @@ -102,9 +102,9 @@ } }, "@alcalzone/release-script-plugin-package": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.4.1.tgz", - "integrity": "sha512-6iciRFjdGyhIMMexb8EfOns0gl0kaRdbkBB13DMN9ggLoAqwTCNi3Bd+cGYQP9sGK33L5pkcuZXoysJe12lIkQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.4.2.tgz", + "integrity": "sha512-NIcVB9QjNHfbDQtczcNqnks6PhR7eQG5WvmOvuS9XQd5f2++ymi8WO0zTLKuoS3TwIjWP2B9Ae9LxqdPa745EA==", "dev": true, "requires": { "@alcalzone/pak": "^0.7.0", @@ -240,18 +240,18 @@ } }, "alcalzone-shared": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.0.tgz", - "integrity": "sha512-UJ/8eEd4sZwjmMpV4PahmDS5U05UdqWPYJxT+a8xNOTqnNn4vgbuyFMNX1kSx2KKiwX3yJi5QkISS3kY7pXWfQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.1.tgz", + "integrity": "sha512-6t0LFCIGvBG24grbV93Y1+MJjoyqgUpPOp/PkOcal1ZXXUUMEaZKPu6NfN6e3x5k2P2mnNaY2eXn/VmpWDLzYA==", "dev": true, "requires": { - "debug": "^4.3.1" + "debug": "^4.3.2" }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -1508,9 +1508,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1725,24 +1725,24 @@ "dev": true }, "yargs": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz", - "integrity": "sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==", + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", "dev": true, "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.0.0" } }, "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", "dev": true } } diff --git a/package.json b/package.json index 32ea4e5c..07d68ade 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^3.4.1", + "@alcalzone/release-script": "^3.4.2", "@alcalzone/release-script-plugin-license": "^3.4.1", "eslint": "^8.6.0" }, From 3dfdd3b82740ffcffd68e41b08d20b056ad30e51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 20:32:17 +0000 Subject: [PATCH 203/356] chore(deps): bump follow-redirects from 1.14.4 to 1.14.7 (#153) --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c17df45..ce79d95e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -839,9 +839,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", - "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", + "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" }, "forwarded": { "version": "0.2.0", From fb2a6555c5c3d569de259e283fca7592fd4f2992 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 03:02:10 +0000 Subject: [PATCH 204/356] chore(deps-dev): bump @alcalzone/release-script-plugin-license (#155) --- package-lock.json | 19 +++++++++++++++---- package.json | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce79d95e..c4a1b1ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -91,14 +91,25 @@ } }, "@alcalzone/release-script-plugin-license": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.4.1.tgz", - "integrity": "sha512-e5E/BLH8Jrjk7SSR08BvK+t+Y5acY4zBy5Li3/kLt3eYA/md8mXoOu83KHbWVxHzXvQEnpAPdkIeKSMmqf9gqg==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.0.tgz", + "integrity": "sha512-WfsIcNHXIwhMyxq0Mz27gvw4Q58Qs7mGzCDePpYKsYJNopojuFoY62cDitr7beYLqMTIWViAmVfZLIfq88LPFA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.4.1", + "@alcalzone/release-script-core": "3.5.0", "fs-extra": "^10.0.0", "tiny-glob": "^0.2.9" + }, + "dependencies": { + "@alcalzone/release-script-core": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", + "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", + "dev": true, + "requires": { + "execa": "^5.1.1" + } + } } }, "@alcalzone/release-script-plugin-package": { diff --git a/package.json b/package.json index 07d68ade..040237a9 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@alcalzone/release-script": "^3.4.2", - "@alcalzone/release-script-plugin-license": "^3.4.1", + "@alcalzone/release-script-plugin-license": "^3.5.0", "eslint": "^8.6.0" }, "scripts": { From e383e6d1c89c34a4470288aa28e2f82a93888588 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 04:10:10 +0000 Subject: [PATCH 205/356] chore(deps-dev): bump @alcalzone/release-script from 3.4.2 to 3.5.0 (#156) --- package-lock.json | 78 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index c4a1b1ee..147ed7d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,63 +30,63 @@ } }, "@alcalzone/release-script": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.4.2.tgz", - "integrity": "sha512-SpQhbKu2lUDUaneRu6+yc2PSnH26VIyyry/E6ZAUDSBE07nySB5pz0g2UAHlLPrX4qwF9ABfAIi/QXCCd22P9w==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.0.tgz", + "integrity": "sha512-1H7BuNaHuiEQldeD9mBV78NZCGYKLG+ywb2JPTzAp3QgXkYAHt4sKtPJAOcrIDglR9rA27R4peKC5etKKpBJwQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.4.1", - "@alcalzone/release-script-plugin-changelog": "3.4.1", - "@alcalzone/release-script-plugin-exec": "3.4.1", - "@alcalzone/release-script-plugin-git": "3.4.1", - "@alcalzone/release-script-plugin-package": "3.4.2", - "@alcalzone/release-script-plugin-version": "3.4.1", + "@alcalzone/release-script-core": "3.5.0", + "@alcalzone/release-script-plugin-changelog": "3.5.0", + "@alcalzone/release-script-plugin-exec": "3.5.0", + "@alcalzone/release-script-plugin-git": "3.5.0", + "@alcalzone/release-script-plugin-package": "3.5.0", + "@alcalzone/release-script-plugin-version": "3.5.0", "alcalzone-shared": "^4.0.0", "axios": "^0.21.4", - "colors": "^1.4.0", "enquirer": "^2.3.6", "fs-extra": "^10.0.0", + "picocolors": "1.0.0", "semver": "^7.3.5", "source-map-support": "^0.5.20", "yargs": "^17.1.1" } }, "@alcalzone/release-script-core": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.4.1.tgz", - "integrity": "sha512-UMY95dCg5cAJzbOcZf+Jsw2hC73aUiucSeiT9af7RFeQckJfG9leFT0ZVH0stLhFofHll19EY5IH9ZLvdkMe4w==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", + "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", "dev": true, "requires": { "execa": "^5.1.1" } }, "@alcalzone/release-script-plugin-changelog": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.4.1.tgz", - "integrity": "sha512-FRi6eB67mGwT2hX/yWANpvN46BF1V5sblhitQMAZjUf9TmjxElYLXv/v9dVFCHHGPQWkQz+3WNFQrQL9YFAqNQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.0.tgz", + "integrity": "sha512-Ec7YY2B9CejbPW6ktyEaek07Liakhvhg8ACUYAmDwe/VvhBYt5A7PbJClsOFv/1FmQunvD6d5kzEl0ocqCCK0Q==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.4.1", + "@alcalzone/release-script-core": "3.5.0", "alcalzone-shared": "^4.0.0" } }, "@alcalzone/release-script-plugin-exec": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.4.1.tgz", - "integrity": "sha512-mCesHN35hq6DkziYBGQDPn2T8BxXU0Yp28J3H4RnO21OcbMffRGfJ/YFJiQ9lZPekc1xqOvNZsLxzJNLmWPyPQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.0.tgz", + "integrity": "sha512-TwSLU8VHEHHddLhpBeDm5Y/yQae3wlHevQGlYdlNtSe4Ja0RkEstQbgdTNg5AdXTZ5JMI7CIEsavLjmpc8joDQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.4.1", + "@alcalzone/release-script-core": "3.5.0", "alcalzone-shared": "^4.0.0" } }, "@alcalzone/release-script-plugin-git": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.4.1.tgz", - "integrity": "sha512-9M3OsFR+ESZM3/Z2E0p+zfYVjB0CXyinSFo0YVBkyGEO3ix1cdWNC1W8YzBh/A1CQS09rXNi6apudkHJDPlsyA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.0.tgz", + "integrity": "sha512-Pu7dSNtKkhxO7qDHV/PmISgBb+MXMTNFdbH/yi70OD9drjkaK8BZaKZt/Mm+1Stmk64VurYab4BtiYehqjk/pw==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.4.1", + "@alcalzone/release-script-core": "3.5.0", "fs-extra": "^10.0.0" } }, @@ -113,24 +113,24 @@ } }, "@alcalzone/release-script-plugin-package": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.4.2.tgz", - "integrity": "sha512-NIcVB9QjNHfbDQtczcNqnks6PhR7eQG5WvmOvuS9XQd5f2++ymi8WO0zTLKuoS3TwIjWP2B9Ae9LxqdPa745EA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.0.tgz", + "integrity": "sha512-UyZ3TKLDhKJ6tBUWA4f5QhBkT8GGrRPy/njHC/7kR9YQ3wFnQ4AUP+IhrzeBObk5J3SrDLnhQIfIin6X3bvmyA==", "dev": true, "requires": { "@alcalzone/pak": "^0.7.0", - "@alcalzone/release-script-core": "3.4.1", + "@alcalzone/release-script-core": "3.5.0", "alcalzone-shared": "^4.0.0", "semver": "^7.3.5" } }, "@alcalzone/release-script-plugin-version": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.4.1.tgz", - "integrity": "sha512-a2QMoo4KyeHreSzkJCNeI7ETldC/W1derfrnfV5brEEsCl+TXTySGQl9Sz+dFshFo3QvOAkTclRD/ZxGItUtcQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.0.tgz", + "integrity": "sha512-Ci97m8nW5xBk6URbUd/1c35L24rjgNbOJiCDAgnLShCAP+ZTYYtdBWUO6Kg5f7lDBr5NDdpR0c94Wed+TutHbQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.4.1", + "@alcalzone/release-script-core": "3.5.0", "alcalzone-shared": "^4.0.0", "semver": "^7.3.5", "tiny-glob": "^0.2.9" @@ -434,12 +434,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1320,6 +1314,12 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "picomatch": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", diff --git a/package.json b/package.json index 040237a9..7c05297c 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^3.4.2", + "@alcalzone/release-script": "^3.5.0", "@alcalzone/release-script-plugin-license": "^3.5.0", "eslint": "^8.6.0" }, From 2c12f945fbc89750cf87b0f30b14c1cb5c99b0b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Feb 2022 20:06:00 +0000 Subject: [PATCH 206/356] chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 (#160) --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 147ed7d2..2fa8c84d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -844,9 +844,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" }, "forwarded": { "version": "0.2.0", From 55b773014bf4878d72120b762b10e139ced970d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Feb 2022 20:08:15 +0000 Subject: [PATCH 207/356] chore(deps-dev): bump eslint from 8.6.0 to 8.9.0 (#161) --- package-lock.json | 89 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 44 insertions(+), 47 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fa8c84d..e841ad67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -137,14 +137,14 @@ } }, "@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", + "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.2.0", + "espree": "^9.3.1", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", @@ -162,6 +162,12 @@ "ms": "2.1.2" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -171,9 +177,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", - "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", + "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -566,24 +572,23 @@ "dev": true }, "eslint": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz", - "integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", + "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.5", + "@eslint/eslintrc": "^1.1.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", - "espree": "^9.3.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -591,7 +596,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -602,9 +607,7 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", @@ -629,9 +632,9 @@ } }, "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -656,20 +659,20 @@ } }, "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "requires": { "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" } }, "esquery": { @@ -838,9 +841,9 @@ } }, "flatted": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", - "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "follow-redirects": { @@ -917,9 +920,9 @@ } }, "globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -1012,9 +1015,9 @@ } }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "import-fresh": { @@ -1210,9 +1213,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.1.tgz", + "integrity": "sha512-reLxBcKUPNBnc/sVtAbxgRVFSegoGeLaSjmphNhcwcolhYLRgtJscn5mRl6YRZNQv40Y7P6JM2YhSIsbL9OB5A==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -1336,12 +1339,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", diff --git a/package.json b/package.json index 7c05297c..41b1c6c4 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.0", "@alcalzone/release-script-plugin-license": "^3.5.0", - "eslint": "^8.6.0" + "eslint": "^8.9.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 1965be607d2752b8a20feefc868c58a2e02b4c09 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 20 Feb 2022 22:21:23 +0100 Subject: [PATCH 208/356] * update deps --- .github/workflows/test-and-release.yml | 2 +- LICENSE | 2 +- README.md | 4 + package-lock.json | 2376 +++++++++++++++++++++++- package.json | 4 +- 5 files changed, 2360 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 270d8f2b..a1f34671 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -28,7 +28,7 @@ jobs: node-version: [12.x] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.5.1 with: diff --git a/LICENSE b/LICENSE index 430e09a4..fc22fbfa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) Copyright (c) 2015-2017 soef -Copyright (c) 2018-2021 Apollon77 +Copyright (c) 2018-2022 Apollon77 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d2874db7..07b57ae9 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (TactfulElf) Allow csrf to be updated on cookie refresh and add 401 error handling + ### 4.1.1 (2021-11-13) * (Apollon77) Prevent crash case in edge cases when unexpected WSMQTT responses are received diff --git a/package-lock.json b/package-lock.json index e841ad67..64f08d67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,2339 @@ { "name": "alexa-remote2", "version": "4.1.1", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "alexa-remote2", + "version": "4.1.1", + "license": "MIT", + "dependencies": { + "alexa-cookie2": "^4.0.1", + "extend": "^3.0.2", + "https": "^1.0.0", + "querystring": "^0.2.1", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "devDependencies": { + "@alcalzone/release-script": "^3.5.2", + "@alcalzone/release-script-plugin-license": "^3.5.0", + "eslint": "^8.9.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@alcalzone/pak": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.0.tgz", + "integrity": "sha512-ExytxVXzXsrRWLf35BC+EFJIDoRUB42mfHeczzOyyQLR8RjkMA86Em3WfbA+OyN0vd06XqSHr4JOMphIc/GnXw==", + "dev": true, + "dependencies": { + "axios": "^0.21.1", + "execa": "^5.0.0", + "fs-extra": "^9.1.0" + } + }, + "node_modules/@alcalzone/pak/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@alcalzone/release-script": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.2.tgz", + "integrity": "sha512-PzvSJp8u0XgT0TKJz+/gAr8CG1dmCXlJMuIHyli7PGG71nXdd7PHKJaPBcHjnE4G1XiMmSnMeBt+3F/eV8ey+g==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.5.0", + "@alcalzone/release-script-plugin-changelog": "3.5.0", + "@alcalzone/release-script-plugin-exec": "3.5.0", + "@alcalzone/release-script-plugin-git": "3.5.0", + "@alcalzone/release-script-plugin-package": "3.5.2", + "@alcalzone/release-script-plugin-version": "3.5.0", + "alcalzone-shared": "^4.0.0", + "axios": "^0.21.4", + "enquirer": "^2.3.6", + "fs-extra": "^10.0.0", + "picocolors": "1.0.0", + "semver": "^7.3.5", + "source-map-support": "^0.5.20", + "yargs": "^17.1.1" + }, + "bin": { + "release-script": "bin/release.js" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-core": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", + "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", + "dev": true, + "dependencies": { + "execa": "^5.1.1" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-changelog": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.0.tgz", + "integrity": "sha512-Ec7YY2B9CejbPW6ktyEaek07Liakhvhg8ACUYAmDwe/VvhBYt5A7PbJClsOFv/1FmQunvD6d5kzEl0ocqCCK0Q==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.5.0", + "alcalzone-shared": "^4.0.0" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-exec": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.0.tgz", + "integrity": "sha512-TwSLU8VHEHHddLhpBeDm5Y/yQae3wlHevQGlYdlNtSe4Ja0RkEstQbgdTNg5AdXTZ5JMI7CIEsavLjmpc8joDQ==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.5.0", + "alcalzone-shared": "^4.0.0" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-git": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.0.tgz", + "integrity": "sha512-Pu7dSNtKkhxO7qDHV/PmISgBb+MXMTNFdbH/yi70OD9drjkaK8BZaKZt/Mm+1Stmk64VurYab4BtiYehqjk/pw==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.5.0", + "fs-extra": "^10.0.0" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-license": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.0.tgz", + "integrity": "sha512-WfsIcNHXIwhMyxq0Mz27gvw4Q58Qs7mGzCDePpYKsYJNopojuFoY62cDitr7beYLqMTIWViAmVfZLIfq88LPFA==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.5.0", + "fs-extra": "^10.0.0", + "tiny-glob": "^0.2.9" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-license/node_modules/@alcalzone/release-script-core": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", + "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", + "dev": true, + "dependencies": { + "execa": "^5.1.1" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-package": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.2.tgz", + "integrity": "sha512-Ewh60HrXPoOOPiTOMqOh3EQWWz5h7+mYCoJ48rzeQETTJfd3qzP2xHyy1ZjBtdfJgsKv6wU/oyK6WjlYN/rcvg==", + "dev": true, + "dependencies": { + "@alcalzone/pak": "^0.8.0", + "@alcalzone/release-script-core": "3.5.0", + "alcalzone-shared": "^4.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-version": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.0.tgz", + "integrity": "sha512-Ci97m8nW5xBk6URbUd/1c35L24rjgNbOJiCDAgnLShCAP+ZTYYtdBWUO6Kg5f7lDBr5NDdpR0c94Wed+TutHbQ==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.5.0", + "alcalzone-shared": "^4.0.0", + "semver": "^7.3.5", + "tiny-glob": "^0.2.9" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", + "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.1", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", + "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@types/http-proxy": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", + "integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "16.10.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz", + "integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==" + }, + "node_modules/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/alcalzone-shared": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.1.tgz", + "integrity": "sha512-6t0LFCIGvBG24grbV93Y1+MJjoyqgUpPOp/PkOcal1ZXXUUMEaZKPu6NfN6e3x5k2P2mnNaY2eXn/VmpWDLzYA==", + "dev": true, + "dependencies": { + "debug": "^4.3.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/alcalzone-shared/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/alcalzone-shared/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/alexa-cookie2": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.1.tgz", + "integrity": "sha512-Ylk+iulA9/LHmxvH1PW/0z0GbW82vfaQG3ubjejGBlQVuK8nDoH7uwY5XJgA3Fy0FK0etj6ce6AtxBMx4aJkJA==", + "dependencies": { + "cookie": "^0.4.1", + "express": "^4.17.1", + "http-proxy-middleware": "^2.0.1", + "http-proxy-response-rewrite": "^0.0.1", + "https": "^1.0.0", + "querystring": "^0.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dependencies": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "node_modules/bufferhelper": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/bufferhelper/-/bufferhelper-0.2.1.tgz", + "integrity": "sha1-+nSjhXJKWOJC8ErWZGwjZvg7kT4=", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", + "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.1.0", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/espree": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "dev": true, + "dependencies": { + "acorn": "^8.7.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dependencies": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true + }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, + "node_modules/graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-middleware": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.1.tgz", + "integrity": "sha512-cfaXRVoZxSed/BmkA7SwBVNI9Kj7HFltaE5rqYOub5kWzWZ+gofV2koVN1j2rMW7pEfSSlCHGJ31xmuyFyfLOg==", + "dependencies": { + "@types/http-proxy": "^1.17.5", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/http-proxy-response-rewrite": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-response-rewrite/-/http-proxy-response-rewrite-0.0.1.tgz", + "integrity": "sha512-smtaa2sKgiWrP9c9W+/MFzgjeh3A4zsQOLh1S3rp1NsmNYIVO07AlWUnhoUnMZIuxY6+3v7OS5NlDGX2I2DWBQ==", + "dependencies": { + "bufferhelper": "^0.2.1", + "concat-stream": "^1.5.1" + } + }, + "node_modules/https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz", + "integrity": "sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q=" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", + "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.33", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", + "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "dependencies": { + "mime-db": "1.50.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.1.tgz", + "integrity": "sha512-reLxBcKUPNBnc/sVtAbxgRVFSegoGeLaSjmphNhcwcolhYLRgtJscn5mRl6YRZNQv40Y7P6JM2YhSIsbL9OB5A==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/querystring": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", + "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dependencies": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "node_modules/serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", + "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dev": true, + "dependencies": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "dev": true, + "engines": { + "node": ">=12" + } + } + }, "dependencies": { "@alcalzone/pak": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.7.0.tgz", - "integrity": "sha512-k5cKJ9/19djy6m2klchQp9JyXUQclGyarI5qz+QFeEvHhbN4ewQ41Ty8ToCx0WRN1SJBa9gLzoXMWb1/UH2HHA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.0.tgz", + "integrity": "sha512-ExytxVXzXsrRWLf35BC+EFJIDoRUB42mfHeczzOyyQLR8RjkMA86Em3WfbA+OyN0vd06XqSHr4JOMphIc/GnXw==", "dev": true, "requires": { "axios": "^0.21.1", @@ -30,16 +2356,16 @@ } }, "@alcalzone/release-script": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.0.tgz", - "integrity": "sha512-1H7BuNaHuiEQldeD9mBV78NZCGYKLG+ywb2JPTzAp3QgXkYAHt4sKtPJAOcrIDglR9rA27R4peKC5etKKpBJwQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.2.tgz", + "integrity": "sha512-PzvSJp8u0XgT0TKJz+/gAr8CG1dmCXlJMuIHyli7PGG71nXdd7PHKJaPBcHjnE4G1XiMmSnMeBt+3F/eV8ey+g==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.5.0", "@alcalzone/release-script-plugin-changelog": "3.5.0", "@alcalzone/release-script-plugin-exec": "3.5.0", "@alcalzone/release-script-plugin-git": "3.5.0", - "@alcalzone/release-script-plugin-package": "3.5.0", + "@alcalzone/release-script-plugin-package": "3.5.2", "@alcalzone/release-script-plugin-version": "3.5.0", "alcalzone-shared": "^4.0.0", "axios": "^0.21.4", @@ -113,12 +2439,12 @@ } }, "@alcalzone/release-script-plugin-package": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.0.tgz", - "integrity": "sha512-UyZ3TKLDhKJ6tBUWA4f5QhBkT8GGrRPy/njHC/7kR9YQ3wFnQ4AUP+IhrzeBObk5J3SrDLnhQIfIin6X3bvmyA==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.2.tgz", + "integrity": "sha512-Ewh60HrXPoOOPiTOMqOh3EQWWz5h7+mYCoJ48rzeQETTJfd3qzP2xHyy1ZjBtdfJgsKv6wU/oyK6WjlYN/rcvg==", "dev": true, "requires": { - "@alcalzone/pak": "^0.7.0", + "@alcalzone/pak": "^0.8.0", "@alcalzone/release-script-core": "3.5.0", "alcalzone-shared": "^4.0.0", "semver": "^7.3.5" @@ -242,7 +2568,8 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "ajv": { "version": "6.12.6", @@ -1530,6 +3857,14 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -1541,14 +3876,6 @@ "strip-ansi": "^6.0.1" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1716,9 +4043,10 @@ "dev": true }, "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==" + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "requires": {} }, "y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index 41b1c6c4..ffe3d24d 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,12 @@ "alexa-cookie2": "^4.0.1", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.2.3", + "ws": "^8.5.0", "extend": "^3.0.2", "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^3.5.0", + "@alcalzone/release-script": "^3.5.2", "@alcalzone/release-script-plugin-license": "^3.5.0", "eslint": "^8.9.0" }, From 546eb5f5d3e0308c5de30da656ad71d910bc7c6b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 20 Feb 2022 22:22:56 +0100 Subject: [PATCH 209/356] chore: release v4.1.2 * (TactfulElf) Allow csrf to be updated on cookie refresh and add 401 error handling --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 07b57ae9..ef957787 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 4.1.2 (2022-02-20) * (TactfulElf) Allow csrf to be updated on cookie refresh and add 401 error handling ### 4.1.1 (2021-11-13) diff --git a/package-lock.json b/package-lock.json index 64f08d67..5dae71ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "4.1.1", + "version": "4.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "4.1.1", + "version": "4.1.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.1", diff --git a/package.json b/package.json index ffe3d24d..baf91c2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.1.1", + "version": "4.1.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From ce15ac6c6dcaf229688f67e713dd997299afc430 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 03:02:43 +0000 Subject: [PATCH 210/356] chore(deps-dev): bump eslint from 8.9.0 to 8.10.0 (#163) --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5dae71ba..bd587f73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.2", "@alcalzone/release-script-plugin-license": "^3.5.0", - "eslint": "^8.9.0" + "eslint": "^8.10.0" }, "engines": { "node": ">=12.0.0" @@ -187,9 +187,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", - "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -746,12 +746,12 @@ } }, "node_modules/eslint": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", - "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.1.0", + "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -2463,9 +2463,9 @@ } }, "@eslint/eslintrc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", - "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -2899,12 +2899,12 @@ "dev": true }, "eslint": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", - "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.1.0", + "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", diff --git a/package.json b/package.json index baf91c2d..2a4d73c1 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.2", "@alcalzone/release-script-plugin-license": "^3.5.0", - "eslint": "^8.9.0" + "eslint": "^8.10.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 05226250a859c3abc1e4a715254c00ef39701734 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 02:01:21 +0000 Subject: [PATCH 211/356] chore(deps): bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-automerge.yml | 2 +- .github/workflows/test-and-release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index 310f4a0d..7ebd3105 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check if PR should be auto-merged uses: ahmadnassri/action-dependabot-auto-merge@v2 diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index a1f34671..eb2ff895 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -28,7 +28,7 @@ jobs: node-version: [12.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.5.1 with: @@ -56,7 +56,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.5.1 From 9a32919cabc0cbe99b0fa86390bd31b86b974be7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 02:02:47 +0000 Subject: [PATCH 212/356] chore(deps-dev): bump @alcalzone/release-script from 3.5.2 to 3.5.6 (#166) --- package-lock.json | 292 ++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 128 insertions(+), 166 deletions(-) diff --git a/package-lock.json b/package-lock.json index bd587f73..8c1b3a2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "ws": "^8.5.0" }, "devDependencies": { - "@alcalzone/release-script": "^3.5.2", + "@alcalzone/release-script": "^3.5.6", "@alcalzone/release-script-plugin-license": "^3.5.0", "eslint": "^8.10.0" }, @@ -26,51 +26,36 @@ } }, "node_modules/@alcalzone/pak": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.0.tgz", - "integrity": "sha512-ExytxVXzXsrRWLf35BC+EFJIDoRUB42mfHeczzOyyQLR8RjkMA86Em3WfbA+OyN0vd06XqSHr4JOMphIc/GnXw==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.1.tgz", + "integrity": "sha512-sPdxNxdXLH96kbyWLdIljVSIY2N6/qnPqkq5AlWvuizjGQUwHIUtWZHLss9XNDV/hY7YkgdIb9ILHbMTnRBxVQ==", "dev": true, "dependencies": { - "axios": "^0.21.1", + "axios": "^0.26.0", "execa": "^5.0.0", - "fs-extra": "^9.1.0" - } - }, - "node_modules/@alcalzone/pak/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" + "fs-extra": "^10.0.1" } }, "node_modules/@alcalzone/release-script": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.2.tgz", - "integrity": "sha512-PzvSJp8u0XgT0TKJz+/gAr8CG1dmCXlJMuIHyli7PGG71nXdd7PHKJaPBcHjnE4G1XiMmSnMeBt+3F/eV8ey+g==", - "dev": true, - "dependencies": { - "@alcalzone/release-script-core": "3.5.0", - "@alcalzone/release-script-plugin-changelog": "3.5.0", - "@alcalzone/release-script-plugin-exec": "3.5.0", - "@alcalzone/release-script-plugin-git": "3.5.0", - "@alcalzone/release-script-plugin-package": "3.5.2", - "@alcalzone/release-script-plugin-version": "3.5.0", - "alcalzone-shared": "^4.0.0", - "axios": "^0.21.4", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.6.tgz", + "integrity": "sha512-7Ip/r6eYxsLt8PMdafx5bSMj49PQoENIXVD5o1jyStncr3uRynKAWUVvGuOdyADNvPkupNNnfMdjXaAei0If8Q==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-plugin-changelog": "3.5.6", + "@alcalzone/release-script-plugin-exec": "3.5.3", + "@alcalzone/release-script-plugin-git": "3.5.3", + "@alcalzone/release-script-plugin-package": "3.5.5", + "@alcalzone/release-script-plugin-version": "3.5.6", + "alcalzone-shared": "^4.0.1", + "axios": "^0.26.0", "enquirer": "^2.3.6", - "fs-extra": "^10.0.0", + "fs-extra": "^10.0.1", "picocolors": "1.0.0", "semver": "^7.3.5", - "source-map-support": "^0.5.20", - "yargs": "^17.1.1" + "source-map-support": "^0.5.21", + "yargs": "^17.3.1" }, "bin": { "release-script": "bin/release.js" @@ -80,9 +65,9 @@ } }, "node_modules/@alcalzone/release-script-core": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", - "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.3.tgz", + "integrity": "sha512-jAnF8KpFNVAHuRE6tkf+dD213pUgPBTupcax5QUaTiC1u8iagitFQ6ejQS6QU9ZVFwkCNz7J7yB99j0bK5MnmA==", "dev": true, "dependencies": { "execa": "^5.1.1" @@ -92,39 +77,40 @@ } }, "node_modules/@alcalzone/release-script-plugin-changelog": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.0.tgz", - "integrity": "sha512-Ec7YY2B9CejbPW6ktyEaek07Liakhvhg8ACUYAmDwe/VvhBYt5A7PbJClsOFv/1FmQunvD6d5kzEl0ocqCCK0Q==", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.6.tgz", + "integrity": "sha512-4K1hrJu0mIshK5gKhzfWPS7rr6o98TQYIwdGqkrolC7NpkRRS30UFbAigxMDxMefZLVwCHX572ImmiURJEejVA==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0" + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.0.1" }, "engines": { "node": ">=12.20" } }, "node_modules/@alcalzone/release-script-plugin-exec": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.0.tgz", - "integrity": "sha512-TwSLU8VHEHHddLhpBeDm5Y/yQae3wlHevQGlYdlNtSe4Ja0RkEstQbgdTNg5AdXTZ5JMI7CIEsavLjmpc8joDQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.3.tgz", + "integrity": "sha512-GKNQ65TB5muasM0IMH1259PKFEXmh6Icn57muakQz0tmRh3GO6WbN4LtLlm0+Ffh0PL6C0ys/zzSpRBhoO3X9A==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0" + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1" }, "engines": { "node": ">=12.20" } }, "node_modules/@alcalzone/release-script-plugin-git": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.0.tgz", - "integrity": "sha512-Pu7dSNtKkhxO7qDHV/PmISgBb+MXMTNFdbH/yi70OD9drjkaK8BZaKZt/Mm+1Stmk64VurYab4BtiYehqjk/pw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.3.tgz", + "integrity": "sha512-2OdHz51dsqQOzocu6nqCjPB/gh2+vfggZ7YlppV3/6iy4Z3WyM+I2HWOFRx8RNGuWFf37ZytyDa29LJYnX7lsA==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.0", - "fs-extra": "^10.0.0" + "@alcalzone/release-script-core": "3.5.3", + "fs-extra": "^10.0.1" }, "engines": { "node": ">=12.20" @@ -157,14 +143,15 @@ } }, "node_modules/@alcalzone/release-script-plugin-package": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.2.tgz", - "integrity": "sha512-Ewh60HrXPoOOPiTOMqOh3EQWWz5h7+mYCoJ48rzeQETTJfd3qzP2xHyy1ZjBtdfJgsKv6wU/oyK6WjlYN/rcvg==", + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.5.tgz", + "integrity": "sha512-zZ/rhgMWGzuCx990zxqrTq7/SJMNP+L7tA58GYe4zhv8TWOuyDejnuhC1+HTIXVmP4hdrsZf/HDsGzfOQju6Lg==", "dev": true, "dependencies": { - "@alcalzone/pak": "^0.8.0", - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0", + "@alcalzone/pak": "^0.8.1", + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.0.1", "semver": "^7.3.5" }, "engines": { @@ -172,13 +159,14 @@ } }, "node_modules/@alcalzone/release-script-plugin-version": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.0.tgz", - "integrity": "sha512-Ci97m8nW5xBk6URbUd/1c35L24rjgNbOJiCDAgnLShCAP+ZTYYtdBWUO6Kg5f7lDBr5NDdpR0c94Wed+TutHbQ==", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.6.tgz", + "integrity": "sha512-Opcgp8FzbfPOc89yp+hlIkR7Ca/QoK9JjUZSpswRjSXKQI6nk/h1v7AJNVWF24/RpQ2xSD2BMFgcaNTn2PK87g==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0", + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.0.1", "semver": "^7.3.5", "tiny-glob": "^0.2.9" }, @@ -356,9 +344,9 @@ } }, "node_modules/alcalzone-shared/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -438,22 +426,13 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.8" } }, "node_modules/balanced-match": { @@ -1127,9 +1106,9 @@ } }, "node_modules/fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -2331,89 +2310,76 @@ }, "dependencies": { "@alcalzone/pak": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.0.tgz", - "integrity": "sha512-ExytxVXzXsrRWLf35BC+EFJIDoRUB42mfHeczzOyyQLR8RjkMA86Em3WfbA+OyN0vd06XqSHr4JOMphIc/GnXw==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.1.tgz", + "integrity": "sha512-sPdxNxdXLH96kbyWLdIljVSIY2N6/qnPqkq5AlWvuizjGQUwHIUtWZHLss9XNDV/hY7YkgdIb9ILHbMTnRBxVQ==", "dev": true, "requires": { - "axios": "^0.21.1", + "axios": "^0.26.0", "execa": "^5.0.0", - "fs-extra": "^9.1.0" - }, - "dependencies": { - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - } + "fs-extra": "^10.0.1" } }, "@alcalzone/release-script": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.2.tgz", - "integrity": "sha512-PzvSJp8u0XgT0TKJz+/gAr8CG1dmCXlJMuIHyli7PGG71nXdd7PHKJaPBcHjnE4G1XiMmSnMeBt+3F/eV8ey+g==", - "dev": true, - "requires": { - "@alcalzone/release-script-core": "3.5.0", - "@alcalzone/release-script-plugin-changelog": "3.5.0", - "@alcalzone/release-script-plugin-exec": "3.5.0", - "@alcalzone/release-script-plugin-git": "3.5.0", - "@alcalzone/release-script-plugin-package": "3.5.2", - "@alcalzone/release-script-plugin-version": "3.5.0", - "alcalzone-shared": "^4.0.0", - "axios": "^0.21.4", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.6.tgz", + "integrity": "sha512-7Ip/r6eYxsLt8PMdafx5bSMj49PQoENIXVD5o1jyStncr3uRynKAWUVvGuOdyADNvPkupNNnfMdjXaAei0If8Q==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-plugin-changelog": "3.5.6", + "@alcalzone/release-script-plugin-exec": "3.5.3", + "@alcalzone/release-script-plugin-git": "3.5.3", + "@alcalzone/release-script-plugin-package": "3.5.5", + "@alcalzone/release-script-plugin-version": "3.5.6", + "alcalzone-shared": "^4.0.1", + "axios": "^0.26.0", "enquirer": "^2.3.6", - "fs-extra": "^10.0.0", + "fs-extra": "^10.0.1", "picocolors": "1.0.0", "semver": "^7.3.5", - "source-map-support": "^0.5.20", - "yargs": "^17.1.1" + "source-map-support": "^0.5.21", + "yargs": "^17.3.1" } }, "@alcalzone/release-script-core": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", - "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.3.tgz", + "integrity": "sha512-jAnF8KpFNVAHuRE6tkf+dD213pUgPBTupcax5QUaTiC1u8iagitFQ6ejQS6QU9ZVFwkCNz7J7yB99j0bK5MnmA==", "dev": true, "requires": { "execa": "^5.1.1" } }, "@alcalzone/release-script-plugin-changelog": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.0.tgz", - "integrity": "sha512-Ec7YY2B9CejbPW6ktyEaek07Liakhvhg8ACUYAmDwe/VvhBYt5A7PbJClsOFv/1FmQunvD6d5kzEl0ocqCCK0Q==", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.6.tgz", + "integrity": "sha512-4K1hrJu0mIshK5gKhzfWPS7rr6o98TQYIwdGqkrolC7NpkRRS30UFbAigxMDxMefZLVwCHX572ImmiURJEejVA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0" + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.0.1" } }, "@alcalzone/release-script-plugin-exec": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.0.tgz", - "integrity": "sha512-TwSLU8VHEHHddLhpBeDm5Y/yQae3wlHevQGlYdlNtSe4Ja0RkEstQbgdTNg5AdXTZ5JMI7CIEsavLjmpc8joDQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.3.tgz", + "integrity": "sha512-GKNQ65TB5muasM0IMH1259PKFEXmh6Icn57muakQz0tmRh3GO6WbN4LtLlm0+Ffh0PL6C0ys/zzSpRBhoO3X9A==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0" + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1" } }, "@alcalzone/release-script-plugin-git": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.0.tgz", - "integrity": "sha512-Pu7dSNtKkhxO7qDHV/PmISgBb+MXMTNFdbH/yi70OD9drjkaK8BZaKZt/Mm+1Stmk64VurYab4BtiYehqjk/pw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.3.tgz", + "integrity": "sha512-2OdHz51dsqQOzocu6nqCjPB/gh2+vfggZ7YlppV3/6iy4Z3WyM+I2HWOFRx8RNGuWFf37ZytyDa29LJYnX7lsA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.0", - "fs-extra": "^10.0.0" + "@alcalzone/release-script-core": "3.5.3", + "fs-extra": "^10.0.1" } }, "@alcalzone/release-script-plugin-license": { @@ -2439,25 +2405,27 @@ } }, "@alcalzone/release-script-plugin-package": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.2.tgz", - "integrity": "sha512-Ewh60HrXPoOOPiTOMqOh3EQWWz5h7+mYCoJ48rzeQETTJfd3qzP2xHyy1ZjBtdfJgsKv6wU/oyK6WjlYN/rcvg==", + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.5.tgz", + "integrity": "sha512-zZ/rhgMWGzuCx990zxqrTq7/SJMNP+L7tA58GYe4zhv8TWOuyDejnuhC1+HTIXVmP4hdrsZf/HDsGzfOQju6Lg==", "dev": true, "requires": { - "@alcalzone/pak": "^0.8.0", - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0", + "@alcalzone/pak": "^0.8.1", + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.0.1", "semver": "^7.3.5" } }, "@alcalzone/release-script-plugin-version": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.0.tgz", - "integrity": "sha512-Ci97m8nW5xBk6URbUd/1c35L24rjgNbOJiCDAgnLShCAP+ZTYYtdBWUO6Kg5f7lDBr5NDdpR0c94Wed+TutHbQ==", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.6.tgz", + "integrity": "sha512-Opcgp8FzbfPOc89yp+hlIkR7Ca/QoK9JjUZSpswRjSXKQI6nk/h1v7AJNVWF24/RpQ2xSD2BMFgcaNTn2PK87g==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.0", - "alcalzone-shared": "^4.0.0", + "@alcalzone/release-script-core": "3.5.3", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.0.1", "semver": "^7.3.5", "tiny-glob": "^0.2.9" } @@ -2593,9 +2561,9 @@ }, "dependencies": { "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -2654,19 +2622,13 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", "dev": true, "requires": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.8" } }, "balanced-match": { @@ -3189,9 +3151,9 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", "dev": true, "requires": { "graceful-fs": "^4.2.0", diff --git a/package.json b/package.json index 2a4d73c1..46bd3d5d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^3.5.2", + "@alcalzone/release-script": "^3.5.6", "@alcalzone/release-script-plugin-license": "^3.5.0", "eslint": "^8.10.0" }, From d9ae7a98a1372dac75d9fc96678424a2acaad987 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 04:13:36 +0000 Subject: [PATCH 213/356] chore(deps-dev): bump @alcalzone/release-script-plugin-license (#167) --- package-lock.json | 45 +++++++++++---------------------------------- package.json | 2 +- 2 files changed, 12 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c1b3a2e..1fe7c475 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@alcalzone/release-script": "^3.5.6", - "@alcalzone/release-script-plugin-license": "^3.5.0", + "@alcalzone/release-script-plugin-license": "^3.5.3", "eslint": "^8.10.0" }, "engines": { @@ -117,31 +117,19 @@ } }, "node_modules/@alcalzone/release-script-plugin-license": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.0.tgz", - "integrity": "sha512-WfsIcNHXIwhMyxq0Mz27gvw4Q58Qs7mGzCDePpYKsYJNopojuFoY62cDitr7beYLqMTIWViAmVfZLIfq88LPFA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.3.tgz", + "integrity": "sha512-NbTvV+Bl4XLlsd4aDrYyDESXhZGRX+7otlL0/LVAlra7XKbu4qxoj2WEzkI4udwet2xlm1FOE0Mwzd9M3SBsDA==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.0", - "fs-extra": "^10.0.0", + "@alcalzone/release-script-core": "3.5.3", + "fs-extra": "^10.0.1", "tiny-glob": "^0.2.9" }, "engines": { "node": ">=12.20" } }, - "node_modules/@alcalzone/release-script-plugin-license/node_modules/@alcalzone/release-script-core": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", - "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", - "dev": true, - "dependencies": { - "execa": "^5.1.1" - }, - "engines": { - "node": ">=12.20" - } - }, "node_modules/@alcalzone/release-script-plugin-package": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.5.tgz", @@ -2383,25 +2371,14 @@ } }, "@alcalzone/release-script-plugin-license": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.0.tgz", - "integrity": "sha512-WfsIcNHXIwhMyxq0Mz27gvw4Q58Qs7mGzCDePpYKsYJNopojuFoY62cDitr7beYLqMTIWViAmVfZLIfq88LPFA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.3.tgz", + "integrity": "sha512-NbTvV+Bl4XLlsd4aDrYyDESXhZGRX+7otlL0/LVAlra7XKbu4qxoj2WEzkI4udwet2xlm1FOE0Mwzd9M3SBsDA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.0", - "fs-extra": "^10.0.0", + "@alcalzone/release-script-core": "3.5.3", + "fs-extra": "^10.0.1", "tiny-glob": "^0.2.9" - }, - "dependencies": { - "@alcalzone/release-script-core": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.0.tgz", - "integrity": "sha512-m1QuQRyiI4bzXj+K0+Okve3NzBx7aDKkt34oToY5VtKrg+FnSFcDNS8HfXlesaJlBLHFGeHy73+IKph7Ez5PZA==", - "dev": true, - "requires": { - "execa": "^5.1.1" - } - } } }, "@alcalzone/release-script-plugin-package": { diff --git a/package.json b/package.json index 46bd3d5d..d22574f2 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@alcalzone/release-script": "^3.5.6", - "@alcalzone/release-script-plugin-license": "^3.5.0", + "@alcalzone/release-script-plugin-license": "^3.5.3", "eslint": "^8.10.0" }, "scripts": { From ee632c55f019921ffabcae9a426b78bdc1abab09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 May 2022 02:02:02 +0000 Subject: [PATCH 214/356] chore(deps-dev): bump @alcalzone/release-script-plugin-license (#171) --- package-lock.json | 57 +++++++++++++++++++++++++++++++++-------------- package.json | 2 +- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fe7c475..e62d613c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@alcalzone/release-script": "^3.5.6", - "@alcalzone/release-script-plugin-license": "^3.5.3", + "@alcalzone/release-script-plugin-license": "^3.5.8", "eslint": "^8.10.0" }, "engines": { @@ -117,19 +117,31 @@ } }, "node_modules/@alcalzone/release-script-plugin-license": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.3.tgz", - "integrity": "sha512-NbTvV+Bl4XLlsd4aDrYyDESXhZGRX+7otlL0/LVAlra7XKbu4qxoj2WEzkI4udwet2xlm1FOE0Mwzd9M3SBsDA==", + "version": "3.5.8", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.8.tgz", + "integrity": "sha512-sU73Z5EOJGjzk/53dDO/YySb/0W2mvB3eQRnnD1CjFxahTBITmcaRtJkytYMuVymhvuzR0digFoKN/F3f+Bacw==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.3", - "fs-extra": "^10.0.1", + "@alcalzone/release-script-core": "3.5.8", + "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" }, "engines": { "node": ">=12.20" } }, + "node_modules/@alcalzone/release-script-plugin-license/node_modules/@alcalzone/release-script-core": { + "version": "3.5.8", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.8.tgz", + "integrity": "sha512-xVO3CDY2zf/uulqMCXD8/qV69rvSByvNFfx8tMtjpfLAlio7MQAl8dxH+fbbtwu7cLtd2iz6fjtGXw/cjX4Erg==", + "dev": true, + "dependencies": { + "execa": "^5.1.1" + }, + "engines": { + "node": ">=12.20" + } + }, "node_modules/@alcalzone/release-script-plugin-package": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.5.tgz", @@ -1094,9 +1106,9 @@ } }, "node_modules/fs-extra": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", - "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -2371,14 +2383,25 @@ } }, "@alcalzone/release-script-plugin-license": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.3.tgz", - "integrity": "sha512-NbTvV+Bl4XLlsd4aDrYyDESXhZGRX+7otlL0/LVAlra7XKbu4qxoj2WEzkI4udwet2xlm1FOE0Mwzd9M3SBsDA==", + "version": "3.5.8", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.8.tgz", + "integrity": "sha512-sU73Z5EOJGjzk/53dDO/YySb/0W2mvB3eQRnnD1CjFxahTBITmcaRtJkytYMuVymhvuzR0digFoKN/F3f+Bacw==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.3", - "fs-extra": "^10.0.1", + "@alcalzone/release-script-core": "3.5.8", + "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" + }, + "dependencies": { + "@alcalzone/release-script-core": { + "version": "3.5.8", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.8.tgz", + "integrity": "sha512-xVO3CDY2zf/uulqMCXD8/qV69rvSByvNFfx8tMtjpfLAlio7MQAl8dxH+fbbtwu7cLtd2iz6fjtGXw/cjX4Erg==", + "dev": true, + "requires": { + "execa": "^5.1.1" + } + } } }, "@alcalzone/release-script-plugin-package": { @@ -3128,9 +3151,9 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "fs-extra": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", - "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "requires": { "graceful-fs": "^4.2.0", diff --git a/package.json b/package.json index d22574f2..0a7682a5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@alcalzone/release-script": "^3.5.6", - "@alcalzone/release-script-plugin-license": "^3.5.3", + "@alcalzone/release-script-plugin-license": "^3.5.8", "eslint": "^8.10.0" }, "scripts": { From ac795bbbb2a47ad0ad99101a44c77439c27d2c88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 May 2022 03:12:08 +0000 Subject: [PATCH 215/356] chore(deps-dev): bump eslint from 8.10.0 to 8.12.0 (#169) --- package-lock.json | 85 +++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 36 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index e62d613c..3f1256d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.6", "@alcalzone/release-script-plugin-license": "^3.5.8", - "eslint": "^8.10.0" + "eslint": "^8.14.0" }, "engines": { "node": ">=12.0.0" @@ -175,16 +175,16 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", - "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", + "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", @@ -195,9 +195,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -211,15 +211,6 @@ } } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/@eslint/eslintrc/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -295,9 +286,9 @@ } }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -725,12 +716,12 @@ } }, "node_modules/eslint": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", - "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", + "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.0", + "@eslint/eslintrc": "^1.2.2", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -1185,9 +1176,9 @@ } }, "node_modules/globals": { - "version": "13.12.1", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", - "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2431,16 +2422,16 @@ } }, "@eslint/eslintrc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", - "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", + "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", @@ -2448,20 +2439,14 @@ }, "dependencies": { "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2527,9 +2512,9 @@ } }, "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true }, "acorn-jsx": { @@ -2861,12 +2846,12 @@ "dev": true }, "eslint": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", - "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", + "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.0", + "@eslint/eslintrc": "^1.2.2", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -3209,9 +3194,9 @@ } }, "globals": { - "version": "13.12.1", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", - "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "requires": { "type-fest": "^0.20.2" diff --git a/package.json b/package.json index 0a7682a5..336bf2e3 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.6", "@alcalzone/release-script-plugin-license": "^3.5.8", - "eslint": "^8.10.0" + "eslint": "^8.14.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 90d484f9c4842d7ca9a0776149f0e6b5cc2d2013 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 02:04:01 +0000 Subject: [PATCH 216/356] chore(deps): bump actions/setup-node from 2.5.1 to 3.2.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.1 to 3.2.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.5.1...v3.2.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index a1f34671..61127d91 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.5.1 + uses: actions/setup-node@v3.2.0 with: node-version: ${{ matrix.node-version }} @@ -59,7 +59,7 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.5.1 + uses: actions/setup-node@v3.2.0 with: node-version: ${{ matrix.node-version }} From 73f2232159a9a01a7ba5ce075fce62a24b6e8ae9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 03:12:40 +0000 Subject: [PATCH 217/356] chore(deps-dev): bump @alcalzone/release-script-plugin-license (#176) --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f1256d6..893fe1b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@alcalzone/release-script": "^3.5.6", - "@alcalzone/release-script-plugin-license": "^3.5.8", + "@alcalzone/release-script-plugin-license": "^3.5.9", "eslint": "^8.14.0" }, "engines": { @@ -117,12 +117,12 @@ } }, "node_modules/@alcalzone/release-script-plugin-license": { - "version": "3.5.8", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.8.tgz", - "integrity": "sha512-sU73Z5EOJGjzk/53dDO/YySb/0W2mvB3eQRnnD1CjFxahTBITmcaRtJkytYMuVymhvuzR0digFoKN/F3f+Bacw==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.9.tgz", + "integrity": "sha512-Wa+RN968zYK0ZNkkaIRfD3Ru2ndWLD5e+VNbah4krtoeHqvQDiOPlfcWM0McU8q3ud+AMPwhYEwR1mh2lwi0gg==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.8", + "@alcalzone/release-script-core": "3.5.9", "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" }, @@ -131,9 +131,9 @@ } }, "node_modules/@alcalzone/release-script-plugin-license/node_modules/@alcalzone/release-script-core": { - "version": "3.5.8", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.8.tgz", - "integrity": "sha512-xVO3CDY2zf/uulqMCXD8/qV69rvSByvNFfx8tMtjpfLAlio7MQAl8dxH+fbbtwu7cLtd2iz6fjtGXw/cjX4Erg==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", + "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", "dev": true, "dependencies": { "execa": "^5.1.1" @@ -2374,20 +2374,20 @@ } }, "@alcalzone/release-script-plugin-license": { - "version": "3.5.8", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.8.tgz", - "integrity": "sha512-sU73Z5EOJGjzk/53dDO/YySb/0W2mvB3eQRnnD1CjFxahTBITmcaRtJkytYMuVymhvuzR0digFoKN/F3f+Bacw==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.9.tgz", + "integrity": "sha512-Wa+RN968zYK0ZNkkaIRfD3Ru2ndWLD5e+VNbah4krtoeHqvQDiOPlfcWM0McU8q3ud+AMPwhYEwR1mh2lwi0gg==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.8", + "@alcalzone/release-script-core": "3.5.9", "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" }, "dependencies": { "@alcalzone/release-script-core": { - "version": "3.5.8", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.8.tgz", - "integrity": "sha512-xVO3CDY2zf/uulqMCXD8/qV69rvSByvNFfx8tMtjpfLAlio7MQAl8dxH+fbbtwu7cLtd2iz6fjtGXw/cjX4Erg==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", + "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", "dev": true, "requires": { "execa": "^5.1.1" diff --git a/package.json b/package.json index 336bf2e3..6742de22 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@alcalzone/release-script": "^3.5.6", - "@alcalzone/release-script-plugin-license": "^3.5.8", + "@alcalzone/release-script-plugin-license": "^3.5.9", "eslint": "^8.14.0" }, "scripts": { From b9c867f20a3969b64cb1128b2b326956695ec7a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 04:11:44 +0000 Subject: [PATCH 218/356] chore(deps-dev): bump @alcalzone/release-script from 3.5.6 to 3.5.9 (#178) --- package-lock.json | 352 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 213 insertions(+), 141 deletions(-) diff --git a/package-lock.json b/package-lock.json index 893fe1b1..27ec2c42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "ws": "^8.5.0" }, "devDependencies": { - "@alcalzone/release-script": "^3.5.6", + "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", "eslint": "^8.14.0" }, @@ -36,26 +36,35 @@ "fs-extra": "^10.0.1" } }, + "node_modules/@alcalzone/pak/node_modules/axios": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.8" + } + }, "node_modules/@alcalzone/release-script": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.6.tgz", - "integrity": "sha512-7Ip/r6eYxsLt8PMdafx5bSMj49PQoENIXVD5o1jyStncr3uRynKAWUVvGuOdyADNvPkupNNnfMdjXaAei0If8Q==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.9.tgz", + "integrity": "sha512-2qBUyh+wd/7KToZGXrJDp8v1nos1jm+xsDiSvI2jv5Co+105N415DCJNtgOvR6s2+/G2lbIZ08oYopl+evHgkw==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.3", - "@alcalzone/release-script-plugin-changelog": "3.5.6", - "@alcalzone/release-script-plugin-exec": "3.5.3", - "@alcalzone/release-script-plugin-git": "3.5.3", - "@alcalzone/release-script-plugin-package": "3.5.5", - "@alcalzone/release-script-plugin-version": "3.5.6", + "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-plugin-changelog": "3.5.9", + "@alcalzone/release-script-plugin-exec": "3.5.9", + "@alcalzone/release-script-plugin-git": "3.5.9", + "@alcalzone/release-script-plugin-package": "3.5.9", + "@alcalzone/release-script-plugin-version": "3.5.9", "alcalzone-shared": "^4.0.1", - "axios": "^0.26.0", + "axios": "^0.27.1", "enquirer": "^2.3.6", - "fs-extra": "^10.0.1", + "fs-extra": "^10.1.0", "picocolors": "1.0.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "source-map-support": "^0.5.21", - "yargs": "^17.3.1" + "yargs": "^17.4.1" }, "bin": { "release-script": "bin/release.js" @@ -65,9 +74,9 @@ } }, "node_modules/@alcalzone/release-script-core": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.3.tgz", - "integrity": "sha512-jAnF8KpFNVAHuRE6tkf+dD213pUgPBTupcax5QUaTiC1u8iagitFQ6ejQS6QU9ZVFwkCNz7J7yB99j0bK5MnmA==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", + "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", "dev": true, "dependencies": { "execa": "^5.1.1" @@ -77,26 +86,26 @@ } }, "node_modules/@alcalzone/release-script-plugin-changelog": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.6.tgz", - "integrity": "sha512-4K1hrJu0mIshK5gKhzfWPS7rr6o98TQYIwdGqkrolC7NpkRRS30UFbAigxMDxMefZLVwCHX572ImmiURJEejVA==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.9.tgz", + "integrity": "sha512-KmOMbjd7ta/Wl2OWQUxMpNza6Sr5/sB7AfV7BC0uCl839StnoivSjqywDfNcgJq97fxMs7hnGT/uYaz7oTUm7A==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", - "fs-extra": "^10.0.1" + "fs-extra": "^10.1.0" }, "engines": { "node": ">=12.20" } }, "node_modules/@alcalzone/release-script-plugin-exec": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.3.tgz", - "integrity": "sha512-GKNQ65TB5muasM0IMH1259PKFEXmh6Icn57muakQz0tmRh3GO6WbN4LtLlm0+Ffh0PL6C0ys/zzSpRBhoO3X9A==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.9.tgz", + "integrity": "sha512-Y6OM+gEpfYYoDvHdzNUtgVZiBAgOzGWZk9yRPF5l8UWE3+tQAyMWavk2m08ExbEICfGV1lb8lRBzAdQaf7/0HA==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1" }, "engines": { @@ -104,13 +113,13 @@ } }, "node_modules/@alcalzone/release-script-plugin-git": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.3.tgz", - "integrity": "sha512-2OdHz51dsqQOzocu6nqCjPB/gh2+vfggZ7YlppV3/6iy4Z3WyM+I2HWOFRx8RNGuWFf37ZytyDa29LJYnX7lsA==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.9.tgz", + "integrity": "sha512-LT8YSevyLqZFI4rx4ET1qRnqTNnU5rVmQvGFCnC+d375zU5/U2cu19s/WVLChMHkvmUbAwBld+xhqqos2hQrKw==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.3", - "fs-extra": "^10.0.1" + "@alcalzone/release-script-core": "3.5.9", + "fs-extra": "^10.1.0" }, "engines": { "node": ">=12.20" @@ -130,44 +139,32 @@ "node": ">=12.20" } }, - "node_modules/@alcalzone/release-script-plugin-license/node_modules/@alcalzone/release-script-core": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", - "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", - "dev": true, - "dependencies": { - "execa": "^5.1.1" - }, - "engines": { - "node": ">=12.20" - } - }, "node_modules/@alcalzone/release-script-plugin-package": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.5.tgz", - "integrity": "sha512-zZ/rhgMWGzuCx990zxqrTq7/SJMNP+L7tA58GYe4zhv8TWOuyDejnuhC1+HTIXVmP4hdrsZf/HDsGzfOQju6Lg==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.9.tgz", + "integrity": "sha512-jYmWzm9Dvnnc6RWTrZApQbeXzaFYSrHqkEHViAtx5NvBztfH3ANwVl6jS4UEaMm2NbIIq6toWGznVvNtnVzEjg==", "dev": true, "dependencies": { "@alcalzone/pak": "^0.8.1", - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", - "fs-extra": "^10.0.1", - "semver": "^7.3.5" + "fs-extra": "^10.1.0", + "semver": "^7.3.7" }, "engines": { "node": ">=12.20" } }, "node_modules/@alcalzone/release-script-plugin-version": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.6.tgz", - "integrity": "sha512-Opcgp8FzbfPOc89yp+hlIkR7Ca/QoK9JjUZSpswRjSXKQI6nk/h1v7AJNVWF24/RpQ2xSD2BMFgcaNTn2PK87g==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.9.tgz", + "integrity": "sha512-CYN49aXx4QSFRWQN11wCC13SK1ZygILlohYlUFkRiA0g6u2G7z1rjW8QZSLXrR6C6gxzR4zL12VJ/xFZqYeuZA==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", - "fs-extra": "^10.0.1", - "semver": "^7.3.5", + "fs-extra": "^10.1.0", + "semver": "^7.3.7", "tiny-glob": "^0.2.9" }, "engines": { @@ -417,13 +414,20 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" } }, "node_modules/balanced-match": { @@ -548,6 +552,18 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -633,6 +649,15 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -1062,9 +1087,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.14.8", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", - "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", "funding": [ { "type": "individual", @@ -1080,6 +1105,20 @@ } } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -1870,9 +1909,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -2272,9 +2311,9 @@ "dev": true }, "node_modules/yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", "dev": true, "dependencies": { "cliui": "^7.0.2", @@ -2290,9 +2329,9 @@ } }, "node_modules/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "dev": true, "engines": { "node": ">=12" @@ -2309,68 +2348,79 @@ "axios": "^0.26.0", "execa": "^5.0.0", "fs-extra": "^10.0.1" + }, + "dependencies": { + "axios": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.8" + } + } } }, "@alcalzone/release-script": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.6.tgz", - "integrity": "sha512-7Ip/r6eYxsLt8PMdafx5bSMj49PQoENIXVD5o1jyStncr3uRynKAWUVvGuOdyADNvPkupNNnfMdjXaAei0If8Q==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.9.tgz", + "integrity": "sha512-2qBUyh+wd/7KToZGXrJDp8v1nos1jm+xsDiSvI2jv5Co+105N415DCJNtgOvR6s2+/G2lbIZ08oYopl+evHgkw==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.3", - "@alcalzone/release-script-plugin-changelog": "3.5.6", - "@alcalzone/release-script-plugin-exec": "3.5.3", - "@alcalzone/release-script-plugin-git": "3.5.3", - "@alcalzone/release-script-plugin-package": "3.5.5", - "@alcalzone/release-script-plugin-version": "3.5.6", + "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-plugin-changelog": "3.5.9", + "@alcalzone/release-script-plugin-exec": "3.5.9", + "@alcalzone/release-script-plugin-git": "3.5.9", + "@alcalzone/release-script-plugin-package": "3.5.9", + "@alcalzone/release-script-plugin-version": "3.5.9", "alcalzone-shared": "^4.0.1", - "axios": "^0.26.0", + "axios": "^0.27.1", "enquirer": "^2.3.6", - "fs-extra": "^10.0.1", + "fs-extra": "^10.1.0", "picocolors": "1.0.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "source-map-support": "^0.5.21", - "yargs": "^17.3.1" + "yargs": "^17.4.1" } }, "@alcalzone/release-script-core": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.3.tgz", - "integrity": "sha512-jAnF8KpFNVAHuRE6tkf+dD213pUgPBTupcax5QUaTiC1u8iagitFQ6ejQS6QU9ZVFwkCNz7J7yB99j0bK5MnmA==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", + "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", "dev": true, "requires": { "execa": "^5.1.1" } }, "@alcalzone/release-script-plugin-changelog": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.6.tgz", - "integrity": "sha512-4K1hrJu0mIshK5gKhzfWPS7rr6o98TQYIwdGqkrolC7NpkRRS30UFbAigxMDxMefZLVwCHX572ImmiURJEejVA==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.9.tgz", + "integrity": "sha512-KmOMbjd7ta/Wl2OWQUxMpNza6Sr5/sB7AfV7BC0uCl839StnoivSjqywDfNcgJq97fxMs7hnGT/uYaz7oTUm7A==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", - "fs-extra": "^10.0.1" + "fs-extra": "^10.1.0" } }, "@alcalzone/release-script-plugin-exec": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.3.tgz", - "integrity": "sha512-GKNQ65TB5muasM0IMH1259PKFEXmh6Icn57muakQz0tmRh3GO6WbN4LtLlm0+Ffh0PL6C0ys/zzSpRBhoO3X9A==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.9.tgz", + "integrity": "sha512-Y6OM+gEpfYYoDvHdzNUtgVZiBAgOzGWZk9yRPF5l8UWE3+tQAyMWavk2m08ExbEICfGV1lb8lRBzAdQaf7/0HA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1" } }, "@alcalzone/release-script-plugin-git": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.3.tgz", - "integrity": "sha512-2OdHz51dsqQOzocu6nqCjPB/gh2+vfggZ7YlppV3/6iy4Z3WyM+I2HWOFRx8RNGuWFf37ZytyDa29LJYnX7lsA==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.9.tgz", + "integrity": "sha512-LT8YSevyLqZFI4rx4ET1qRnqTNnU5rVmQvGFCnC+d375zU5/U2cu19s/WVLChMHkvmUbAwBld+xhqqos2hQrKw==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.3", - "fs-extra": "^10.0.1" + "@alcalzone/release-script-core": "3.5.9", + "fs-extra": "^10.1.0" } }, "@alcalzone/release-script-plugin-license": { @@ -2382,42 +2432,31 @@ "@alcalzone/release-script-core": "3.5.9", "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" - }, - "dependencies": { - "@alcalzone/release-script-core": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", - "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", - "dev": true, - "requires": { - "execa": "^5.1.1" - } - } } }, "@alcalzone/release-script-plugin-package": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.5.tgz", - "integrity": "sha512-zZ/rhgMWGzuCx990zxqrTq7/SJMNP+L7tA58GYe4zhv8TWOuyDejnuhC1+HTIXVmP4hdrsZf/HDsGzfOQju6Lg==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.9.tgz", + "integrity": "sha512-jYmWzm9Dvnnc6RWTrZApQbeXzaFYSrHqkEHViAtx5NvBztfH3ANwVl6jS4UEaMm2NbIIq6toWGznVvNtnVzEjg==", "dev": true, "requires": { "@alcalzone/pak": "^0.8.1", - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", - "fs-extra": "^10.0.1", - "semver": "^7.3.5" + "fs-extra": "^10.1.0", + "semver": "^7.3.7" } }, "@alcalzone/release-script-plugin-version": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.6.tgz", - "integrity": "sha512-Opcgp8FzbfPOc89yp+hlIkR7Ca/QoK9JjUZSpswRjSXKQI6nk/h1v7AJNVWF24/RpQ2xSD2BMFgcaNTn2PK87g==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.9.tgz", + "integrity": "sha512-CYN49aXx4QSFRWQN11wCC13SK1ZygILlohYlUFkRiA0g6u2G7z1rjW8QZSLXrR6C6gxzR4zL12VJ/xFZqYeuZA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.3", + "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", - "fs-extra": "^10.0.1", - "semver": "^7.3.5", + "fs-extra": "^10.1.0", + "semver": "^7.3.7", "tiny-glob": "^0.2.9" } }, @@ -2607,13 +2646,20 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dev": true, "requires": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" } }, "balanced-match": { @@ -2714,6 +2760,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2784,6 +2839,12 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -3121,9 +3182,20 @@ "dev": true }, "follow-redirects": { - "version": "1.14.8", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", - "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } }, "forwarded": { "version": "0.2.0", @@ -3711,9 +3783,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -4008,9 +4080,9 @@ "dev": true }, "yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -4023,9 +4095,9 @@ } }, "yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "dev": true } } diff --git a/package.json b/package.json index 6742de22..04ec5b85 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@alcalzone/release-script": "^3.5.6", + "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", "eslint": "^8.14.0" }, From d7dfcd08c78006b02d7fc883bb1deaa436daec11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 04:14:44 +0000 Subject: [PATCH 219/356] chore(deps-dev): bump eslint from 8.14.0 to 8.16.0 (#177) --- package-lock.json | 98 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/package-lock.json b/package-lock.json index 27ec2c42..f4b7672f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.14.0" + "eslint": "^8.16.0" }, "engines": { "node": ">=12.0.0" @@ -172,19 +172,19 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", + "espree": "^9.3.2", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { @@ -741,12 +741,12 @@ } }, "node_modules/eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", + "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.3.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -757,14 +757,14 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", - "globals": "^13.6.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -773,7 +773,7 @@ "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", @@ -865,13 +865,13 @@ "dev": true }, "node_modules/espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", "dev": true, "dependencies": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1215,9 +1215,9 @@ } }, "node_modules/globals": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", - "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1606,9 +1606,9 @@ } }, "node_modules/minimatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.1.tgz", - "integrity": "sha512-reLxBcKUPNBnc/sVtAbxgRVFSegoGeLaSjmphNhcwcolhYLRgtJscn5mRl6YRZNQv40Y7P6JM2YhSIsbL9OB5A==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -2461,19 +2461,19 @@ } }, "@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", + "espree": "^9.3.2", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "dependencies": { @@ -2907,12 +2907,12 @@ "dev": true }, "eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", + "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.3.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -2923,14 +2923,14 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", - "globals": "^13.6.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -2939,7 +2939,7 @@ "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", @@ -3000,13 +3000,13 @@ "dev": true }, "espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", "dev": true, "requires": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } }, @@ -3266,9 +3266,9 @@ } }, "globals": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", - "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3559,9 +3559,9 @@ "dev": true }, "minimatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.1.tgz", - "integrity": "sha512-reLxBcKUPNBnc/sVtAbxgRVFSegoGeLaSjmphNhcwcolhYLRgtJscn5mRl6YRZNQv40Y7P6JM2YhSIsbL9OB5A==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" diff --git a/package.json b/package.json index 04ec5b85..67b3734c 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.14.0" + "eslint": "^8.16.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 3eeb5be94dd8411a79a414e2adef38af448f4806 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 24 Jun 2022 14:13:58 +0200 Subject: [PATCH 220/356] * add disclaimer --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ef957787..e67b62ba 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,14 @@ Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN. +## Disclaimer +**All product and company names or logos are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or any associated subsidiaries! This personal project is maintained in spare time and has no business goal.** +**ALEXA is a trademark of AMAZON TECHNOLOGIES, INC.** + ## Example see example folder - ## Thanks: Partly based on [Amazon Alexa Remote Control](http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html) (PLAIN shell) and [alexa-remote-control](https://github.com/thorsten-gehrig/alexa-remote-control) and [OpenHab-Addon](https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol) Thank you for that work. From 53a3314e812b4f66e31b685e25aa52a93eeb154d Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 30 Jun 2022 18:14:22 +0200 Subject: [PATCH 221/356] * dep update * prevent crash cases reported by Sentry --- LICENSE | 2 +- README.md | 6 + alexa-remote.js | 10 +- alexa-wsmqtt.js | 2 +- package-lock.json | 850 ++++++++++++++++++++++++++++------------------ package.json | 6 +- 6 files changed, 540 insertions(+), 336 deletions(-) diff --git a/LICENSE b/LICENSE index fc22fbfa..eb9d6599 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2015-2017 soef Copyright (c) 2018-2022 Apollon77 +Copyright (c) 2015-2017 soef Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e67b62ba..f546c616 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Adjust logic to get the "global" ownerCustomerId and use Authentication response from session verification call +* (Apollon77) Add getAuthenticationDetails() method to get the Authentication response from the last successful session verification call +* (Apollon77) Prevent some crash cases + ### 4.1.2 (2022-02-20) * (TactfulElf) Allow csrf to be updated on cookie refresh and add 401 error handling diff --git a/alexa-remote.js b/alexa-remote.js index efe3580e..a486c86b 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -27,6 +27,8 @@ class AlexaRemote extends EventEmitter { this.cookie = null; this.csrf = null; this.cookieData = null; + this.authenticationDetails = null; + this.ownerCustomerId = null; this.baseUrl = 'alexa.amazon.de'; } @@ -199,6 +201,10 @@ class AlexaRemote extends EventEmitter { return this; } + getAuthenticationDetails() { + return this.authenticationDetails; + } + initNotifications(callback) { if (!this._options.notifications) return callback && callback(); this.getNotifications((err, res) => { @@ -287,7 +293,7 @@ class AlexaRemote extends EventEmitter { device.isMultiroomDevice = (device.clusterMembers.length > 0); device.isMultiroomMember = (device.parentClusters.length > 0); }); - this.ownerCustomerId = Object.keys(customerIds)[0]; + //this.ownerCustomerId = Object.keys(customerIds)[0]; // this could end in the wrong one! } callback && callback(); }); @@ -911,6 +917,8 @@ class AlexaRemote extends EventEmitter { checkAuthentication(callback) { this.httpsGetCall ('/api/bootstrap?version=0', function (err, res) { if (res && res.authentication && res.authentication.authenticated !== undefined) { + this.authenticationDetails = res.authentication; + this.ownerCustomerId = res.authentication.customerId; return callback(res.authentication.authenticated, err); } if (err && !err.message.includes('no body')) { diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index da3fdf53..cc7975b8 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -830,7 +830,7 @@ class AlexaWsMqtt extends EventEmitter { try { this.websocket.close(); } catch (e) { - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Disconnect error: ' +e); + this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Disconnect error: ' + e.message); } } } diff --git a/package-lock.json b/package-lock.json index f4b7672f..e0d38b5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,17 +9,17 @@ "version": "4.1.2", "license": "MIT", "dependencies": { - "alexa-cookie2": "^4.0.1", + "alexa-cookie2": "^4.0.2", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^8.3.2", - "ws": "^8.5.0" + "ws": "^8.8.0" }, "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.16.0" + "eslint": "^8.18.0" }, "engines": { "node": ">=12.0.0" @@ -258,25 +258,25 @@ "dev": true }, "node_modules/@types/http-proxy": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", - "integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==", + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", + "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "16.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz", - "integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==" + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", + "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" }, "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { "node": ">= 0.6" @@ -355,13 +355,13 @@ "dev": true }, "node_modules/alexa-cookie2": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.1.tgz", - "integrity": "sha512-Ylk+iulA9/LHmxvH1PW/0z0GbW82vfaQG3ubjejGBlQVuK8nDoH7uwY5XJgA3Fy0FK0etj6ce6AtxBMx4aJkJA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.2.tgz", + "integrity": "sha512-nyZUDE3iJOleJxXZb1zB3r2Wq0m3qrEeNXOJbo/AVCX8Tekrya5UzF3otBGeX9wuEeU6Cmz9DM6i8CSFgKIcfA==", "dependencies": { - "cookie": "^0.4.1", - "express": "^4.17.1", - "http-proxy-middleware": "^2.0.1", + "cookie": "^0.5.0", + "express": "^4.18.1", + "http-proxy-middleware": "^2.0.6", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.1" @@ -412,7 +412,7 @@ "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/asynckit": { "version": "0.4.0", @@ -437,23 +437,26 @@ "dev": true }, "node_modules/body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", + "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", "dependencies": { - "bytes": "3.1.0", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "on-finished": "2.4.1", + "qs": "6.10.3", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, "node_modules/brace-expansion": { @@ -491,13 +494,25 @@ } }, "node_modules/bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "engines": { "node": ">= 0.8" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -585,16 +600,35 @@ } }, "node_modules/content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.2.1" }, "engines": { "node": ">= 0.6" } }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", @@ -604,9 +638,9 @@ } }, "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "engines": { "node": ">= 0.6" } @@ -614,7 +648,7 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/core-util-is": { "version": "1.0.3", @@ -659,17 +693,21 @@ } }, "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } }, "node_modules/doctrine": { "version": "3.0.0", @@ -686,7 +724,7 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -697,7 +735,7 @@ "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "engines": { "node": ">= 0.8" } @@ -726,7 +764,7 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { "version": "4.0.0", @@ -741,9 +779,9 @@ } }, "node_modules/eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -923,7 +961,7 @@ "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "engines": { "node": ">= 0.6" } @@ -957,37 +995,38 @@ } }, "node_modules/express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", + "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", "dependencies": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "body-parser": "1.20.0", + "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.0", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", + "proxy-addr": "~2.0.7", + "qs": "6.10.3", "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -996,13 +1035,24 @@ "node": ">= 0.10.0" } }, - "node_modules/express/node_modules/cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "engines": { - "node": ">= 0.6" - } + "node_modules/express/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/extend": { "version": "3.0.2", @@ -1051,16 +1101,16 @@ } }, "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" }, "engines": { @@ -1130,7 +1180,7 @@ "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "engines": { "node": ">= 0.6" } @@ -1155,6 +1205,11 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -1170,6 +1225,19 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -1247,6 +1315,17 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1256,19 +1335,30 @@ "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/http-proxy": { @@ -1285,11 +1375,11 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.1.tgz", - "integrity": "sha512-cfaXRVoZxSed/BmkA7SwBVNI9Kj7HFltaE5rqYOub5kWzWZ+gofV2koVN1j2rMW7pEfSSlCHGJ31xmuyFyfLOg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", "dependencies": { - "@types/http-proxy": "^1.17.5", + "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", "is-glob": "^4.0.1", "is-plain-obj": "^3.0.0", @@ -1297,6 +1387,14 @@ }, "engines": { "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } } }, "node_modules/http-proxy-response-rewrite": { @@ -1378,9 +1476,9 @@ } }, "node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -1530,7 +1628,7 @@ "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "engines": { "node": ">= 0.6" } @@ -1538,7 +1636,7 @@ "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/merge-stream": { "version": "2.0.0", @@ -1549,18 +1647,18 @@ "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "engines": { "node": ">= 0.6" } }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" @@ -1578,19 +1676,19 @@ } }, "node_modules/mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { - "mime-db": "1.50.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" @@ -1620,7 +1718,7 @@ "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -1629,9 +1727,9 @@ "dev": true }, "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "engines": { "node": ">= 0.6" } @@ -1648,10 +1746,18 @@ "node": ">=8" } }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { "ee-first": "1.1.1" }, @@ -1741,7 +1847,7 @@ "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "node_modules/picocolors": { "version": "1.0.0", @@ -1750,9 +1856,9 @@ "dev": true }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, @@ -1796,11 +1902,17 @@ } }, "node_modules/qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/querystring": { @@ -1821,12 +1933,12 @@ } }, "node_modules/raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dependencies": { - "bytes": "3.1.0", - "http-errors": "1.7.2", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, @@ -1872,7 +1984,7 @@ "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/resolve-from": { "version": "4.0.0", @@ -1924,51 +2036,51 @@ } }, "node_modules/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dependencies": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.7.2", + "http-errors": "2.0.0", "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", + "ms": "2.1.3", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/send/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.1" + "send": "0.18.0" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -1991,6 +2103,19 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", @@ -2017,11 +2142,11 @@ } }, "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/string_decoder": { @@ -2119,9 +2244,9 @@ } }, "node_modules/toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { "node": ">=0.6" } @@ -2179,7 +2304,7 @@ "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "engines": { "node": ">= 0.8" } @@ -2201,7 +2326,7 @@ "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "engines": { "node": ">= 0.4.0" } @@ -2223,7 +2348,7 @@ "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { "node": ">= 0.8" } @@ -2276,9 +2401,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", + "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", "engines": { "node": ">=10.0.0" }, @@ -2529,25 +2654,25 @@ "dev": true }, "@types/http-proxy": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", - "integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==", + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", + "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", "requires": { "@types/node": "*" } }, "@types/node": { - "version": "16.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz", - "integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==" + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", + "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" }, "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" } }, "acorn": { @@ -2602,13 +2727,13 @@ } }, "alexa-cookie2": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.1.tgz", - "integrity": "sha512-Ylk+iulA9/LHmxvH1PW/0z0GbW82vfaQG3ubjejGBlQVuK8nDoH7uwY5XJgA3Fy0FK0etj6ce6AtxBMx4aJkJA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.2.tgz", + "integrity": "sha512-nyZUDE3iJOleJxXZb1zB3r2Wq0m3qrEeNXOJbo/AVCX8Tekrya5UzF3otBGeX9wuEeU6Cmz9DM6i8CSFgKIcfA==", "requires": { - "cookie": "^0.4.1", - "express": "^4.17.1", - "http-proxy-middleware": "^2.0.1", + "cookie": "^0.5.0", + "express": "^4.18.1", + "http-proxy-middleware": "^2.0.6", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.1" @@ -2644,7 +2769,7 @@ "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "asynckit": { "version": "0.4.0", @@ -2669,20 +2794,22 @@ "dev": true }, "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", + "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", "requires": { - "bytes": "3.1.0", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "on-finished": "2.4.1", + "qs": "6.10.3", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" } }, "brace-expansion": { @@ -2714,9 +2841,18 @@ "integrity": "sha1-+nSjhXJKWOJC8ErWZGwjZvg7kT4=" }, "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } }, "callsites": { "version": "3.1.0", @@ -2787,11 +2923,18 @@ } }, "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.2.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } } }, "content-type": { @@ -2800,14 +2943,14 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "core-util-is": { "version": "1.0.3", @@ -2846,14 +2989,14 @@ "dev": true }, "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" }, "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, "doctrine": { "version": "3.0.0", @@ -2867,7 +3010,7 @@ "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "emoji-regex": { "version": "8.0.0", @@ -2878,7 +3021,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" }, "enquirer": { "version": "2.3.6", @@ -2898,7 +3041,7 @@ "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "escape-string-regexp": { "version": "4.0.0", @@ -2907,9 +3050,9 @@ "dev": true }, "eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -3043,7 +3186,7 @@ "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" }, "eventemitter3": { "version": "4.0.7", @@ -3068,46 +3211,47 @@ } }, "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", + "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "body-parser": "1.20.0", + "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.0", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", + "proxy-addr": "~2.0.7", + "qs": "6.10.3", "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "dependencies": { - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" } } }, @@ -3152,16 +3296,16 @@ } }, "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" } }, @@ -3205,7 +3349,7 @@ "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" }, "fs-extra": { "version": "10.1.0", @@ -3224,6 +3368,11 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -3236,6 +3385,16 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3292,22 +3451,35 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" } }, "http-proxy": { @@ -3321,11 +3493,11 @@ } }, "http-proxy-middleware": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.1.tgz", - "integrity": "sha512-cfaXRVoZxSed/BmkA7SwBVNI9Kj7HFltaE5rqYOub5kWzWZ+gofV2koVN1j2rMW7pEfSSlCHGJ31xmuyFyfLOg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", "requires": { - "@types/http-proxy": "^1.17.5", + "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", "is-glob": "^4.0.1", "is-plain-obj": "^3.0.0", @@ -3393,9 +3565,9 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ipaddr.js": { "version": "1.9.1", @@ -3507,12 +3679,12 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "merge-stream": { "version": "2.0.0", @@ -3523,15 +3695,15 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" }, "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" } }, "mime": { @@ -3540,16 +3712,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==" + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "requires": { - "mime-db": "1.50.0" + "mime-db": "1.52.0" } }, "mimic-fn": { @@ -3570,7 +3742,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "natural-compare": { "version": "1.4.0", @@ -3579,9 +3751,9 @@ "dev": true }, "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, "npm-run-path": { "version": "4.0.1", @@ -3592,10 +3764,15 @@ "path-key": "^3.0.0" } }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + }, "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "requires": { "ee-first": "1.1.1" } @@ -3661,7 +3838,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "picocolors": { "version": "1.0.0", @@ -3670,9 +3847,9 @@ "dev": true }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, "prelude-ls": { "version": "1.2.1", @@ -3701,9 +3878,12 @@ "dev": true }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "requires": { + "side-channel": "^1.0.4" + } }, "querystring": { "version": "0.2.1", @@ -3716,12 +3896,12 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" } @@ -3755,7 +3935,7 @@ "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "resolve-from": { "version": "4.0.0", @@ -3792,47 +3972,47 @@ } }, "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.7.2", + "http-errors": "2.0.0", "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", + "ms": "2.1.3", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "dependencies": { "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.1" + "send": "0.18.0" } }, "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "shebang-command": { "version": "2.0.0", @@ -3849,6 +4029,16 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", @@ -3872,9 +4062,9 @@ } }, "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" }, "string_decoder": { "version": "1.1.1", @@ -3950,9 +4140,9 @@ } }, "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" }, "type-check": { "version": "0.4.0", @@ -3992,7 +4182,7 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" }, "uri-js": { "version": "4.4.1", @@ -4011,7 +4201,7 @@ "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { "version": "8.3.2", @@ -4027,7 +4217,7 @@ "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" }, "which": { "version": "2.0.2", @@ -4062,9 +4252,9 @@ "dev": true }, "ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", + "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index 67b3734c..baf8a3e3 100644 --- a/package.json +++ b/package.json @@ -29,17 +29,17 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^4.0.1", + "alexa-cookie2": "^4.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.5.0", + "ws": "^8.8.0", "extend": "^3.0.2", "uuid": "^8.3.2" }, "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.16.0" + "eslint": "^8.18.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From dab8c99eb047853359a067d530d1324b4c930449 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 02:01:15 +0000 Subject: [PATCH 222/356] chore(deps): bump actions/setup-node from 3.2.0 to 3.3.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.2.0...v3.3.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 09e2655f..593042f4 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.2.0 + uses: actions/setup-node@v3.3.0 with: node-version: ${{ matrix.node-version }} @@ -59,7 +59,7 @@ jobs: uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.2.0 + uses: actions/setup-node@v3.3.0 with: node-version: ${{ matrix.node-version }} From 5cf672cc78798621f1b274f203135e5e562748b9 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 1 Jul 2022 08:40:26 +0200 Subject: [PATCH 223/356] * (Apollon77/hive) Correctly end all timers on disconnect * (Apollon77/hive) Optimize authentication check when no cookie is set --- README.md | 2 ++ alexa-remote.js | 38 +++++++++++++++++++++++++++----------- alexa-wsmqtt.js | 31 ++++++++++++++++++++++--------- 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index f546c616..b731568c 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ Thank you for that work. * (Apollon77) Adjust logic to get the "global" ownerCustomerId and use Authentication response from session verification call * (Apollon77) Add getAuthenticationDetails() method to get the Authentication response from the last successful session verification call * (Apollon77) Prevent some crash cases +* (Apollon77/hive) Correctly end all timers on disconnect +* (Apollon77/hive) Optimize authentication check when no cookie is set ### 4.1.2 (2022-02-20) * (TactfulElf) Allow csrf to be updated on cookie refresh and add 401 error handling diff --git a/alexa-remote.js b/alexa-remote.js index a486c86b..fe62cb13 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -328,6 +328,17 @@ class AlexaRemote extends EventEmitter { } } + stopProxyServer(callback) { + if (!this.alexaCookie) { + return callback && callback(); + } + this.alexaCookie.stopProxyServer(callback); + } + + isWsMqttConnected() { + return this.alexaWsMqtt && this.alexaWsMqtt.isConnected(); + } + initWsMqttConnection() { if (this.alexaWsMqtt) { this.alexaWsMqtt.removeAllListeners(); @@ -915,17 +926,22 @@ class AlexaRemote extends EventEmitter { /// Public checkAuthentication(callback) { - this.httpsGetCall ('/api/bootstrap?version=0', function (err, res) { - if (res && res.authentication && res.authentication.authenticated !== undefined) { - this.authenticationDetails = res.authentication; - this.ownerCustomerId = res.authentication.customerId; - return callback(res.authentication.authenticated, err); - } - if (err && !err.message.includes('no body')) { - return callback(null, err); - } - callback(false, err); - }); + // If we don't have a cookie assigned, we can't be authenticated + if (this.cookie && this.csrf) { + this.httpsGetCall('/api/bootstrap?version=0', function (err, res) { + if (res && res.authentication && res.authentication.authenticated !== undefined) { + this.authenticationDetails = res.authentication; + this.ownerCustomerId = res.authentication.customerId; + return callback(res.authentication.authenticated, err); + } + if (err && !err.message.includes('no body')) { + return callback(null, err); + } + callback(false, err); + }); + } else { + callback(false, null); + } } diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index cc7975b8..71d9dc35 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -23,11 +23,16 @@ class AlexaWsMqtt extends EventEmitter { this.errorRetryCounter = 0; this.reconnectTimeout = null; this.pongTimeout = null; + this.initTimeout = null; this.connectionActive = false; this.messageId = Math.floor(1E9 * Math.random()); } + isConnected() { + return this.connectionActive; + } + connectType1() { const urlTime = Date.now(); let amazonPage = '.' + this._options.amazonPage; @@ -176,7 +181,7 @@ class AlexaWsMqtt extends EventEmitter { return; } let msgCounter = 0; - let initTimeout = null; + this.initTimeout && clearTimeout(this.initTimeout); const onWebsocketClose = (code, reason) => { if (reason) { @@ -185,9 +190,9 @@ class AlexaWsMqtt extends EventEmitter { this.websocket = null; this.connectionActive = false; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Close: ' + code + ': ' + reason); - if (initTimeout) { - clearTimeout(initTimeout); - initTimeout = null; + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; } if (this.pingPongInterval) { clearInterval(this.pingPongInterval); @@ -220,7 +225,7 @@ class AlexaWsMqtt extends EventEmitter { }, retryDelay * 1000); }; - initTimeout = setTimeout(() => { + this.initTimeout = setTimeout(() => { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization not done within 30s'); try { this.websocket && this.websocket.close(); @@ -352,9 +357,9 @@ class AlexaWsMqtt extends EventEmitter { //if (incomingMsg.includes('PON') && incomingMsg.includes('\u0000R\u0000e\u0000g\u0000u\u0000l\u0000a\u0000r')) { if (message.service === 'FABE' && message.content && message.content.messageType === 'PON' && message.content.payloadData && message.content.payloadData.includes('\u0000R\u0000e\u0000g\u0000u\u0000l\u0000a\u0000r')) { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Received Pong'); - if (initTimeout) { - clearTimeout(initTimeout); - initTimeout = null; + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization completed'); this.emit('connect'); } @@ -825,12 +830,20 @@ class AlexaWsMqtt extends EventEmitter { clearTimeout(this.reconnectTimeout); this.reconnectTimeout = null; } + if (this.pollingTimeout) { + clearTimeout(this.pollingTimeout); + this.pollingTimeout = null; + } + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; + } this.stop = true; if (!this.websocket) return; try { this.websocket.close(); } catch (e) { - this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Disconnect error: ' + e.message); + this.connectionActive && this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Disconnect error: ' + e.message); } } } From 33564ffab97ade1e91e3c745fb712353b0eea6f3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 1 Jul 2022 08:41:27 +0200 Subject: [PATCH 224/356] * readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b731568c..a195546e 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ Thank you for that work. * (Apollon77) Prevent some crash cases * (Apollon77/hive) Correctly end all timers on disconnect * (Apollon77/hive) Optimize authentication check when no cookie is set +* (Apollon77) Add method isWsMqttConnected() to query if the WS-MQTT connection is established or not +* (Apollon77/hive) Add method stopProxyServer() to stop the proxy server pot. opened from getting a new cookie ### 4.1.2 (2022-02-20) * (TactfulElf) Allow csrf to be updated on cookie refresh and add 401 error handling From c46aabaccacccca801afaa7bbf92d788e3672f57 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 1 Jul 2022 10:05:40 +0200 Subject: [PATCH 225/356] fix --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index fe62cb13..8ffef114 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -928,7 +928,7 @@ class AlexaRemote extends EventEmitter { checkAuthentication(callback) { // If we don't have a cookie assigned, we can't be authenticated if (this.cookie && this.csrf) { - this.httpsGetCall('/api/bootstrap?version=0', function (err, res) { + this.httpsGetCall('/api/bootstrap?version=0', (err, res) => { if (res && res.authentication && res.authentication.authenticated !== undefined) { this.authenticationDetails = res.authentication; this.ownerCustomerId = res.authentication.customerId; From 6f61ad8dc0991dd0c2e67701aa329009cc6bb5e5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 1 Jul 2022 17:47:20 +0200 Subject: [PATCH 226/356] * (Apollon77) Add option to also query the App Devices to allow to send commands to them * (Apollon77) Rework Multiroom for commands * (Apollon77) Fix Routine Naming if triggers were used * (Apollon77) Sort out History entries als when "Ziggy" is used as wakeword --- alexa-remote.js | 102 +++++++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 40 deletions(-) diff --git a/alexa-remote.js b/alexa-remote.js index 8ffef114..92f77244 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -255,7 +255,21 @@ class AlexaRemote extends EventEmitter { this.getDevices((err, result) => { if (!err && result && Array.isArray(result.devices)) { const customerIds = {}; + const joinedDevices = []; + result.devices.forEach((device) => { + joinedDevices.push(device); + if (device.appDeviceList && device.appDeviceList.length) { + device.appDeviceList.forEach(subDevice => { + const appDevice = Object.assign({}, device, subDevice); + appDevice.parentDeviceSerialNumber = device.serialNumber; + appDevice.appDeviceList = []; + joinedDevices.push(appDevice); + }); + } + }); + + joinedDevices.forEach((device) => { const existingDevice = this.find(device.serialNumber); if (!existingDevice) { this.serialNumbers[device.serialNumber] = device; @@ -1423,6 +1437,7 @@ class AlexaRemote extends EventEmitter { case 'echo': case 'computer': case 'amazon': + case 'ziggy': case ',': case '': continue; @@ -1549,6 +1564,7 @@ class AlexaRemote extends EventEmitter { case 'echo': case 'computer': case 'amazon': + case 'ziggy': case ',': case '': continue; @@ -1737,15 +1753,7 @@ class AlexaRemote extends EventEmitter { ); } - createSequenceNode(command, value, serialOrName, overrideCustomerId, callback) { - if (typeof overrideCustomerId === 'function') { - callback = overrideCustomerId; - overrideCustomerId = null; - } - if (typeof serialOrName === 'function') { - callback = serialOrName; - serialOrName = undefined; - } + createSequenceNode(command, value, serialOrName, overrideCustomerId) { let deviceSerialNumber = 'ALEXA_CURRENT_DSN'; let deviceType= 'ALEXA_CURRENT_DEVICE_TYPE'; let deviceOwnerCustomerId = 'ALEXA_CUSTOMER_ID'; @@ -1824,7 +1832,7 @@ class AlexaRemote extends EventEmitter { seqNode.type = 'Alexa.DeviceControls.Volume'; value = ~~value; if (value < 0 || value > 100) { - return callback && callback(new Error('Volume needs to be between 0 and 100')); + throw new Error('Volume needs to be between 0 and 100'); } seqNode.operationPayload.value = value; break; @@ -1876,10 +1884,10 @@ class AlexaRemote extends EventEmitter { .replace(/ /g,'_');*/ value = value.replace(/[ ]+/g, ' '); if (value.length === 0) { - return callback && callback(new Error('Can not speak empty string', null)); + throw new Error('Can not speak empty string', null); } if (value.length > 250) { - return callback && callback(new Error('text too long, limit are 250 characters', null)); + throw new Error('text too long, limit are 250 characters', null); } seqNode.operationPayload.textToSpeak = value; break; @@ -1887,7 +1895,7 @@ class AlexaRemote extends EventEmitter { seqNode.type = 'Alexa.Operation.SkillConnections.Launch'; if (typeof value !== 'string') value = String(value); if (value.length === 0) { - return callback && callback(new Error('Can not launch empty skill', null)); + throw new Error('Can not launch empty skill', null); } seqNode.skillId = value; seqNode.operationPayload.targetDevice = { @@ -1906,7 +1914,7 @@ class AlexaRemote extends EventEmitter { seqNode.type = 'Alexa.Notifications.SendMobilePush'; if (typeof value !== 'string') value = String(value); if (value.length === 0) { - return callback && callback(new Error('Can not notify empty string'), null); + throw new Error('Can not notify empty string'); } seqNode.operationPayload.notificationMessage = value; seqNode.operationPayload.alexaUrl = '#v2/behaviors'; @@ -1925,12 +1933,12 @@ class AlexaRemote extends EventEmitter { } value = value.replace(/[ ]+/g, ' '); if (value.length === 0) { - return callback && callback(new Error('Can not speak empty string', null)); + throw new Error('Can not speak empty string', null); } } else if (command === 'ssml') { if (!value.startsWith('')) { - return callback && callback(new Error('Value needs to be a valid SSML XML string', null)); + throw new Error('Value needs to be a valid SSML XML string', null); } } seqNode.operationPayload.expireAfter = 'PT5S'; @@ -1978,35 +1986,45 @@ class AlexaRemote extends EventEmitter { return seqNode; } - sendMultiSequenceCommand(serialOrName, commands, sequenceType, overrideCustomerId, callback) { - if (typeof overrideCustomerId === 'function') { - callback = overrideCustomerId; - overrideCustomerId = null; - } - if (typeof sequenceType === 'function') { - callback = sequenceType; - sequenceType = null; - } + buildSequenceNodeStructure(serialOrName, commands, sequenceType, overrideCustomerId) { if (!sequenceType) sequenceType = 'SerialNode'; // or ParallelNode const nodes = []; for (const command of commands) { - const commandNode = this.createSequenceNode(command.command, command.value, command.device ? command.device : serialOrName, overrideCustomerId, callback); - if (commandNode) nodes.push(commandNode); + if (command.nodes) { + const subSequence = this.buildSequenceNodeStructure(serialOrName, command.nodes, command.sequenceType || sequenceType, overrideCustomerId); + if (subSequence) { + nodes.push(subSequence); + } + } else { + const commandNode = this.createSequenceNode(command.command, command.value, command.device || serialOrName, overrideCustomerId); + if (commandNode) { + nodes.push(commandNode); + } + } } const sequenceObj = { - 'sequence': { - '@type': 'com.amazon.alexa.behaviors.model.Sequence', - 'startNode': { - '@type': 'com.amazon.alexa.behaviors.model.' + sequenceType, - 'name': null, - 'nodesToExecute': nodes - } - } + '@type': 'com.amazon.alexa.behaviors.model.' + sequenceType, + 'name': null, + 'nodesToExecute': nodes }; + return sequenceObj; + } - this.sendSequenceCommand(serialOrName, sequenceObj, callback); + sendMultiSequenceCommand(serialOrName, commands, sequenceType, overrideCustomerId, callback) { + try { + const sequenceObj = { + 'sequence': { + '@type': 'com.amazon.alexa.behaviors.model.Sequence', + 'startNode': this.buildSequenceNodeStructure(serialOrName, commands, sequenceType, overrideCustomerId) + } + }; + + this.sendSequenceCommand(serialOrName, sequenceObj, callback); + } catch (err) { + callback && callback(err, null); + } } sendSequenceCommand(serialOrName, command, value, overrideCustomerId, callback) { @@ -2028,10 +2046,14 @@ class AlexaRemote extends EventEmitter { seqCommandObj = command.sequence || command; } else { - seqCommandObj = { - '@type': 'com.amazon.alexa.behaviors.model.Sequence', - 'startNode': this.createSequenceNode(command, value, dev, overrideCustomerId) - }; + try { + seqCommandObj = { + '@type': 'com.amazon.alexa.behaviors.model.Sequence', + 'startNode': this.createSequenceNode(command, value, dev, overrideCustomerId) + }; + } catch (err) { + return callback && callback(err, null); + } } const reqObj = { From db8bede99ce59836126218a86143088ab24fdd39 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 2 Jul 2022 11:15:31 +0200 Subject: [PATCH 227/356] * last updates * update types --- README.md | 10 ++-- alexa-remote.d.ts | 42 +++++++++++++---- alexa-remote.js | 114 ++++++++++++++++++++++++++-------------------- 3 files changed, 106 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index a195546e..d60747cb 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,17 @@ Thank you for that work. ## Changelog: ### __WORK IN PROGRESS__ +* BREAKING: SequenceNode methods throws an error on invalid data instead calling callback with error as before! +* (Apollon77) Enhance multi sequence Node methods to support building node structures with sub Parallel/SerialNodes * (Apollon77) Adjust logic to get the "global" ownerCustomerId and use Authentication response from session verification call * (Apollon77) Add getAuthenticationDetails() method to get the Authentication response from the last successful session verification call -* (Apollon77) Prevent some crash cases -* (Apollon77/hive) Correctly end all timers on disconnect -* (Apollon77/hive) Optimize authentication check when no cookie is set * (Apollon77) Add method isWsMqttConnected() to query if the WS-MQTT connection is established or not * (Apollon77/hive) Add method stopProxyServer() to stop the proxy server pot. opened from getting a new cookie +* (Apollon77) Adjust setTuneIn method to work again for stationIds (s*) and topicIds (t*) +* (Apollon77) Do an automatic request retry with a delay of 500-1000ms (random) when error 503 is returned from Amazon services +* (Apollon77/hive) Correctly end all timers on disconnect +* (Apollon77/hive) Optimize authentication check when no cookie is set +* (Apollon77) Prevent some crash cases ### 4.1.2 (2022-02-20) * (TactfulElf) Allow csrf to be updated on cookie refresh and add 401 error handling diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index 4bc26f31..26af9b4c 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -76,6 +76,8 @@ declare module "alexa-remote2" { export type SerialOrName = Serial | string; + export type SerialOrNameOrArray = SerialOrName | SerialOrName[] + export type Value = string | number | boolean; export type Sound = { @@ -146,6 +148,14 @@ declare module "alexa-remote2" { includeUserName: boolean; }>; + export type GetAuthenticationDetails = { + authenticated: boolean; + canAccessPrimeMusicContent: boolean; + customerEmail: string; + customerId: string; + customerName: string; + }; + export type MessageCommands = | "play" | "pause" @@ -180,14 +190,19 @@ declare module "alexa-remote2" { | "announcement" | "ssml"; - export type SequneceType = "SerialNode" | "ParallelNode"; + export type SequenceType = "SerialNode" | "ParallelNode"; export type EntityType = "APPLIANCE" | "GROUP"; - export type MultiSequenceCommand = { + export type SequenceNodeDetails = { command: SequenceNodeCommand; value: Value; - device?: SerialOrName; + device?: SerialOrNameOrArray; + } + + export type MultiSequenceCommand = SequenceNodeDetails | { + sequencetype: SequenceType; + nodes: MultiSequenceCommand[]; }; import {EventEmitter} from 'events'; @@ -413,19 +428,24 @@ declare module "alexa-remote2" { createSequenceNode( command: SequenceNodeCommand, value: Value, - serialOrName: SerialOrName, - callback: CallbackWithErrorAndBody + serialOrName: SerialOrNameOrArray + ): void; + + buildSequenceNodeStructure( + serialOrName: SerialOrNameOrArray, + commands: MultiSequenceCommand[], + sequenceType?: SequenceType | CallbackWithErrorAndBody, ): void; sendMultiSequenceCommand( - serialOrName: SerialOrName, + serialOrName: SerialOrNameOrArray, commands: MultiSequenceCommand[], - sequenceType?: SequneceType | CallbackWithErrorAndBody, + sequenceType?: SequenceType | CallbackWithErrorAndBody, callback?: CallbackWithErrorAndBody ): void; sendSequenceCommand( - serialOrName: SerialOrName, + serialOrName: SerialOrNameOrArray, command: SequenceNodeCommand, value: Value, callback: CallbackWithErrorAndBody @@ -528,5 +548,11 @@ declare module "alexa-remote2" { serialOrName: SerialOrName, callback: CallbackWithErrorAndBody ): void; + + getAuthenticationDetails(): GetAuthenticationDetails; + + isWsMqttConnected(): boolean; + + stopProxyServer(callback: CallbackWithError): void } } diff --git a/alexa-remote.js b/alexa-remote.js index 92f77244..cb7d5b2f 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -10,7 +10,7 @@ const EventEmitter = require('events'); function _00(val) { let s = val.toString(); - while (s.length < 2) s = '0' + s; + while (s.length < 2) s = `0${s}`; return s; } @@ -50,7 +50,7 @@ class AlexaRemote extends EventEmitter { } if (!this.cookie || typeof this.cookie !== 'string') return; - let ar = this.cookie.match(/csrf=([^;]+)/); + const ar = this.cookie.match(/csrf=([^;]+)/); if (ar && ar.length >= 2) { this.csrf = ar[1]; } @@ -80,14 +80,14 @@ class AlexaRemote extends EventEmitter { } } this._options.amazonPage = this._options.amazonPage || 'amazon.de'; - this.baseUrl = 'alexa.' + this._options.amazonPage; + this.baseUrl = `alexa.${this._options.amazonPage}`; cookie = this._options.cookie; } - this._options.logger && this._options.logger('Alexa-Remote: Use as User-Agent: ' + this._options.userAgent); - this._options.logger && this._options.logger('Alexa-Remote: Use as Login-Amazon-URL: ' + this._options.amazonPage); + this._options.logger && this._options.logger(`Alexa-Remote: Use as User-Agent: ${this._options.userAgent}`); + this._options.logger && this._options.logger(`Alexa-Remote: Use as Login-Amazon-URL: ${this._options.amazonPage}`); if (this._options.alexaServiceHost) this.baseUrl = this._options.alexaServiceHost; - this._options.logger && this._options.logger('Alexa-Remote: Use as Base-URL: ' + this.baseUrl); + this._options.logger && this._options.logger(`Alexa-Remote: Use as Base-URL: ${this.baseUrl}`); this._options.alexaServiceHost = this.baseUrl; if (this._options.refreshCookieInterval !== undefined && this._options.cookieRefreshInterval === undefined) { this._options.cookieRefreshInterval = this._options.refreshCookieInterval; @@ -146,9 +146,9 @@ class AlexaRemote extends EventEmitter { if (!this.csrf) return callback && callback(new Error('no csrf found')); this.checkAuthentication((authenticated, err) => { if (err && authenticated === null) { - return callback && callback(new Error('Error while checking Authentication: ' + err)); + return callback && callback(new Error(`Error while checking Authentication: ${err}`)); } - this._options.logger && this._options.logger('Alexa-Remote: Authentication checked: ' + authenticated); + this._options.logger && this._options.logger(`Alexa-Remote: Authentication checked: ${authenticated}`); if ((!authenticated && !this._options.cookieJustCreated) || !this.macDms) { this._options.logger && !this.macDms && this._options.logger('Alexa-Remote: JWT missing, forcing a refresh ...'); this._options.logger && this._options.logger('Alexa-Remote: Cookie was set, but authentication invalid'); @@ -210,10 +210,8 @@ class AlexaRemote extends EventEmitter { this.getNotifications((err, res) => { if (err || !res || !res.notifications || !Array.isArray(res.notifications)) return callback && callback(); - for (const serialNumber in this.serialNumbers) { - if (this.serialNumbers.hasOwnProperty(serialNumber)) { - this.serialNumbers[serialNumber].notifications = []; - } + for (const serialNumber of Object.keys(this.serialNumbers)) { + this.serialNumbers[serialNumber].notifications = []; } res.notifications.forEach((noti) => { @@ -281,7 +279,7 @@ class AlexaRemote extends EventEmitter { this.names [name] = device; this.names [name.toLowerCase()] = device; if (device.deviceTypeFriendlyName) { - name += ' (' + device.deviceTypeFriendlyName + ')'; + name += ` (${device.deviceTypeFriendlyName})`; this.names [name] = device; this.names [name.toLowerCase()] = device; } @@ -684,26 +682,26 @@ class AlexaRemote extends EventEmitter { this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false}, (err, res) => { this.activityUpdateRunning = false; if (!err && res) { - this._options.logger && this._options.logger('Alexa-Remote: Activity data ' + JSON.stringify(res)); // TODO REMOVE + this._options.logger && this._options.logger(`Alexa-Remote: Activity data ${JSON.stringify(res)}`); // TODO REMOVE let lastFoundQueueIndex = -1; this.activityUpdateQueue.forEach((entry, queueIndex) => { - const found = res.findIndex(activity => activity.data.recordKey.endsWith('#' + entry.key.entryId) && activity.data.customerId === entry.key.registeredUserId); + const found = res.findIndex(activity => activity.data.recordKey.endsWith(`#${entry.key.entryId}`) && activity.data.customerId === entry.key.registeredUserId); if (found === -1) { - this._options.logger && this._options.logger('Alexa-Remote: Activity for id ' + entry.key.entryId + ' not found'); + this._options.logger && this._options.logger(`Alexa-Remote: Activity for id ${entry.key.entryId} not found`); } else { lastFoundQueueIndex = queueIndex; const activity = res.splice(found, 1)[0]; - this._options.logger && this._options.logger('Alexa-Remote: Activity found ' + found + ' for Activity ID ' + entry.key.entryId); + this._options.logger && this._options.logger(`Alexa-Remote: Activity found ${found} for Activity ID ${entry.key.entryId}`); activity.destinationUserId = entry.destinationUserId; this.emit('ws-device-activity', activity); } }); if (lastFoundQueueIndex === -1) { - this._options.logger && this._options.logger('Alexa-Remote: No activities from stored ' + this.activityUpdateQueue.length + ' entries found in queue (' + this.activityUpdateNotFoundCounter + ')'); + this._options.logger && this._options.logger(`Alexa-Remote: No activities from stored ${this.activityUpdateQueue.length} entries found in queue (${this.activityUpdateNotFoundCounter})`); this.activityUpdateNotFoundCounter++; if (this.activityUpdateNotFoundCounter > 5) { this._options.logger && this._options.logger('Alexa-Remote: Reset expected activities'); @@ -714,7 +712,7 @@ class AlexaRemote extends EventEmitter { else { this.activityUpdateNotFoundCounter = 0; this.activityUpdateQueue.splice(0, lastFoundQueueIndex + 1); - this._options.logger && this._options.logger('Alexa-Remote: ' + this.activityUpdateQueue.length + ' entries left in activity queue'); + this._options.logger && this._options.logger(`Alexa-Remote: ${this.activityUpdateQueue.length} entries left in activity queue`); } } @@ -758,7 +756,7 @@ class AlexaRemote extends EventEmitter { } // bypass check because set or last check done before less then 10 mins if (noCheck || (new Date().getTime() - this.lastAuthCheck) < 600000) { - this._options.logger && this._options.logger('Alexa-Remote: No authentication check needed (time elapsed ' + (new Date().getTime() - this.lastAuthCheck) + ')'); + this._options.logger && this._options.logger(`Alexa-Remote: No authentication check needed (time elapsed ${new Date().getTime() - this.lastAuthCheck})`); return this.httpsGetCall(path, callback, flags); } this.checkAuthentication((authenticated, err) => { @@ -768,7 +766,7 @@ class AlexaRemote extends EventEmitter { return this.httpsGetCall(path, callback, flags); } else if (err && authenticated === null) { - this._options.logger && this._options.logger('Alexa-Remote: Authentication check returned error: ' + err + '. Still try request'); + this._options.logger && this._options.logger(`Alexa-Remote: Authentication check returned error: ${err}. Still try request`); return this.httpsGetCall(path, callback, flags); } this._options.logger && this._options.logger('Alexa-Remote: Authentication check Error, try re-init'); @@ -787,11 +785,18 @@ class AlexaRemote extends EventEmitter { httpsGetCall(path, callback, flags = {}) { const handleResponse = (err, res, body) => { - if (!err && typeof res.statusCode === 'number' && res.statusCode == 401) { + if (!err && typeof res.statusCode === 'number' && res.statusCode === 401) { this._options.logger && this._options.logger('Alexa-Remote: Response: 401 Unauthorized'); return callback(new Error('401 Unauthorized'), null); } + if (!err && typeof res.statusCode === 'number' && res.statusCode === 503 && flags && !flags.isRetry) { + this._options.logger && this._options.logger('Alexa-Remote: Response: 503 ... Retrying once'); + flags = flags || {}; + flags.isRetry = true; + return setTimeout(() => this.httpsGetCall(path, callback, flags), Math.floor(Math.random() * 500) + 500); + } + if (err || !body) { // Method 'DELETE' may return HTTP STATUS 200 without body this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); return typeof res.statusCode === 'number' && res.statusCode >= 200 && res.statusCode < 300 ? callback(null, {'success': true}) : callback(new Error('no body'), null); @@ -802,19 +807,19 @@ class AlexaRemote extends EventEmitter { ret = JSON.parse(body); } catch (e) { if (typeof res.statusCode === 'number' && res.statusCode >= 500 && res.statusCode < 510) { - this._options.logger && this._options.logger('Alexa-Remote: Response: Status: ' + res.statusCode); + this._options.logger && this._options.logger(`Alexa-Remote: Response: Status: ${res.statusCode}`); callback(new Error('no body'), null); callback = null; return; } - this._options.logger && this._options.logger('Alexa-Remote: Response: No/Invalid JSON : ' + body); + this._options.logger && this._options.logger(`Alexa-Remote: Response: No/Invalid JSON : ${body}`); callback && callback(new Error('no JSON'), body); callback = null; return; } - this._options.logger && this._options.logger('Alexa-Remote: Response: ' + JSON.stringify(ret)); + this._options.logger && this._options.logger(`Alexa-Remote: Response: ${JSON.stringify(ret)}`); callback(null, ret); callback = null; }; @@ -842,7 +847,7 @@ class AlexaRemote extends EventEmitter { if (!path.startsWith('/')) { path = path.replace(/^https:\/\//, ''); //let ar = path.match(/^([^\/]+)(\/.*$)/); - const ar = path.match(/^([^\/]+)([\/]*.*$)/); + const ar = path.match(/^([^/]+)(\/*.*$)/); options.host = ar[1]; path = ar[2]; } else { @@ -867,7 +872,7 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers.Accept; delete logOptions.headers.Referer; delete logOptions.headers.Origin; - this._options.logger && this._options.logger('Alexa-Remote: Sending Request with ' + JSON.stringify(logOptions) + ((options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ' and data=' + flags.data : '')); + this._options.logger && this._options.logger(`Alexa-Remote: Sending Request with ${JSON.stringify(logOptions)}${(options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ` and data=${flags.data}` : ''}`); let req; let responseReceived = false; @@ -899,7 +904,7 @@ class AlexaRemote extends EventEmitter { }); }); } catch(err) { - this._options.logger && this._options.logger('Alexa-Remote: Response: Exception: ' + err); + this._options.logger && this._options.logger(`Alexa-Remote: Response: Exception: ${err}`); if (typeof callback === 'function'/* && callback.length >= 2*/) { callback (err, null); callback = null; @@ -908,7 +913,7 @@ class AlexaRemote extends EventEmitter { } req.on('error', (e) => { - this._options.logger && this._options.logger('Alexa-Remote: Response: Error: ' + e); + this._options.logger && this._options.logger(`Alexa-Remote: Response: Error: ${e}`); if (!responseReceived && typeof callback === 'function'/* && callback.length >= 2*/) { callback (e, null); callback = null; @@ -995,7 +1000,7 @@ class AlexaRemote extends EventEmitter { } getList(listId, callback) { - this.httpsGet ('/api/namedLists/' + listId + '?_=%t', callback); + this.httpsGet (`/api/namedLists/${listId}?_=%t`, callback); } /** @@ -1021,11 +1026,11 @@ class AlexaRemote extends EventEmitter { // get params by options let params = ''; for (const option in options) { - params += '&' + option + '=' + options[option]; + params += `&${option}=${options[option]}`; } // send request - this.httpsGet ('/api/namedLists/' + listId + '/items?_=%t' + params, (err, res) => callback && callback(err, res && res.list)); + this.httpsGet (`/api/namedLists/${listId}/items?_=%t${params}`, (err, res) => callback && callback(err, res && res.list)); } addListItem(listId, options, callback) { @@ -1047,7 +1052,7 @@ class AlexaRemote extends EventEmitter { }; // send request - this.httpsGet ('/api/namedLists/' + listId + '/item', callback, request); + this.httpsGet (`/api/namedLists/${listId}/item`, callback, request); } updateListItem(listId, listItem, options, callback) { @@ -1080,7 +1085,7 @@ class AlexaRemote extends EventEmitter { }; // send request - this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); + this.httpsGet (`/api/namedLists/${listId}/item/${listItem}`, callback, request); } deleteListItem(listId, listItem, callback) { @@ -1103,7 +1108,7 @@ class AlexaRemote extends EventEmitter { }; // send request - this.httpsGet ('/api/namedLists/' + listId + '/item/' + listItem, callback, request); + this.httpsGet (`/api/namedLists/${listId}/item/${listItem}`, callback, request); } getWakeWords(callback) { @@ -1180,7 +1185,7 @@ class AlexaRemote extends EventEmitter { }*/ 'originalDate': `${now.getFullYear()}-${_00(now.getMonth() + 1)}-${_00(now.getDate())}`, 'originalTime': `${_00(now.getHours())}:${_00(now.getMinutes())}:${_00(now.getSeconds())}.000`, - 'id': 'create' + type, + 'id': `create${type}`, 'isRecurring' : false, 'recurringPattern': null, @@ -1287,7 +1292,7 @@ class AlexaRemote extends EventEmitter { } } - const originalDateTime = notification.originalDate + ' ' + notification.originalTime; + const originalDateTime = `${notification.originalDate} ${notification.originalTime}`; const bits = originalDateTime.split(/\D/); let date = new Date(bits[0], --bits[1], bits[2], bits[3], bits[4], bits[5]); if (date.getTime() < Date.now()) { @@ -1380,15 +1385,27 @@ class AlexaRemote extends EventEmitter { const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + const encodedStationId = `["music/tuneIn/${contentType}Id","${guideId}"]|{"previousPageId":"TuneIn_SEARCH"}`; + const encoding1 = Buffer.from(encodedStationId).toString('base64'); + const encoding2 = Buffer.from(encoding1).toString('base64'); + const tuneInJson = { + contentToken: `music:${encoding2}` + }; + const flags = { + data: JSON.stringify(tuneInJson), + method: 'PUT' + }; + this.httpsGet (`/api/entertainment/v1/player/queue?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, callback, flags); + + /* this.httpsGet (`/api/tunein/queue-and-play ?deviceSerialNumber=${dev.serialNumber} &deviceType=${dev.deviceType} &guideId=${guideId} &contentType=${contentType} &callSign= - &mediaOwnerCustomerId=${dev.deviceOwnerCustomerId}`, - callback, - { method: 'POST' }); + &mediaOwnerCustomerId=${dev.deviceOwnerCustomerId}`, callback, { method: 'POST' }); + */ } /** @@ -1525,7 +1542,7 @@ class AlexaRemote extends EventEmitter { } else if (text.startsWith('alexa')) { text = text.substr(5).trim(); } - o.description.summary += text + ', '; + o.description.summary += `${text}, `; }); } if (convParts.ASR_REPLACEMENT_TEXT) { @@ -1536,7 +1553,7 @@ class AlexaRemote extends EventEmitter { } else if (text.startsWith('alexa')) { text = text.substr(5).trim(); } - o.description.summary += text + ', '; + o.description.summary += `${text}, `; }); } o.description.summary = o.description.summary.substring(0, o.description.summary.length - 2).trim(); @@ -1544,10 +1561,10 @@ class AlexaRemote extends EventEmitter { o.alexaResponse = ''; if (convParts.ALEXA_RESPONSE || convParts.TTS_REPLACEMENT_TEXT) { if (convParts.ALEXA_RESPONSE) { - convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); + convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += `${trans.transcriptText}, `); } if (convParts.TTS_REPLACEMENT_TEXT) { - convParts.TTS_REPLACEMENT_TEXT.forEach(trans => o.alexaResponse += trans.transcriptText + ', '); + convParts.TTS_REPLACEMENT_TEXT.forEach(trans => o.alexaResponse += `${trans.transcriptText}, `); } o.alexaResponse = o.alexaResponse.substring(0, o.alexaResponse.length - 2).trim(); } @@ -1723,7 +1740,7 @@ class AlexaRemote extends EventEmitter { case 'previous': case 'forward': case 'rewind': - commandObj.type = command.substr(0, 1).toUpperCase() + command.substr(1) + 'Command'; + commandObj.type = `${command.substr(0, 1).toUpperCase() + command.substr(1)}Command`; break; case 'volume': commandObj.type = 'VolumeLevelCommand'; @@ -2004,12 +2021,11 @@ class AlexaRemote extends EventEmitter { } } - const sequenceObj = { - '@type': 'com.amazon.alexa.behaviors.model.' + sequenceType, + return { + '@type': `com.amazon.alexa.behaviors.model.${sequenceType}`, 'name': null, 'nodesToExecute': nodes }; - return sequenceObj; } sendMultiSequenceCommand(serialOrName, commands, sequenceType, overrideCustomerId, callback) { @@ -2161,7 +2177,7 @@ class AlexaRemote extends EventEmitter { // }] const message = [{ - conversationId: 'amzn1.comms.messaging.id.conversationV2~' + uuidv1(), + conversationId: `amzn1.comms.messaging.id.conversationV2~${uuidv1()}`, clientMessageId: uuidv1(), messageId: 0.001, time: new Date().toISOString(), From d831f9965f62f656f3442c77a1ca18b674c3015d Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 2 Jul 2022 11:15:38 +0200 Subject: [PATCH 228/356] chore: release v5.0.0 * BREAKING: SequenceNode methods throws an error on invalid data instead calling callback with error as before! * (Apollon77) Enhance multi sequence Node methods to support building node structures with sub Parallel/SerialNodes * (Apollon77) Adjust logic to get the "global" ownerCustomerId and use Authentication response from session verification call * (Apollon77) Add getAuthenticationDetails() method to get the Authentication response from the last successful session verification call * (Apollon77) Add method isWsMqttConnected() to query if the WS-MQTT connection is established or not * (Apollon77/hive) Add method stopProxyServer() to stop the proxy server pot. opened from getting a new cookie * (Apollon77) Adjust setTuneIn method to work again for stationIds (s*) and topicIds (t*) * (Apollon77) Do an automatic request retry with a delay of 500-1000ms (random) when error 503 is returned from Amazon services * (Apollon77/hive) Correctly end all timers on disconnect * (Apollon77/hive) Optimize authentication check when no cookie is set * (Apollon77) Prevent some crash cases --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d60747cb..89dc7cae 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.0.0 (2022-07-02) * BREAKING: SequenceNode methods throws an error on invalid data instead calling callback with error as before! * (Apollon77) Enhance multi sequence Node methods to support building node structures with sub Parallel/SerialNodes * (Apollon77) Adjust logic to get the "global" ownerCustomerId and use Authentication response from session verification call diff --git a/package-lock.json b/package-lock.json index e0d38b5a..3a499821 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "4.1.2", + "version": "5.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "4.1.2", + "version": "5.0.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.2", diff --git a/package.json b/package.json index baf8a3e3..a98c3951 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "4.1.2", + "version": "5.0.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From bb2bef9c7610c7af9906fc6ac110dfc5598bb496 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 3 Jul 2022 23:20:09 +0200 Subject: [PATCH 229/356] * (Apollon77) fix type definition for sequenceCommand methods --- README.md | 4 ++++ alexa-remote.d.ts | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 89dc7cae..5ab01d60 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) fix type definition for sequenceCommand methods + ### 5.0.0 (2022-07-02) * BREAKING: SequenceNode methods throws an error on invalid data instead calling callback with error as before! * (Apollon77) Enhance multi sequence Node methods to support building node structures with sub Parallel/SerialNodes diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index 26af9b4c..8b311ab9 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -428,19 +428,22 @@ declare module "alexa-remote2" { createSequenceNode( command: SequenceNodeCommand, value: Value, - serialOrName: SerialOrNameOrArray + serialOrName: SerialOrNameOrArray, + overrideCustomerId?: string ): void; buildSequenceNodeStructure( serialOrName: SerialOrNameOrArray, commands: MultiSequenceCommand[], sequenceType?: SequenceType | CallbackWithErrorAndBody, + overrideCustomerId?: string ): void; sendMultiSequenceCommand( serialOrName: SerialOrNameOrArray, commands: MultiSequenceCommand[], sequenceType?: SequenceType | CallbackWithErrorAndBody, + overrideCustomerId?: string | CallbackWithErrorAndBody, callback?: CallbackWithErrorAndBody ): void; @@ -448,7 +451,8 @@ declare module "alexa-remote2" { serialOrName: SerialOrNameOrArray, command: SequenceNodeCommand, value: Value, - callback: CallbackWithErrorAndBody + overrideCustomerId?: string | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody ): void; getAutomationRoutines( From dad5c207d70d51eb44915fa778f0bbbf887f4e3f Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 3 Jul 2022 23:20:50 +0200 Subject: [PATCH 230/356] chore: release v5.0.1 * (Apollon77) fix type definition for sequenceCommand methods --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5ab01d60..a45f6d1f 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.0.1 (2022-07-03) * (Apollon77) fix type definition for sequenceCommand methods ### 5.0.0 (2022-07-02) diff --git a/package-lock.json b/package-lock.json index 3a499821..04e2c17c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.2", diff --git a/package.json b/package.json index a98c3951..49ffcb3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.0.0", + "version": "5.0.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 0892cfbeb75b779aa89aae8b1035e651861038f7 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 4 Jul 2022 10:14:58 +0200 Subject: [PATCH 231/356] * (Apollon77) Detect Rate limit exceeded response and do one automatic request retry 10s later (plus a random part) * (Apollon77) Calculate the timeout of querySmarthomeDevices dynamically between 10s and 60s (maximum overrideable by new optional parameter) depending on the number of devices to query --- README.md | 5 +++++ alexa-remote.d.ts | 5 +++-- alexa-remote.js | 18 ++++++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a45f6d1f..9309dbf9 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Detect Rate limit exceeded response and do one automatic request retry 10s later (plus a random part) +* (Apollon77) Calculate the timeout of querySmarthomeDevices dynamically between 10s and 60s (maximum overrideable by new optional parameter) depending on the number of devices to query + ### 5.0.1 (2022-07-03) * (Apollon77) fix type definition for sequenceCommand methods diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index 8b311ab9..0739d72d 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -531,8 +531,9 @@ declare module "alexa-remote2" { querySmarthomeDevices( applicanceIds: string[], - entityType: EntityType, - callback: CallbackWithErrorAndBody + entityType?: EntityType | CallbackWithErrorAndBody, + maxTimeout?: number | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody ): void; executeSmarthomeDeviceAction( diff --git a/alexa-remote.js b/alexa-remote.js index cb7d5b2f..c4f26ef0 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -814,6 +814,13 @@ class AlexaRemote extends EventEmitter { } this._options.logger && this._options.logger(`Alexa-Remote: Response: No/Invalid JSON : ${body}`); + if (body.includes('ThrottlingException') || body.includes('Rate exceeded')) { + const delay = Math.floor(Math.random() * 3000) + 10000; + this._options.logger && this._options.logger(`Alexa-Remote: rate exceeded response ... Retrying once in ${delay}ms`); + flags = flags || {}; + flags.isRetry = true; + return setTimeout(() => this.httpsGetCall(path, callback, flags), delay); + } callback && callback(new Error('no JSON'), body); callback = null; return; @@ -2318,7 +2325,11 @@ class AlexaRemote extends EventEmitter { this.httpsGet ('/api/phoenix/discovery', callback, flags); } - querySmarthomeDevices(applicanceIds, entityType, callback) { + querySmarthomeDevices(applicanceIds, entityType, maxTimeout, callback) { + if (typeof maxTimeout === 'function') { + callback = maxTimeout; + maxTimeout = null; + } if (typeof entityType === 'function') { callback = entityType; entityType = 'APPLIANCE'; // other value 'GROUP' @@ -2337,8 +2348,11 @@ class AlexaRemote extends EventEmitter { method: 'POST', data: JSON.stringify ({ 'stateRequests': reqArr - }) + }), + timeout: Math.min(maxTimeout || 60000, Math.max(10000, applicanceIds.length * 300)) }; + + this.httpsGet (`/api/phoenix/state`, callback, flags); /* { From de63ff2d6854ace472750b37ceb150ffc804011f Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 4 Jul 2022 10:15:06 +0200 Subject: [PATCH 232/356] chore: release v5.1.0 * (Apollon77) Detect Rate limit exceeded response and do one automatic request retry 10s later (plus a random part) * (Apollon77) Calculate the timeout of querySmarthomeDevices dynamically between 10s and 60s (maximum overrideable by new optional parameter) depending on the number of devices to query --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9309dbf9..348da115 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.1.0 (2022-07-04) * (Apollon77) Detect Rate limit exceeded response and do one automatic request retry 10s later (plus a random part) * (Apollon77) Calculate the timeout of querySmarthomeDevices dynamically between 10s and 60s (maximum overrideable by new optional parameter) depending on the number of devices to query diff --git a/package-lock.json b/package-lock.json index 04e2c17c..977cd3b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.0.1", + "version": "5.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.0.1", + "version": "5.1.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.2", diff --git a/package.json b/package.json index 49ffcb3a..4cc909b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.0.1", + "version": "5.1.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From ba68474ff97540778ee42e02c91b0673a16b92e9 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 6 Jul 2022 14:08:56 +0200 Subject: [PATCH 233/356] * see changelog * prepare release --- README.md | 17 ++++ alexa-remote.d.ts | 41 +++++++- alexa-remote.js | 241 ++++++++++++++++++++++++++++++++++------------ package-lock.json | 28 +++--- package.json | 4 +- 5 files changed, 249 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 348da115..0066cc9d 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,23 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Query API endpoints (including new method getEndpoints()) from Amazon on start and use this API endpoint for the calls +* (Apollon77) Enhance getDevicePreferences() to request preferences for one device +* (Apollon77) Add setDevicePreferences() to set the device preferences for a device +* (Apollon77) Add getDeviceWifiDetails() to get the Wifi definitions (including SSID and MAC) for a device +* (Apollon77) Load Device Preferences on startup and make accessible via device.preferences on the device objects +* (Apollon77) Add methods getDevicePreferences() and setDevicePreferences() to the alexa class and to the device objects +* (Apollon77) Add new Media Message "jump" (in sendMessage() method) with a mediaId as value (can be used to jump to another queue item) +* (Apollon77) Add getRoutineSoundList() to query available sound IDs for a routine +* (Apollon77) Add new command "sound" when creating/sending sequence nodes to play sounds +* (Apollon77) Add method getWholeHomeAudioGroups() to query information about the current Audio groups +* (Apollon77) Enhance sending "notification" sequence node to allow providing an object as value with keys title and text to specify the title for displaying the message too +* (Apollon77) Add setEnablementForSmarthomeDevice() to enable/disable a smart home device +* (Apollon77) Log Response with status code also when no callback is provided (but without body content) +* (Apollon77) Slightly adjust the calculated timeout when getting many smart home device values + ### 5.1.0 (2022-07-04) * (Apollon77) Detect Rate limit exceeded response and do one automatic request retry 10s later (plus a random part) * (Apollon77) Calculate the timeout of querySmarthomeDevices dynamically between 10s and 60s (maximum overrideable by new optional parameter) depending on the number of devices to query diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index 0739d72d..f864c100 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -80,6 +80,11 @@ declare module "alexa-remote2" { export type Value = string | number | boolean; + export type SequenceValue = Value | { + title: string + text: string + }; + export type Sound = { displayName: string; folder: string; @@ -165,7 +170,8 @@ declare module "alexa-remote2" { | "rewind" | "volume" | "shuffle" - | "repeat"; + | "repeat" + | "jump"; export type SequenceNodeCommand = | "weather" @@ -196,7 +202,7 @@ declare module "alexa-remote2" { export type SequenceNodeDetails = { command: SequenceNodeCommand; - value: Value; + value: SequenceValue; device?: SerialOrNameOrArray; } @@ -315,6 +321,8 @@ declare module "alexa-remote2" { getSkills(callback: CallbackWithErrorAndBody): void; + getRoutineSoundList(callback: CallbackWithErrorAndBody): void; + createNotificationObject( serialOrName: SerialOrName, type: string, @@ -427,7 +435,7 @@ declare module "alexa-remote2" { createSequenceNode( command: SequenceNodeCommand, - value: Value, + value: SequenceValue, serialOrName: SerialOrNameOrArray, overrideCustomerId?: string ): void; @@ -450,7 +458,7 @@ declare module "alexa-remote2" { sendSequenceCommand( serialOrName: SerialOrNameOrArray, command: SequenceNodeCommand, - value: Value, + value: SequenceValue, overrideCustomerId?: string | CallbackWithErrorAndBody, callback?: CallbackWithErrorAndBody ): void; @@ -495,7 +503,20 @@ declare module "alexa-remote2" { getHomeGroup(callback: CallbackWithErrorAndBody): void; - getDevicePreferences(callback: CallbackWithErrorAndBody): void; + getDevicePreferences( + serialOrName: SerialOrName | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody + ): void; + + setDevicePreferences( + serialOrName: SerialOrName, + preferences: Record, + callback: CallbackWithErrorAndBody + ): void; + + getDeviceWifiDetails(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + getAllDoNotDisturbDeviceStatus(callback: CallbackWithErrorAndBody): void; getAllDeviceVolumes(callback: CallbackWithErrorAndBody): void; @@ -520,6 +541,12 @@ declare module "alexa-remote2" { callback: CallbackWithErrorAndBody ): void; + setEnablementForSmarthomeDevice( + smarthomeDevice: string, + enabled: boolean, + callback: CallbackWithErrorAndBody + ): void; + deleteSmarthomeGroup( smarthomeGroup: string, callback: CallbackWithErrorAndBody @@ -559,5 +586,9 @@ declare module "alexa-remote2" { isWsMqttConnected(): boolean; stopProxyServer(callback: CallbackWithError): void + + getWholeHomeAudioGroups(callback: CallbackWithErrorAndBody): void + + getEndpoints(callback: CallbackWithErrorAndBody): void } } diff --git a/alexa-remote.js b/alexa-remote.js index c4f26ef0..cba4f501 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -29,6 +29,7 @@ class AlexaRemote extends EventEmitter { this.cookieData = null; this.authenticationDetails = null; this.ownerCustomerId = null; + this.endpoints = null; this.baseUrl = 'alexa.amazon.de'; } @@ -171,11 +172,20 @@ class AlexaRemote extends EventEmitter { this.init(this._options, callback); }, this._options.cookieRefreshInterval); } - this.prepare(() => { - if (this._options.useWsMqtt) { - this.initWsMqttConnection(); + this.getEndpoints((err, endpoints) => { + if (!err && endpoints && endpoints.websiteApiUrl) { + this.endpoints = endpoints; + this.baseUrl = this.endpoints.websiteApiUrl.replace(/^https?:\/\//, ''); + this._options.logger && this._options.logger('Alexa-Remote: Change Base URL for API calls to ' + this.baseUrl); + } else { + this._options.logger && this._options.logger('Alexa-Remote: Could not query endpoints: ' + err); } - callback && callback(); + this.prepare(() => { + if (this._options.useWsMqtt) { + this.initWsMqttConnection(); + } + callback && callback(); + }); }); }); }); @@ -252,62 +262,81 @@ class AlexaRemote extends EventEmitter { initDeviceState(callback) { this.getDevices((err, result) => { if (!err && result && Array.isArray(result.devices)) { - const customerIds = {}; - const joinedDevices = []; - - result.devices.forEach((device) => { - joinedDevices.push(device); - if (device.appDeviceList && device.appDeviceList.length) { - device.appDeviceList.forEach(subDevice => { - const appDevice = Object.assign({}, device, subDevice); - appDevice.parentDeviceSerialNumber = device.serialNumber; - appDevice.appDeviceList = []; - joinedDevices.push(appDevice); + this.getDevicePreferences((err, devicePrefs) => { + const devicePreferences = {}; + if (!err && devicePrefs && devicePrefs.devicePreferences && Array.isArray(devicePrefs.devicePreferences)) { + devicePrefs.devicePreferences.forEach(pref => { + devicePreferences[pref.deviceSerialNumber] = pref; }); } - }); - joinedDevices.forEach((device) => { - const existingDevice = this.find(device.serialNumber); - if (!existingDevice) { - this.serialNumbers[device.serialNumber] = device; - } - else { - device = extend(true, existingDevice, device); - } - let name = device.accountName; - this.names [name] = device; - this.names [name.toLowerCase()] = device; - if (device.deviceTypeFriendlyName) { - name += ` (${device.deviceTypeFriendlyName})`; + const customerIds = {}; + const joinedDevices = []; + + result.devices.forEach((device) => { + joinedDevices.push(device); + if (device.appDeviceList && device.appDeviceList.length) { + device.appDeviceList.forEach(subDevice => { + const appDevice = Object.assign({}, device, subDevice); + appDevice.parentDeviceSerialNumber = device.serialNumber; + appDevice.appDeviceList = []; + joinedDevices.push(appDevice); + }); + } + }); + + joinedDevices.forEach((device) => { + const existingDevice = this.find(device.serialNumber); + if (!existingDevice) { + this.serialNumbers[device.serialNumber] = device; + } + else { + device = extend(true, existingDevice, device); + } + + if (devicePreferences[device.serialNumber]) { + device.preferences = devicePreferences[device.serialNumber]; + } + + let name = device.accountName; this.names [name] = device; this.names [name.toLowerCase()] = device; - } - //device._orig = JSON.parse(JSON.stringify(device)); - device._name = name; - device.sendCommand = this.sendCommand.bind(this, device); - device.setTunein = this.setTunein.bind(this, device); - device.rename = this.renameDevice.bind(this, device); - device.setDoNotDisturb = this.setDoNotDisturb.bind(this, device); - device.delete = this.deleteDevice.bind(this, device); - if (device.deviceTypeFriendlyName) this.friendlyNames[device.deviceTypeFriendlyName] = device; - if (customerIds[device.deviceOwnerCustomerId] === undefined) customerIds[device.deviceOwnerCustomerId] = 0; - customerIds[device.deviceOwnerCustomerId] += 1; - device.isControllable = ( - device.capabilities.includes('AUDIO_PLAYER') || - device.capabilities.includes('AMAZON_MUSIC') || - device.capabilities.includes('TUNE_IN') - ); - device.hasMusicPlayer = ( - device.capabilities.includes('AUDIO_PLAYER') || - device.capabilities.includes('AMAZON_MUSIC') - ); - device.isMultiroomDevice = (device.clusterMembers.length > 0); - device.isMultiroomMember = (device.parentClusters.length > 0); + if (device.deviceTypeFriendlyName) { + name += ` (${device.deviceTypeFriendlyName})`; + this.names [name] = device; + this.names [name.toLowerCase()] = device; + } + //device._orig = JSON.parse(JSON.stringify(device)); + device._name = name; + device.sendCommand = this.sendCommand.bind(this, device); + device.setTunein = this.setTunein.bind(this, device); + device.rename = this.renameDevice.bind(this, device); + device.setDoNotDisturb = this.setDoNotDisturb.bind(this, device); + device.delete = this.deleteDevice.bind(this, device); + device.getDevicePreferences = this.getDevicePreferences.bind(this, device); + device.setDevicePreferences = this.setDevicePreferences.bind(this, device); + if (device.deviceTypeFriendlyName) this.friendlyNames[device.deviceTypeFriendlyName] = device; + if (customerIds[device.deviceOwnerCustomerId] === undefined) customerIds[device.deviceOwnerCustomerId] = 0; + customerIds[device.deviceOwnerCustomerId] += 1; + device.isControllable = ( + device.capabilities.includes('AUDIO_PLAYER') || + device.capabilities.includes('AMAZON_MUSIC') || + device.capabilities.includes('TUNE_IN') + ); + device.hasMusicPlayer = ( + device.capabilities.includes('AUDIO_PLAYER') || + device.capabilities.includes('AMAZON_MUSIC') + ); + device.isMultiroomDevice = (device.clusterMembers.length > 0); + device.isMultiroomMember = (device.parentClusters.length > 0); + }); + //this.ownerCustomerId = Object.keys(customerIds)[0]; // this could end in the wrong one! + callback && callback(); }); - //this.ownerCustomerId = Object.keys(customerIds)[0]; // this could end in the wrong one! } - callback && callback(); + else { + callback && callback(); + } }); } @@ -826,6 +855,9 @@ class AlexaRemote extends EventEmitter { return; } + // TODO maybe handle the case of "non HTTP 200 responses" better and return accordingly? + // maybe set err AND body? + // add x-amzn-ErrorType header to err? (e.g. 400 on /player: ExpiredPlayQueueException:http://internal.amazon.com/coral/com.amazon.dee.web.coral.model/) this._options.logger && this._options.logger(`Alexa-Remote: Response: ${JSON.stringify(ret)}`); callback(null, ret); callback = null; @@ -907,6 +939,8 @@ class AlexaRemote extends EventEmitter { } else { handleResponse(null, res, resBuffer.toString()); } + } else { + this._options.logger && this._options.logger(`Alexa-Remote: Response (without callback): Status: ${res.statusCode}`); } }); }); @@ -970,6 +1004,9 @@ class AlexaRemote extends EventEmitter { } } + getEndpoints(callback) { + this.httpsGetCall('/api/endpoints', callback); + } getDevices(callback) { this.httpsGet ('/api/devices-v2/device?cached=true&_=%t', callback); @@ -1162,6 +1199,10 @@ class AlexaRemote extends EventEmitter { }, request); } + getWholeHomeAudioGroups(callback) { + this.httpsGet ('/api/wholeHomeAudio/v1/groups', (err, res) => callback && callback(err, res && res.groups)); + } + createNotificationObject(serialOrName, type, label, value, status, sound) { // type = Reminder, Alarm if (status && typeof status === 'object') { sound = status; @@ -1764,6 +1805,10 @@ class AlexaRemote extends EventEmitter { commandObj.type = 'RepeatCommand'; commandObj.repeat = (value === 'on' || value === true); break; + case 'jump': + commandObj.type = 'JumpCommand'; + commandObj.mediaId = value; + break; default: return; } @@ -1843,6 +1888,11 @@ class AlexaRemote extends EventEmitter { seqNode.skillId = 'amzn1.ask.1p.tellalexa'; seqNode.operationPayload.text = value.toString(); break; + case 'sound': + seqNode.type = 'Alexa.Sound'; + seqNode.skillId = 'amzn1.ask.1p.sound'; + seqNode.operationPayload.soundStringId = value.toString(); + break; case 'curatedtts': { const supportedValues = ['goodbye', 'confirmations', 'goodmorning', 'compliments', 'birthday', 'goodnight', 'iamhome']; if (!supportedValues.includes(value)) { @@ -1934,19 +1984,25 @@ class AlexaRemote extends EventEmitter { delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; break; - case 'notification': + case 'notification': { seqNode.type = 'Alexa.Notifications.SendMobilePush'; + let title = 'ioBroker'; + if (value && typeof value === 'object') { + title = value.title || title; + value = value.text || value.value; + } if (typeof value !== 'string') value = String(value); if (value.length === 0) { throw new Error('Can not notify empty string'); } seqNode.operationPayload.notificationMessage = value; seqNode.operationPayload.alexaUrl = '#v2/behaviors'; - seqNode.operationPayload.title = 'ioBroker'; + seqNode.operationPayload.title = title; delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; delete seqNode.operationPayload.locale; break; + } case 'announcement': case 'ssml': seqNode.type = 'AlexaAnnouncement'; @@ -2119,7 +2175,7 @@ class AlexaRemote extends EventEmitter { callback, { headers: { - 'Routines-Version': '1.1.210292' + 'Routines-Version': '3.0.128540' } } ); @@ -2221,8 +2277,49 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/identities?includeUserName=true`, callback); } - getDevicePreferences(callback) { - this.httpsGet ('/api/device-preferences?cached=true&_=%t', callback); + getDevicePreferences(serialOrName, callback) { + if (typeof serialOrName === 'function') { + callback = serialOrName; + serialOrName = null; + } + this.httpsGet ('/api/device-preferences', (err, res) => { + if (serialOrName) { + const device = this.find(serialOrName); + if (!device) { + return callback && callback(new Error('Unknown Device or Serial number'), null); + } + + if (!err && res && res.devicePreferences && Array.isArray(res.devicePreferences)) { + const devicePreferences = res.devicePreferences.filter(pref => pref.deviceSerialNumber === device.serialNumber); + if (devicePreferences.length > 0) { + return callback && callback(null, devicePreferences[0]); + } else { + return callback && callback(new Error(`No Device Preferences found for ${device.serialNumber}`), null); + } + } + } + callback && callback(err, res); + }); + } + + setDevicePreferences(serialOrName, preferences, callback) { + const device = this.find(serialOrName); + if (!device) { + return callback && callback(new Error('Unknown Device or Serial number'), null); + } + + this.httpsGet (`/api/device-preferences/${device.serialNumber}`, callback, { + method: 'PUT', + data: JSON.stringify(preferences) + }); + } + + getDeviceWifiDetails(serialOrName, callback) { + const dev = this.find(serialOrName); + if (!dev) { + return callback && callback(new Error('Unknown Device or Serial number'), null); + } + this.httpsGet (`/api/device-wifi-details?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, callback); } getAllDeviceVolumes(callback) { @@ -2253,7 +2350,7 @@ class AlexaRemote extends EventEmitter { callback, { headers: { - 'Routines-Version': '1.1.210292' + 'Routines-Version': '3.0.128540' }, timeout: 30000 } @@ -2265,13 +2362,24 @@ class AlexaRemote extends EventEmitter { callback, { headers: { - 'Routines-Version': '1.1.210292' + 'Routines-Version': '3.0.128540' }, timeout: 30000 } ); } + getRoutineSoundList(callback) { + this.httpsGet ('/api/behaviors/entities?skillId=amzn1.ask.1p.sound', + callback, + { + headers: { + 'Routines-Version': '3.0.128540' + }, + timeout: 30000 + } + ); + } renameDevice(serialOrName, newName, callback) { const dev = this.find(serialOrName); @@ -2301,6 +2409,17 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`/api/phoenix/appliance/${smarthomeDevice}`, callback, flags); } + setEnablementForSmarthomeDevice(smarthomeDevice, enabled, callback) { + const flags = { + method: 'PUT', + data: JSON.stringify ({ + 'applianceId': smarthomeDevice, + 'enabled': !!enabled + }), + }; + this.httpsGet (`/api/phoenix/v2/appliance/${smarthomeDevice}/enablement`, callback, flags); + } + deleteSmarthomeGroup(smarthomeGroup, callback) { const flags = { method: 'DELETE' @@ -2349,7 +2468,7 @@ class AlexaRemote extends EventEmitter { data: JSON.stringify ({ 'stateRequests': reqArr }), - timeout: Math.min(maxTimeout || 60000, Math.max(10000, applicanceIds.length * 300)) + timeout: Math.min(maxTimeout || 60000, Math.max(10000, applicanceIds.length * 150)) }; diff --git a/package-lock.json b/package-lock.json index 977cd3b9..8764e804 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.1.0", "license": "MIT", "dependencies": { - "alexa-cookie2": "^4.0.2", + "alexa-cookie2": "^4.0.3", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", @@ -19,7 +19,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.18.0" + "eslint": "^8.19.0" }, "engines": { "node": ">=12.0.0" @@ -355,9 +355,9 @@ "dev": true }, "node_modules/alexa-cookie2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.2.tgz", - "integrity": "sha512-nyZUDE3iJOleJxXZb1zB3r2Wq0m3qrEeNXOJbo/AVCX8Tekrya5UzF3otBGeX9wuEeU6Cmz9DM6i8CSFgKIcfA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.3.tgz", + "integrity": "sha512-QNtLzGzRFzyBPfZqSBrLrZ15Zjvwe22H5bvXFfPTHeD3JxLUjtUqZmx94gfEmqZHZv06vhTmDmaiu0OsiU8KIw==", "dependencies": { "cookie": "^0.5.0", "express": "^4.18.1", @@ -779,9 +779,9 @@ } }, "node_modules/eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", + "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -2727,9 +2727,9 @@ } }, "alexa-cookie2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.2.tgz", - "integrity": "sha512-nyZUDE3iJOleJxXZb1zB3r2Wq0m3qrEeNXOJbo/AVCX8Tekrya5UzF3otBGeX9wuEeU6Cmz9DM6i8CSFgKIcfA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.3.tgz", + "integrity": "sha512-QNtLzGzRFzyBPfZqSBrLrZ15Zjvwe22H5bvXFfPTHeD3JxLUjtUqZmx94gfEmqZHZv06vhTmDmaiu0OsiU8KIw==", "requires": { "cookie": "^0.5.0", "express": "^4.18.1", @@ -3050,9 +3050,9 @@ "dev": true }, "eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", + "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", diff --git a/package.json b/package.json index 4cc909b2..855875c7 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^4.0.2", + "alexa-cookie2": "^4.0.3", "https": "^1.0.0", "querystring": "^0.2.1", "ws": "^8.8.0", @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.18.0" + "eslint": "^8.19.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From cc4c7b733495f74ee2aa46a6590c567c7fc3ad7c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 6 Jul 2022 14:30:55 +0200 Subject: [PATCH 234/356] chore: release v5.2.0 * (Apollon77) Query API endpoints (including new method getEndpoints()) from Amazon on start and use this API endpoint for the calls * (Apollon77) Enhance getDevicePreferences() to request preferences for one device * (Apollon77) Add setDevicePreferences() to set the device preferences for a device * (Apollon77) Add getDeviceWifiDetails() to get the Wifi definitions (including SSID and MAC) for a device * (Apollon77) Load Device Preferences on startup and make accessible via device.preferences on the device objects * (Apollon77) Add methods getDevicePreferences() and setDevicePreferences() to the alexa class and to the device objects * (Apollon77) Add new Media Message "jump" (in sendMessage() method) with a mediaId as value (can be used to jump to another queue item) * (Apollon77) Add getRoutineSoundList() to query available sound IDs for a routine * (Apollon77) Add new command "sound" when creating/sending sequence nodes to play sounds * (Apollon77) Add method getWholeHomeAudioGroups() to query information about the current Audio groups * (Apollon77) Enhance sending "notification" sequence node to allow providing an object as value with keys title and text to specify the title for displaying the message too * (Apollon77) Add setEnablementForSmarthomeDevice() to enable/disable a smart home device * (Apollon77) Log Response with status code also when no callback is provided (but without body content) * (Apollon77) Slightly adjust the calculated timeout when getting many smart home device values --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0066cc9d..fb1fa4db 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.2.0 (2022-07-06) * (Apollon77) Query API endpoints (including new method getEndpoints()) from Amazon on start and use this API endpoint for the calls * (Apollon77) Enhance getDevicePreferences() to request preferences for one device * (Apollon77) Add setDevicePreferences() to set the device preferences for a device diff --git a/package-lock.json b/package-lock.json index 8764e804..0d16969e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.1.0", + "version": "5.2.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.3", diff --git a/package.json b/package.json index 855875c7..d7320a31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.1.0", + "version": "5.2.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From e79bd5bb962538c419d8528653dc0112a7cadf1f Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Jul 2022 13:15:31 +0200 Subject: [PATCH 235/356] * new version, see changelog --- README.md | 21 +++ alexa-remote.d.ts | 90 +++++++++- alexa-remote.js | 415 ++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 454 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index fb1fa4db..0aec19e4 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,27 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Adjust Alarm methods to use the new API from Amazon. Also createNotification() and parseValue4Notification() now returns the new format for Alarms +* (Apollon77) Enhance createNotification() to also support adding reccurence information +* (Apollon77) Notification objects will also have a delete method now +* (Apollon77) Notifications can be cancelled now +* (Apollon77) Adjust logging when no callback is provided again, now logs also the body +* (Apollon77) Add methods: + * getUsersMe() + * getHousehold() + * getNotificationSounds() + * getDeviceNotificationState() + * setDeviceNotificationVolume() + * setDeviceNotificationDefaultSound() + * getDeviceNotificationDefaultSound() + * getAscendingAlarmState() + * setDeviceAscendingAlarmState() + * getRoutineSkillCatalog() to request the Skill catalog that can be used in Sequence Commands + * cancelNotification() + * setNotification() and setNotificationV2() + ### 5.2.0 (2022-07-06) * (Apollon77) Query API endpoints (including new method getEndpoints()) from Amazon on start and use this API endpoint for the calls * (Apollon77) Enhance getDevicePreferences() to request preferences for one device diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index f864c100..ceb7e6a8 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -95,7 +95,7 @@ declare module "alexa-remote2" { export type Status = "ON" | "OFF"; - export type Notification = { + export type Notification = Partial<{ alarmTime: number; createdDate: number; deferredAtTime: number | null; @@ -119,7 +119,41 @@ declare module "alexa-remote2" { triggerTime: number; type: string; version: string; - }; + rRuleData: { + byMonthDays: string[], + byMonths: string[], + byWeekDays: string[], + flexibleRecurringPatternType: 'EVERY_X_WEEKS' | 'EVERY_X_MONTHS' | 'EVERY_X_DAYS' | 'EVERY_X_YEARS' | 'X_TIMES_A_WEEK' | 'X_TIMES_A_MONTH' | 'X_TIMES_A_DAY' | 'X_TIMES_A_YEAR', + frequency: 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY' | null, + intervals: number[], + nextTriggerTimes: string[], + notificationTimes: string[], + offset: number[], + recurEndDate: string | null, + recurEndTime: string | null, + recurStartDate: string | null, + recurStartTime: string | null, + recurrenceRules: string[] + }, + }>; + + type NotificationV2 = Partial<{ + trigger: { + scheduledTime: string, + recurrence: { + freq: 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY' + byDay: string[], + byMonth: string[], + interval: number + } + }, + endpointId: string, + assets: [{ + type: string, + assetId: string + }], + extensions: [] + }>; type GetContactsOptions = Partial<{ includePreferencesByLevel: string; @@ -230,6 +264,12 @@ declare module "alexa-remote2" { initNotifications(callback: CallbackWithError): void; + setNotification(notification: Notification, callback: CallbackWithErrorAndBody): void + + setNotificationV2(notificationIndex: String, notification: NotificationV2, callback: CallbackWithErrorAndBody): void + + cancelNotification(notification: Notification | NotificationV2, callback: CallbackWithErrorAndBody): void + initWakewords(callback: CallbackWithError): void; initDeviceState(callback: CallbackWithError): void; @@ -266,6 +306,10 @@ declare module "alexa-remote2" { /// Public checkAuthentication(callback: CallbackWithErrorAndBody): void; + getUsersMe(callback: CallbackWithErrorAndBody): void; + + getHousehold(callback: CallbackWithErrorAndBody): void; + getDevices(callback: CallbackWithErrorAndBody): void; getCards( @@ -319,6 +363,36 @@ declare module "alexa-remote2" { getNotifications(cached: boolean, callback: CallbackWithErrorAndBody): void; + getNotificationSounds( + serialOrName: SerialOrName, + alertType: 'Timer' | 'Alarm' | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody + ): void + + setDeviceNotificationDefaultSound( + serialOrName: SerialOrName, + notificationType: 'Alarm', + soundId: string, + callback: CallbackWithErrorAndBody + ): void + + getDeviceNotificationDefaultSound( + serialOrName: SerialOrName, + notificationType: 'Alarm' | 'Timer', + callback: CallbackWithErrorAndBody + ): void + + getAscendingAlarmState( + serialOrName: SerialOrName | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody + ): void + + setDeviceAscendingAlarmState( + serialOrName: SerialOrName, + ascendingAlarmEnabled: boolean, + callback: CallbackWithErrorAndBody + ): void + getSkills(callback: CallbackWithErrorAndBody): void; getRoutineSoundList(callback: CallbackWithErrorAndBody): void; @@ -363,6 +437,12 @@ declare module "alexa-remote2" { callback: CallbackWithErrorAndBody ): void; + setDeviceNotificationVolume( + serialOrName: SerialOrName, + volumeLevel: number, + callback: CallbackWithErrorAndBody + ): void; + getBluetooth(cached: boolean, callback: CallbackWithErrorAndBody): void; tuneinSearchRaw(query: string, callback: CallbackWithErrorAndBody): void; @@ -474,6 +554,12 @@ declare module "alexa-remote2" { callback: CallbackWithErrorAndBody ): void; + getRoutineSkillCatalog( + catalogId: string | CallbackWithErrorAndBody, + limit?: number | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody + ): void + getMusicProviders(callback: CallbackWithErrorAndBody): void; playMusicProvider( diff --git a/alexa-remote.js b/alexa-remote.js index cba4f501..f4a35739 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -32,6 +32,9 @@ class AlexaRemote extends EventEmitter { this.endpoints = null; this.baseUrl = 'alexa.amazon.de'; + + this.authApiBearerToken = null; + this.authApiBearerExpiry = null; } setCookie(_cookie) { @@ -230,11 +233,13 @@ class AlexaRemote extends EventEmitter { //TODO: new stuff return; } - if (noti.alarmTime && !noti.originalTime && noti.originalDate && noti.type !== 'Timer') { + if (noti.alarmTime && !noti.originalTime && noti.originalDate && noti.type !== 'Timer' && !noti.rRuleData) { const now = new Date(noti.alarmTime); noti.originalTime = `${_00(now.getHours())}:${_00(now.getMinutes())}:${_00(now.getSeconds())}.000`; } noti.set = this.changeNotification.bind(this, noti); + noti.delete = this.deleteNotification.bind(this, noti); + noti.cancel = this.cancelNotification.bind(this, noti); device.notifications.push(noti); }); callback && callback(); @@ -315,6 +320,13 @@ class AlexaRemote extends EventEmitter { device.delete = this.deleteDevice.bind(this, device); device.getDevicePreferences = this.getDevicePreferences.bind(this, device); device.setDevicePreferences = this.setDevicePreferences.bind(this, device); + device.getNotificationSounds = this.getNotificationSounds.bind(this, device); + device.setDevicePreferences = this.setDevicePreferences.bind(this, device); + device.getDeviceNotificationState = this.getDeviceNotificationState.bind(this, device); + device.setDeviceNotificationVolume = this.setDeviceNotificationVolume.bind(this, device); + device.setDeviceAscendingAlarmState = this.setDeviceAscendingAlarmState.bind(this, device); + device.getDeviceNotificationDefaultSound = this.getDeviceNotificationDefaultSound.bind(this, device); + device.setDeviceNotificationDefaultSound = this.setDeviceNotificationDefaultSound.bind(this, device); if (device.deviceTypeFriendlyName) this.friendlyNames[device.deviceTypeFriendlyName] = device; if (customerIds[device.deviceOwnerCustomerId] === undefined) customerIds[device.deviceOwnerCustomerId] = 0; customerIds[device.deviceOwnerCustomerId] += 1; @@ -776,6 +788,56 @@ class AlexaRemote extends EventEmitter { this.alexaCookie.refreshAlexaCookie(this._options, callback); } + getAuthApiBearerToken(callback) { + this.httpsGet(true, 'https://api.amazon.de/auth/token', (err, res) => { + if (err) { + this._options.logger && this._options.logger(`Alexa-Remote: Error getting auth token: ${err.message}`); + callback(err); + } + else { + this._options.logger && this._options.logger(`Alexa-Remote: Auth token: ${res.access_token}`); + callback(null, res); + } + }, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: `app_name=ioBroker%20Alexa2&app_version=2.2.483723.0&di.sdk.version=6.12.3&source_token=${encodeURIComponent(this.cookieData.refreshToken)}&package_name=com.amazon.echo&di.hw.version=iPhone&platform=iOS&requested_token_type=access_token&source_token_type=refresh_token&di.os.name=iOS&di.os.version=15.5¤t_version=6.12.3&previous_version=6.12.3` + }); + } + + httpsGetAuthApi(path, callback, flags = {}) { + if (!this.endpoints && !this.endpoints.alexaApiUrl) { + this._options.logger && this._options.logger(`Alexa-Remote: No endpoint set for alexaApiUrl: ${JSON.stringify(this.endpoints)}`); + return callback && callback(new Error(`No endpoint set for alexaApiUrl: ${JSON.stringify(this.endpoints)}`)); + } + flags = flags || {}; + flags.host = this.endpoints.alexaApiUrl.replace(/^https?:\/\//, ''); + flags.headers = flags.headers || {}; + flags.host = this.endpoints.alexaApiUrl.replace(/^https?:\/\//, ''); + flags.cleanHeader = true; + flags.headers = flags.headers || {}; + flags.headers.authorization = this.authApiBearerToken; + flags.headers.authority = flags.host; + flags.headers['user-agent'] = 'AppleWebKit PitanguiBridge/2.2.483723.0-[HARDWARE=iPhone10_4][SOFTWARE=15.5][DEVICE=iPhone]'; + if (!this.authApiBearerToken || Date.now() >= this.authApiBearerExpiry) { + this.getAuthApiBearerToken((err, res) => { + if (err || !res || !res.access_token || res.token_type !== 'bearer') { + this._options.logger && this._options.logger(`Alexa-Remote: Error getting auth token: ${err.message}`); + return callback && callback(err); + } + this.authApiBearerToken = res.access_token; + this.authApiBearerExpiry = Date.now() + res.expires_in * 1000; + flags.headers.authorization = this.authApiBearerToken; + this.httpsGet(true, path, callback, flags); + }); + } else { + flags = flags || {}; + this.httpsGet(true, path, callback, flags); + } + } + httpsGet(noCheck, path, callback, flags = {}) { if (typeof noCheck !== 'boolean') { flags = callback; @@ -882,6 +944,13 @@ class AlexaRemote extends EventEmitter { } }; + if (flags.cleanHeader) { + delete options.headers.Referer; + delete options.headers.Origin; + delete options.headers.Cookie; + delete options.headers.csrf; + delete options.headers['User-Agent']; + } path = path.replace(/[\n ]/g, ''); if (!path.startsWith('/')) { path = path.replace(/^https:\/\//, ''); @@ -889,14 +958,12 @@ class AlexaRemote extends EventEmitter { const ar = path.match(/^([^/]+)(\/*.*$)/); options.host = ar[1]; path = ar[2]; - } else { - options.host = this.baseUrl; } const time = new Date().getTime(); path = path.replace(/%t/g, time); options.path = path; - options.method = flags.method? flags.method : flags.data ? 'POST' : 'GET'; + options.method = flags.method ? flags.method : flags.data ? 'POST' : 'GET'; if (flags.headers) Object.keys(flags.headers).forEach(n => { options.headers [n] = flags.headers[n]; @@ -911,7 +978,10 @@ class AlexaRemote extends EventEmitter { delete logOptions.headers.Accept; delete logOptions.headers.Referer; delete logOptions.headers.Origin; - this._options.logger && this._options.logger(`Alexa-Remote: Sending Request with ${JSON.stringify(logOptions)}${(options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ` and data=${flags.data}` : ''}`); + delete logOptions.headers.authorization; + delete logOptions.headers.authority; + delete logOptions.headers['user-agent']; + this._options.logger && this._options.logger(`Alexa-Remote: Sending Request with ${JSON.stringify(logOptions)} ${options.authorization ? '+AccessToken' : ''}${(options.method === 'POST' || options.method === 'PUT' || options.method === 'DELETE') ? ` and data=${flags.data}` : ''}`); let req; let responseReceived = false; @@ -930,17 +1000,27 @@ class AlexaRemote extends EventEmitter { const encoding = res.headers['content-encoding']; if (encoding === 'gzip') { zlib.gunzip(resBuffer, (err, decoded) => { - handleResponse(err, res, decoded && decoded.toString()); + if (typeof callback === 'function') { + handleResponse(err, res, decoded && decoded.toString()); + } else { + this._options.logger && this._options.logger(`Alexa-Remote: Response Status ${res.statusCode}: ${decoded && decoded.toString()}`); + } }); } else if (encoding === 'deflate') { zlib.inflate(resBuffer, (err, decoded) => { - handleResponse(err, res, decoded && decoded.toString()); + if (typeof callback === 'function') { + handleResponse(err, res, decoded && decoded.toString()); + } else { + this._options.logger && this._options.logger(`Alexa-Remote: Response Status ${res.statusCode}: ${decoded && decoded.toString()}`); + } }); } else { - handleResponse(null, res, resBuffer.toString()); + if (typeof callback === 'function') { + handleResponse(null, res, resBuffer.toString()); + } else { + this._options.logger && this._options.logger(`Alexa-Remote: Response Status ${res.statusCode}: ${resBuffer.toString()}`); + } } - } else { - this._options.logger && this._options.logger(`Alexa-Remote: Response (without callback): Status: ${res.statusCode}`); } }); }); @@ -1025,6 +1105,14 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`/api/cards?limit=${limit}&beforeCreationTime=${beforeCreationTime}000&_=%t`, callback); } + getUsersMe(callback) { + this.httpsGetCall('/api/users/me?platform=ios&version=2.2.483723.0', callback); + } + + getHousehold(callback) { + this.httpsGetCall('/api/household', callback); + } + getMedia(serialOrName, callback) { const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); @@ -1060,7 +1148,6 @@ class AlexaRemote extends EventEmitter { * */ getListItems(listId, options, callback) { - // get function params if (typeof options === 'function') { callback = options; @@ -1078,7 +1165,6 @@ class AlexaRemote extends EventEmitter { } addListItem(listId, options, callback) { - // get function params if (typeof options === 'string') { options = { 'value': options }; @@ -1100,7 +1186,6 @@ class AlexaRemote extends EventEmitter { } updateListItem(listId, listItem, options, callback) { - // providing a version is mandatory if (typeof options !== 'object' || !options.version || !options.value) { const errors = []; @@ -1133,7 +1218,6 @@ class AlexaRemote extends EventEmitter { } deleteListItem(listId, listItem, callback) { - // data const data = JSON.stringify({ 'listId': listId, @@ -1171,8 +1255,91 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`/api/notifications?cached=${cached}&_=%t`, callback); } - getSkills(callback) { + getNotificationSounds(serialOrName, alertType, callback) { + if (typeof alertType === 'function') { + callback = alertType; + alertType = ''; + } + const device = this.find(serialOrName); + if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet (`/api/notification/sounds?deviceType=${device.deviceType}&deviceSerialNumber=${device.serialNumber}&softwareVersion=${device.softwareVersion}${alertType ? `&alertType=${alertType}` : ''}`, callback); + } + + // alarm volume + getDeviceNotificationState(serialOrName, callback) { + const device = this.find(serialOrName); + if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet (`/api/device-notification-state/${device.deviceType}/${device.softwareVersion}/${device.serialNumber}`, callback); + } + + setDeviceNotificationVolume(serialOrName, volumeLevel, callback) { + const device = this.find(serialOrName); + if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet (`/api/device-notification-state/${device.deviceType}/${device.softwareVersion}/${device.serialNumber}`, callback , { + 'method': 'PUT', + 'data': JSON.stringify({ + volumeLevel + }) + }); + } + + setDeviceNotificationDefaultSound(serialOrName, notificationType, soundId, callback) { + const device = this.find(serialOrName); + if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet (`/api/notification/default-sound`, callback, { + 'method': 'PUT', + 'data': JSON.stringify({ + 'deviceType': device.deviceType, + 'deviceSerialNumber': device.serialNumber, + notificationType, + soundId + }) + }); + } + + getDeviceNotificationDefaultSound(serialOrName, notificationType, callback) { + const device = this.find(serialOrName); + if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet (`/api/notification/default-sound?deviceType=${device.deviceType}&deviceSerialNumber=${device.serialNumber}¬ificationType=${notificationType}`, callback); + } + + getAscendingAlarmState(serialOrName, callback) { + if (typeof serialOrName === 'function') { + callback = serialOrName; + serialOrName = undefined; + } + + this.httpsGet (`/api/ascending-alarm`, (err, res) => { + if (serialOrName) { + const device = this.find(serialOrName); + if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); + callback && callback(err, res && res.ascendingAlarmModelList && res.ascendingAlarmModelList.find(d => d.deviceSerialNumber === device.serialNumber)); + } else { + callback && callback(err, res ? res.ascendingAlarmModelList : res); + } + }); + } + + setDeviceAscendingAlarmState(serialOrName, ascendingAlarmEnabled, callback) { + const device = this.find(serialOrName); + if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet (`/api/ascending-alarm/${device.serialNumber}`, callback, { + 'method': 'PUT', + 'data': JSON.stringify({ + deviceSerialNumber: device.serialNumber, + deviceType: device.deviceType, + ascendingAlarmEnabled + }) + }); + } + getSkills(callback) { // request options const request = { 'method': 'GET', @@ -1203,7 +1370,7 @@ class AlexaRemote extends EventEmitter { this.httpsGet ('/api/wholeHomeAudio/v1/groups', (err, res) => callback && callback(err, res && res.groups)); } - createNotificationObject(serialOrName, type, label, value, status, sound) { // type = Reminder, Alarm + createNotificationObject(serialOrName, type, label, value, status, sound, recurring) { // type = Reminder, Alarm if (status && typeof status === 'object') { sound = status; status = 'ON'; @@ -1216,14 +1383,15 @@ class AlexaRemote extends EventEmitter { if (!dev) return null; const now = new Date(); - const notification = { + let notification = { 'alarmTime': now.getTime(), // will be overwritten 'createdDate': now.getTime(), 'type': type, // Alarm ... 'deviceSerialNumber': dev.serialNumber, 'deviceType': dev.deviceType, - 'reminderLabel': label || null, - 'sound': sound || null, + 'reminderLabel': type !== 'Timer' ? (label || null) : null, + 'timerLabel': type === 'Timer' ? (label || null) : null, + 'sound': (sound && typeof sound === 'object') ? sound: null, /*{ 'displayName': 'Countertop', 'folder': null, @@ -1233,9 +1401,9 @@ class AlexaRemote extends EventEmitter { }*/ 'originalDate': `${now.getFullYear()}-${_00(now.getMonth() + 1)}-${_00(now.getDate())}`, 'originalTime': `${_00(now.getHours())}:${_00(now.getMinutes())}:${_00(now.getSeconds())}.000`, - 'id': `create${type}`, + 'id': null, - 'isRecurring' : false, + 'isRecurring' : !!recurring, 'recurringPattern': null, 'timeZoneId': null, @@ -1243,29 +1411,44 @@ class AlexaRemote extends EventEmitter { 'isSaveInFlight': true, - 'status': 'ON' // OFF + 'status': status ? 'ON' : 'OFF', }; - /*if (type === 'Timer') { - notification.originalDate = null; - notification.originalTime = null; - notification.alarmTime = 0; - }*/ - return this.parseValue4Notification(notification, value); + if (recurring) { + notification.rRuleData = { + byWeekDays: recurring.byDay, + intervals: [recurring.interval], + frequency: recurring.freq, + flexibleRecurringPatternType: 'EVERY_X_WEEKS', + notificationTimes: [notification.originalTime], + recurStartDate: notification.originalDate, + recurStartTime: '00:00:00.000' + }; + } + + notification = this.parseValue4Notification(notification, value); + + // New style we need to add device! + if (notification.trigger && notification.assets && notification.extensions) { + notification.endpointId = `${dev.serialNumber}@${dev.deviceType}`; + if (recurring) { + notification.trigger.recurrence = recurring; + } + } + + return notification; } parseValue4Notification(notification, value) { + let dateOrTimeAdjusted = false; switch (typeof value) { case 'object': if (value instanceof Date) { if (notification.type !== 'Timer') { notification.alarmTime = value.getTime(); - notification.originalTime = `${_00 (value.getHours ())}:${_00 (value.getMinutes ())}:${_00 (value.getSeconds ())}.000`; + notification.originalDate = `${value.getFullYear()}-${_00(value.getMonth() + 1)}-${_00(value.getDate())}`; + notification.originalTime = `${_00(value.getHours ())}:${_00(value.getMinutes ())}:${_00(value.getSeconds ())}.000`; + dateOrTimeAdjusted = true; } - /*else { - let duration = value.getTime() - Date.now(); - if (duration < 0) duration = value.getTime(); - notification.remainingTime = duration; - }*/ } else { notification = extend(notification, value); // we combine the objects /* @@ -1307,39 +1490,52 @@ class AlexaRemote extends EventEmitter { if (notification.type !== 'Timer') { value = new Date(value); notification.alarmTime = value.getTime(); - if (value.getTime() > new Date().getTime()) { - notification.originalDate = `${value.getFullYear()}-${_00(value.getMonth() + 1)}-${_00(value.getDate())}`; - } + notification.originalDate = `${value.getFullYear()}-${_00(value.getMonth() + 1)}-${_00(value.getDate())}`; notification.originalTime = `${_00 (value.getHours ())}:${_00 (value.getMinutes ())}:${_00 (value.getSeconds ())}.000`; + dateOrTimeAdjusted = true; } - /*else { - //notification.remainingTime = value; - }*/ break; case 'boolean': notification.status = value ? 'ON' : 'OFF'; break; case 'string': { - const ar = value.split(':'); if (notification.type !== 'Timer') { const date = new Date(notification.alarmTime); - date.setHours(parseInt(ar[0], 10), ar.length > 1 ? parseInt(ar[1], 10) : 0, ar.length > 2 ? parseInt(ar[2], 10) : 0); - notification.alarmTime = date.getTime(); - notification.originalTime = `${_00(date.getHours())}:${_00(date.getMinutes())}:${_00(date.getSeconds())}.000`; - } - /*else { - let duration = 0; - let multi = 1; - for (let i = ar.length -1; i > 0; i--) { - duration += ar[i] * multi; - multi *= 60; + if (value.match(/^\d{4}-\d{1,2}-\d{1,2}$/)) { + // Does not work that way!! + const ar = value.split('-'); + date.setFullYear(ar[0]); + date.setMonth(ar[1] - 1); + date.setDate(ar[2]); + notification.originalDate = `${date.getFullYear()}-${_00(date.getMonth() + 1)}-${_00(date.getDate())}`; + dateOrTimeAdjusted = true; + } else if (value.match(/^\d{1,2}:\d{1,2}:?\d{0,2}$/)) { + const ar = value.split(':'); + date.setHours(parseInt(ar[0], 10), ar.length > 1 ? parseInt(ar[1], 10) : 0, ar.length > 2 ? parseInt(ar[2], 10) : 0); + notification.originalTime = `${_00(date.getHours())}:${_00(date.getMinutes())}:${_00(date.getSeconds())}.000`; + dateOrTimeAdjusted = true; } - notification.remainingTime = duration; - }*/ + } break; } } + if (dateOrTimeAdjusted && notification.type === 'Alarm') { + const newPutNotification = { + trigger: { + scheduledTime: `${notification.originalDate}T${notification.originalTime.substring(0, notification.originalTime.length - 4)}` + }, + extensions: [] + }; + if (notification.sound && notification.sound.id) { + newPutNotification.assets = [{ + type: 'TONE', + assetId: notification.sound.id + }]; + } + return newPutNotification; + } + const originalDateTime = `${notification.originalDate} ${notification.originalTime}`; const bits = originalDateTime.split(/\D/); let date = new Date(bits[0], --bits[1], bits[2], bits[3], bits[4], bits[5]); @@ -1353,23 +1549,50 @@ class AlexaRemote extends EventEmitter { } createNotification(notification, callback) { + // Alarm new style + if (notification.trigger && notification.assets && notification.extensions) { + const flags = { + method: 'POST', + data: JSON.stringify(notification) + }; + return this.httpsGetAuthApi (`/v1/alerts/alarms`, callback, flags); + } + const flags = { data: JSON.stringify(notification), method: 'PUT' }; - this.httpsGet (`/api/notifications/createReminder`, function(err, res) { - // {'Message':null} - callback && callback(err, res); - }, - flags - ); + this.httpsGet (`/api/notifications/null`, callback, flags); } changeNotification(notification, value, callback) { - notification = this.parseValue4Notification(notification, value); + const finalNotification = this.parseValue4Notification(notification, value); + + if (finalNotification.trigger && finalNotification.assets && finalNotification.extensions) { + return this.setNotificationV2(notification.notificationIndex, finalNotification, callback); + } + + return this.setNotification(finalNotification, callback); + } + + setNotification(notification, callback) { + if (notification.type === 'Reminder') { + delete notification.alarmTime; + delete notification.originalTime; + delete notification.originalDate; + } + if (notification.rRuleData) { + delete notification.rRuleData.recurrenceRules; + if ((notification.rRuleData.notificationTimes && notification.rRuleData.notificationTimes.length) || notification.recurringPattern === 'P1D') { + notification.rRuleData.frequency = 'DAILY'; + } else { + notification.rRuleData.frequency = 'WEEKLY'; + } + } + const flags = { - data: JSON.stringify(notification), - method: 'PUT' + method: 'PUT', + data: JSON.stringify(notification) }; this.httpsGet (`/api/notifications/${notification.id}`, function(err, res) { // {'Message':null} @@ -1379,6 +1602,14 @@ class AlexaRemote extends EventEmitter { ); } + setNotificationV2(notificationIndex, notification, callback) { + const flags = { + method: 'PUT', + data: JSON.stringify(notification) + }; + this.httpsGetAuthApi (`/v1/alerts/alarms/${notificationIndex}`, callback, flags); + } + deleteNotification(notification, callback) { const flags = { data: JSON.stringify (notification), @@ -1392,6 +1623,24 @@ class AlexaRemote extends EventEmitter { ); } + cancelNotification(notification, callback) { + if (notification.type === 'Alarm') { + const flags = { + method: 'PUT' + }; + + this.httpsGetAuthApi(`/v1/alerts/alarms/${notification.notificationIndex}/nextOccurrence/cancel`, callback, flags); + } else if (notification.type === 'Reminder') { + notification.status = 'INSTANCE_CANCELED'; + + const flags = { + data: JSON.stringify (notification), + method: 'PUT' + }; + this.httpsGet (`/api/notifications/${notification.id}`, callback, flags); + } + } + getDoNotDisturb(callback) { return this.getDeviceStatusList(callback); } @@ -1399,14 +1648,6 @@ class AlexaRemote extends EventEmitter { this.httpsGet (`/api/dnd/device-status-list?_=%t`, callback); } - // alarm volume - getDeviceNotificationState(serialOrName, callback) { - const dev = this.find(serialOrName); - if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - - this.httpsGet (`/api/device-notification-state/${dev.deviceType}/${dev.softwareVersion}/${dev.serialNumber}&_=%t`, callback); - } - getBluetooth(cached, callback) { if (typeof cached === 'function') { callback = cached; @@ -2170,6 +2411,40 @@ class AlexaRemote extends EventEmitter { return this.sendSequenceCommand(serialOrName, routine, callback); } + /** + * Get the Skill catalog that can be used for routines + * + * @param catalogId string defaults to "Root" + * @param limit number defaults to 100 + * @param callback response callback + */ + getRoutineSkillCatalog(catalogId, limit, callback) { + if (typeof limit === 'function') { + callback = limit; + limit = 100; + } + if (typeof catalogId === 'function') { + callback = catalogId; + catalogId = 'Root'; + } + + // request options + const request = { + 'method': 'POST', + 'data': JSON.stringify({ + actions: [], + triggers: [{ + skill: 'amzn1.ask.1p.customutterance', + type: 'CustomUtterance' + }], + limit + }) + }; + + // send request + this.httpsGet (`/api/routines/catalog/action/${catalogId}`, callback, request); + } + getMusicProviders(callback) { this.httpsGet ('/api/behaviors/entities?skillId=amzn1.ask.1p.music', callback, From 359881cf2fcd6f6b9990cdf695c3e420aacb8a9c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Jul 2022 13:15:36 +0200 Subject: [PATCH 236/356] chore: release v5.3.0 * (Apollon77) Adjust Alarm methods to use the new API from Amazon. Also createNotification() and parseValue4Notification() now returns the new format for Alarms * (Apollon77) Enhance createNotification() to also support adding reccurence information * (Apollon77) Notification objects will also have a delete method now * (Apollon77) Notifications can be cancelled now * (Apollon77) Adjust logging when no callback is provided again, now logs also the body * (Apollon77) Add methods: * getUsersMe() * getHousehold() * getNotificationSounds() * getDeviceNotificationState() * setDeviceNotificationVolume() * setDeviceNotificationDefaultSound() * getDeviceNotificationDefaultSound() * getAscendingAlarmState() * setDeviceAscendingAlarmState() * getRoutineSkillCatalog() to request the Skill catalog that can be used in Sequence Commands * cancelNotification() * setNotification() and setNotificationV2() --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0aec19e4..5698e3c2 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.3.0 (2022-07-09) * (Apollon77) Adjust Alarm methods to use the new API from Amazon. Also createNotification() and parseValue4Notification() now returns the new format for Alarms * (Apollon77) Enhance createNotification() to also support adding reccurence information * (Apollon77) Notification objects will also have a delete method now diff --git a/package-lock.json b/package-lock.json index 0d16969e..b1f52820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.2.0", + "version": "5.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.2.0", + "version": "5.3.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.3", diff --git a/package.json b/package.json index d7320a31..6f03be03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.2.0", + "version": "5.3.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 9f199821eb918ca2d06071159c87e841c592dd04 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Jul 2022 11:26:33 +0200 Subject: [PATCH 237/356] * (Apollon77) Increase timeouts for getting smart home device data * (Apollon77) support/handle "MusicAlarm" like "Alarm" on notifications * (Apollon77) Add convertNotificationToV2() to convert a notification object from old/queried format into one that can be used to set with new/V2 API (very pragmatic for now) --- README.md | 6 ++++++ alexa-remote.d.ts | 2 ++ alexa-remote.js | 18 ++++++++++++++---- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5698e3c2..7f85be99 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Increase timeouts for getting smart home device data +* (Apollon77) support/handle "MusicAlarm" like "Alarm" on notifications +* (Apollon77) Add convertNotificationToV2() to convert a notification object from old/queried format into one that can be used to set with new/V2 API (very pragmatic for now) + ### 5.3.0 (2022-07-09) * (Apollon77) Adjust Alarm methods to use the new API from Amazon. Also createNotification() and parseValue4Notification() now returns the new format for Alarms * (Apollon77) Enhance createNotification() to also support adding reccurence information diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index ceb7e6a8..4f230f1c 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -406,6 +406,8 @@ declare module "alexa-remote2" { sound: string ): Notification; + convertNotificationToV2(notification: Notification): NotificationV2; + parseValue4Notification( notification: Notification, value: Value diff --git a/alexa-remote.js b/alexa-remote.js index f4a35739..793c8560 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1438,6 +1438,11 @@ class AlexaRemote extends EventEmitter { return notification; } + //TODO: Hack for now, make better and clean + convertNotificationToV2(notification) { + return this.parseValue4Notification(notification, null); + } + parseValue4Notification(notification, value) { let dateOrTimeAdjusted = false; switch (typeof value) { @@ -1520,18 +1525,23 @@ class AlexaRemote extends EventEmitter { } } - if (dateOrTimeAdjusted && notification.type === 'Alarm') { + if ((value === null || dateOrTimeAdjusted) && (notification.type === 'Alarm' || notification.type === 'MusicAlarm')) { const newPutNotification = { trigger: { scheduledTime: `${notification.originalDate}T${notification.originalTime.substring(0, notification.originalTime.length - 4)}` }, extensions: [] }; - if (notification.sound && notification.sound.id) { + if (notification.sound && notification.sound.id && !notification.musicAlarmId) { newPutNotification.assets = [{ type: 'TONE', assetId: notification.sound.id }]; + } else if (notification.musicAlarmId) { + newPutNotification.assets = [{ + type: 'TONE', + assetId: 'MUSIC-' + notification.musicAlarmId + }]; } return newPutNotification; } @@ -1624,7 +1634,7 @@ class AlexaRemote extends EventEmitter { } cancelNotification(notification, callback) { - if (notification.type === 'Alarm') { + if (notification.type === 'Alarm' || notification.type === 'MusicAlarm') { const flags = { method: 'PUT' }; @@ -2743,7 +2753,7 @@ class AlexaRemote extends EventEmitter { data: JSON.stringify ({ 'stateRequests': reqArr }), - timeout: Math.min(maxTimeout || 60000, Math.max(10000, applicanceIds.length * 150)) + timeout: Math.min(maxTimeout || 60000, Math.max(15000, applicanceIds.length * 200)) }; From af46c7d9e8a6d70f7aed3cee0ed7e0e93ba50794 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Jul 2022 11:26:38 +0200 Subject: [PATCH 238/356] chore: release v5.4.0 * (Apollon77) Increase timeouts for getting smart home device data * (Apollon77) support/handle "MusicAlarm" like "Alarm" on notifications * (Apollon77) Add convertNotificationToV2() to convert a notification object from old/queried format into one that can be used to set with new/V2 API (very pragmatic for now) --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7f85be99..f1f092f8 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.4.0 (2022-07-11) * (Apollon77) Increase timeouts for getting smart home device data * (Apollon77) support/handle "MusicAlarm" like "Alarm" on notifications * (Apollon77) Add convertNotificationToV2() to convert a notification object from old/queried format into one that can be used to set with new/V2 API (very pragmatic for now) diff --git a/package-lock.json b/package-lock.json index b1f52820..a8fa602b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.3.0", + "version": "5.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.3.0", + "version": "5.4.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.3", diff --git a/package.json b/package.json index 6f03be03..3e21a6bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.3.0", + "version": "5.4.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From e82a71bec1c576db651ecb78eaf8c5ac8bbd9ed9 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Jul 2022 13:26:30 +0200 Subject: [PATCH 239/356] * (Apollon77) Add playAudible() to play Audible books --- README.md | 4 ++++ alexa-remote.d.ts | 6 ++++++ alexa-remote.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1f092f8..693aa426 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Add playAudible() to play Audible books + ### 5.4.0 (2022-07-11) * (Apollon77) Increase timeouts for getting smart home device data * (Apollon77) support/handle "MusicAlarm" like "Alarm" on notifications diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index 4f230f1c..7c7b60f7 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -571,6 +571,12 @@ declare module "alexa-remote2" { callback: CallbackWithErrorAndBody ): void; + playAudible( + serialOrName: SerialOrName, + searchPhrase: string, + callback: CallbackWithErrorAndBody + ): void; + sendTextMessage( conversationId: string, text: string, diff --git a/alexa-remote.js b/alexa-remote.js index 793c8560..3a45e373 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -315,6 +315,7 @@ class AlexaRemote extends EventEmitter { device._name = name; device.sendCommand = this.sendCommand.bind(this, device); device.setTunein = this.setTunein.bind(this, device); + device.playAudible = this.playAudible.bind(this, device); device.rename = this.renameDevice.bind(this, device); device.setDoNotDisturb = this.setDoNotDisturb.bind(this, device); device.delete = this.deleteDevice.bind(this, device); @@ -333,7 +334,8 @@ class AlexaRemote extends EventEmitter { device.isControllable = ( device.capabilities.includes('AUDIO_PLAYER') || device.capabilities.includes('AMAZON_MUSIC') || - device.capabilities.includes('TUNE_IN') + device.capabilities.includes('TUNE_IN')|| + device.capabilities.includes('AUDIBLE') ); device.hasMusicPlayer = ( device.capabilities.includes('AUDIO_PLAYER') || @@ -2510,6 +2512,50 @@ class AlexaRemote extends EventEmitter { ); } + playAudible(serialOrName, searchPhrase, callback) { + const dev = this.find(serialOrName); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + if (searchPhrase === '') return callback && callback(new Error('Searchphrase empty'), null); + + const operationPayload = { + 'deviceType': dev.deviceType, + 'deviceSerialNumber': dev.serialNumber, + 'locale': 'de', // TODO!! + 'customerId': dev.deviceOwnerCustomerId, + 'searchPhrase': searchPhrase + }; + + const validateObj = { + 'type': 'Alexa.Audible.Read', + 'operationPayload': JSON.stringify(operationPayload) + }; + + this.httpsGet (`/api/behaviors/operation/validate`, + (err, res) => { + if (err) { + return callback && callback(err, res); + } + if (res.result !== 'VALID') { + return callback && callback(new Error('Request invalid'), res); + } + validateObj.operationPayload = res.operationPayload; + + const seqCommandObj = { + '@type': 'com.amazon.alexa.behaviors.model.Sequence', + 'startNode': validateObj + }; + seqCommandObj.startNode['@type'] = 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode'; + seqCommandObj.startNode.skillId = 'amzn1.ask.skill.3b150b52-cedb-4792-a4b2-f656523a06f5'; + + return this.sendSequenceCommand(serialOrName, seqCommandObj, callback); + }, + { + method: 'POST', + data: JSON.stringify(validateObj) + } + ); + } + sendTextMessage(conversationId, text, callback) { // [{ // "conversationId": "amzn1.comms.messaging.id.conversationV2~e48ea7a9-b358-44fa-9be4-e45ae6a37c6a", From 652d4c5b1564ff0297d022d90e5afccae6bbc8d5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 11 Jul 2022 13:26:45 +0200 Subject: [PATCH 240/356] chore: release v5.5.0 * (Apollon77) Add playAudible() to play Audible books --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 693aa426..a463ba02 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.5.0 (2022-07-11) * (Apollon77) Add playAudible() to play Audible books ### 5.4.0 (2022-07-11) diff --git a/package-lock.json b/package-lock.json index a8fa602b..b3066145 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.4.0", + "version": "5.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.4.0", + "version": "5.5.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.3", diff --git a/package.json b/package.json index 3e21a6bc..83b5c3f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.4.0", + "version": "5.5.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From c52559f3841bafce95a6233726b8b085acad9486 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Jul 2022 08:56:21 +0200 Subject: [PATCH 241/356] * (Apollon77) Add sequence command "wait" --- README.md | 4 ++++ alexa-remote.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index a463ba02..00b46d37 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORk IN PROGRESS__ +* (Apollon77) Add sequence command "wait" + ### 5.5.0 (2022-07-11) * (Apollon77) Add playAudible() to play Audible books diff --git a/alexa-remote.js b/alexa-remote.js index 3a45e373..1bf5b5da 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2136,6 +2136,10 @@ class AlexaRemote extends EventEmitter { case 'calendarNext': seqNode.type = 'Alexa.Calendar.PlayNext'; break; + case 'wait': + seqNode.type = 'Alexa.System.Wait'; + seqNode.operationPayload.waitTimeInSeconds = parseInt(value, 10); + break; case 'textCommand': seqNode.type = 'Alexa.TextCommand'; seqNode.skillId = 'amzn1.ask.1p.tellalexa'; From acabd63dcadb99a2102838c6eebc5258cb54e551 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Jul 2022 08:57:01 +0200 Subject: [PATCH 242/356] * readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00b46d37..5d919dd8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Thank you for that work. ## Changelog: -### __WORk IN PROGRESS__ +### __WORK IN PROGRESS__ * (Apollon77) Add sequence command "wait" ### 5.5.0 (2022-07-11) From fd92f6a324c19102d4eb558947909fa2677065ca Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Jul 2022 08:57:07 +0200 Subject: [PATCH 243/356] chore: release v5.6.0 * (Apollon77) Add sequence command "wait" --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5d919dd8..2a20dac2 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.6.0 (2022-07-12) * (Apollon77) Add sequence command "wait" ### 5.5.0 (2022-07-11) diff --git a/package-lock.json b/package-lock.json index b3066145..62be0250 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.5.0", + "version": "5.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.5.0", + "version": "5.6.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.0.3", diff --git a/package.json b/package.json index 83b5c3f1..dbd33685 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.5.0", + "version": "5.6.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From c523fe4c07da8b9e72bf20cee5bcb202e483e5d1 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 18 Jul 2022 10:51:33 +0200 Subject: [PATCH 244/356] * see changelog * dep updates --- README.md | 46 +++++ alexa-remote.d.ts | 120 ++++++++++- alexa-remote.js | 498 +++++++++++++++++++++++++++++++++++++++++---- example/example.js | 2 + package-lock.json | 42 ++-- package.json | 6 +- 6 files changed, 653 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 2a20dac2..67702cc3 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,52 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Enhance querySmarthomeDevices to directly hand over an array of request definitions to e.g. also specify properties or such +* (Apollon77) Enhance SequenceCommands: + * "deviceStop" can also be called with an array of devices + * add "deviceStopAll" to stop all devices + * add "deviceDoNotDisturb" with allowed values as follows: boolean true/false to enable/disable or a number to set a enable-duration in seconds (up to 43.200 seconds = 12h) or use "HH:MM" as string to define an hour and minute till when it is set to not disturb + * add "deviceDoNotDisturbAll" to set Do not disturb for all devices, allowed value is the same as deviceDoNotDisturb + * add "fireTVTurnOn" to turn FireTV on (value ignored) + * add "fireTVTurnOff" to turn FireTV off (value ignored) + * add "fireTVTurnOnOff" to turn a FireTV device on (value===true) or off (value===false) + * add "fireTVPauseVideo" to pause a video on a FireTV device + * add "fireTVResumeVideo" to resume a video on a FireTV device + * add "fireTVNavigateHome" to navigate home on a FireTV device +* (Apollon77) Add getFireTVEntities() method to get available FireTV devices and their supported actions +* (Apollon77) Flag Fire-TV devices as controllable and having music player support +* (Apollon77) Add several new methods to query and change settings: + * getEqualizerEnabled() + * getEqualizerRange() + * getEqualizerSettings() + * setEqualizerSettings() + * getAuxControllerState() + * setAuxControllerPortDirection() + * getPlayerQueue() + * getDeviceSettings() - generic method, ideally use the methods listed next to get specific settings + * setDeviceSettings() - generic method, ideally use the methods listed next to get specific settings + * getConnectedSpeakerOptionSetting() + * setConnectedSpeakerOptionSetting() + * getAttentionSpanSetting() + * setAttentionSpanSetting() + * getAlexaGesturesSetting() + * setAlexaGesturesSetting() + * getDisplayPowerSetting() + * setDisplayPowerSetting() + * getAdaptiveBrightnessSetting() + * setAdaptiveBrightnessSetting() + * getClockTimeFormatSetting() + * setClockTimeFormatSetting() + * getBrightnessSetting() + * setBrightnessSetting() +* (Apollon77) Allow to overwrite the used default App-Name for the Amazon App Registration +* (Apollon77) An App name included in formerRegistrationData will be used for some API requests, else the default is used +* (Apollon77) Allow to modify the API-User-Agent Postfix to specify application name and version +* (Apollon77) Enhance the handling for exceeded rate limit responses +* (Apollon77/bbindreiter) Update used User-Agent for some requests + ### 5.6.0 (2022-07-12) * (Apollon77) Add sequence command "wait" diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index 7c7b60f7..cb7728b8 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -13,6 +13,8 @@ declare module "alexa-remote2" { logger: (...args: any[]) => void; alexaServiceHost: string; userAgent: string; + apiUserAgentPostfix: string + deviceAppName: string; acceptLanguage: string; amazonPage: string; useWsMqtt: boolean; @@ -35,6 +37,7 @@ declare module "alexa-remote2" { "tokenDate": number; "amazonPage": string; "csrf": string; + "deviceAppName": string; } }>; @@ -195,6 +198,16 @@ declare module "alexa-remote2" { customerName: string; }; + export type SmartHomeDeviceQueryEntry = { + entityId: string; + entityType: 'APPLIANCE' | 'ENTITY' | 'GROUP' + properties?: { + namespace: string; // aka interfaceName aka "Alexa.PowerController" + name: string; // e.g. "powerState" + instance?: string; + }[] + } + export type MessageCommands = | "play" | "pause" @@ -224,11 +237,20 @@ declare module "alexa-remote2" { | "curatedtts" | "volume" | "deviceStop" + | "deviceStopAll" + | "deviceDoNotDisturb" + | "deviceDoNotDisturbAll" | "speak" | "skill" | "notification" | "announcement" - | "ssml"; + | "ssml" + | "fireTVTurnOn" + | "fireTVTurnOff" + | "fireTVTurnOnOff" + | "fireTVPauseVideo" + | "fireTVResumeVideo" + | "fireTVNavigateHome"; export type SequenceType = "SerialNode" | "ParallelNode"; @@ -651,7 +673,7 @@ declare module "alexa-remote2" { discoverSmarthomeDevice(callback: CallbackWithErrorAndBody): void; querySmarthomeDevices( - applicanceIds: string[], + applicanceIds: string[] | SmartHomeDeviceQueryEntry[], entityType?: EntityType | CallbackWithErrorAndBody, maxTimeout?: number | CallbackWithErrorAndBody, callback?: CallbackWithErrorAndBody @@ -684,5 +706,99 @@ declare module "alexa-remote2" { getWholeHomeAudioGroups(callback: CallbackWithErrorAndBody): void getEndpoints(callback: CallbackWithErrorAndBody): void + + getEqualizerEnabled(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void + + getEqualizerRange(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void + + getEqualizerSettings(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void + + setEqualizerSettings( + serialOrName: SerialOrName, + bass: number, + midrange: number, + treble: number, + callback: CallbackWithErrorAndBody + ): void + + getDeviceSettings( + serialOrName: SerialOrName, + settingName: string, + callback: CallbackWithErrorAndBody + ): void; + + setDeviceSettings( + serialOrName: SerialOrName, + settingName: string, + value: any, + callback: CallbackWithErrorAndBody + ): void; + + getConnectedSpeakerOptionSetting(serialOrName: SerialOrName, callback:CallbackWithErrorAndBody): void + + setConnectedSpeakerOptionSetting( + serialOrName: SerialOrName, + speakerType: "Bluetooth" | "InternalSpeaker" | "Aux", // Aux not supported by all devices! + callback: CallbackWithErrorAndBody + ): void + + getAttentionSpanSetting(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + setAttentionSpanSetting( + serialOrName: SerialOrName, + enabled: boolean, + callback: CallbackWithErrorAndBody + ): void; + + getAlexaGesturesSetting(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + setAlexaGesturesSetting( + serialOrName: SerialOrName, + enabled: boolean, + callback: CallbackWithErrorAndBody + ): void; + + getDisplayPowerSetting(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + setDisplayPowerSetting( + serialOrName: SerialOrName, + enabled: boolean, + callback: CallbackWithErrorAndBody + ): void; + + getAdaptiveBrightnessSetting(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + setAdaptiveBrightnessSetting( + serialOrName: SerialOrName, + enabled: boolean, + callback: CallbackWithErrorAndBody + ): void; + + getClockTimeFormatSetting(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + setClockTimeFormatSetting( + serialOrName: SerialOrName, + format: "12_HOURS" | "24_HOURS", + callback: CallbackWithErrorAndBody + ): void; + + getBrightnessSetting(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + setBrightnessSetting(serialOrName: SerialOrName, brightness: number, callback: CallbackWithErrorAndBody): void; + + getAuxControllerState(serialOrName: SerialOrName, callback: CallbackWithErrorAndBody): void; + + setAuxControllerPortDirection( + serialOrName: SerialOrName, + direction: 'INPUT' | 'OUTPUT', + port: string | CallbackWithErrorAndBody, // Default is 'aux0' if not provided + callback?: CallbackWithErrorAndBody + ): void; + + getPlayerQueue( + serialOrName: SerialOrName, + size: number | CallbackWithErrorAndBody, + callback?: CallbackWithErrorAndBody + ): void; } } diff --git a/alexa-remote.js b/alexa-remote.js index 1bf5b5da..099be585 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -5,9 +5,12 @@ const extend = require('extend'); const AlexaWsMqtt = require('./alexa-wsmqtt.js'); const { v1: uuidv1 } = require('uuid'); const zlib = require('zlib'); +const fsPath = require('path'); const EventEmitter = require('events'); +const officialUserAgent = 'AppleWebKit PitanguiBridge/2.2.483723.0-[HARDWARE=iPhone10_4][SOFTWARE=15.5][DEVICE=iPhone]'; + function _00(val) { let s = val.toString(); while (s.length < 2) s = `0${s}`; @@ -74,21 +77,25 @@ class AlexaRemote extends EventEmitter { if (!this._options.userAgent) { const platform = os.platform(); if (platform === 'win32') { - this._options.userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0'; + this._options.userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'; } /*else if (platform === 'darwin') { this._options.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'; }*/ else { - this._options.userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'; + this._options.userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'; } } + if (this._options.apiUserAgentPostfix === undefined) { + this._options.apiUserAgentPostfix = `AlexaRemote/${require(fsPath.join(__dirname, 'package.json')).version}`; + } this._options.amazonPage = this._options.amazonPage || 'amazon.de'; this.baseUrl = `alexa.${this._options.amazonPage}`; cookie = this._options.cookie; } this._options.logger && this._options.logger(`Alexa-Remote: Use as User-Agent: ${this._options.userAgent}`); + this._options.logger && this._options.logger(`Alexa-Remote: Use as API User-Agent Postfix: ${this._options.apiUserAgentPostfix}`); this._options.logger && this._options.logger(`Alexa-Remote: Use as Login-Amazon-URL: ${this._options.amazonPage}`); if (this._options.alexaServiceHost) this.baseUrl = this._options.alexaServiceHost; this._options.logger && this._options.logger(`Alexa-Remote: Use as Base-URL: ${this.baseUrl}`); @@ -179,9 +186,9 @@ class AlexaRemote extends EventEmitter { if (!err && endpoints && endpoints.websiteApiUrl) { this.endpoints = endpoints; this.baseUrl = this.endpoints.websiteApiUrl.replace(/^https?:\/\//, ''); - this._options.logger && this._options.logger('Alexa-Remote: Change Base URL for API calls to ' + this.baseUrl); + this._options.logger && this._options.logger(`Alexa-Remote: Change Base URL for API calls to ${this.baseUrl}`); } else { - this._options.logger && this._options.logger('Alexa-Remote: Could not query endpoints: ' + err); + this._options.logger && this._options.logger(`Alexa-Remote: Could not query endpoints: ${err}`); } this.prepare(() => { if (this._options.useWsMqtt) { @@ -335,11 +342,13 @@ class AlexaRemote extends EventEmitter { device.capabilities.includes('AUDIO_PLAYER') || device.capabilities.includes('AMAZON_MUSIC') || device.capabilities.includes('TUNE_IN')|| - device.capabilities.includes('AUDIBLE') + device.capabilities.includes('AUDIBLE') || + device.deviceFamily === 'FIRE_TV' ); device.hasMusicPlayer = ( device.capabilities.includes('AUDIO_PLAYER') || - device.capabilities.includes('AMAZON_MUSIC') + device.capabilities.includes('AMAZON_MUSIC') || + device.deviceFamily === 'FIRE_TV' ); device.isMultiroomDevice = (device.clusterMembers.length > 0); device.isMultiroomMember = (device.parentClusters.length > 0); @@ -791,6 +800,8 @@ class AlexaRemote extends EventEmitter { } getAuthApiBearerToken(callback) { + if (!this.alexaCookie) this.alexaCookie = require('alexa-cookie2'); + const deviceAppName = (this._options.formerRegistrationData && this._options.formerRegistrationData.deviceAppName) || this.alexaCookie.getDeviceAppName(); // Use the App Name from last cookie response or use default one this.httpsGet(true, 'https://api.amazon.de/auth/token', (err, res) => { if (err) { this._options.logger && this._options.logger(`Alexa-Remote: Error getting auth token: ${err.message}`); @@ -805,7 +816,7 @@ class AlexaRemote extends EventEmitter { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - data: `app_name=ioBroker%20Alexa2&app_version=2.2.483723.0&di.sdk.version=6.12.3&source_token=${encodeURIComponent(this.cookieData.refreshToken)}&package_name=com.amazon.echo&di.hw.version=iPhone&platform=iOS&requested_token_type=access_token&source_token_type=refresh_token&di.os.name=iOS&di.os.version=15.5¤t_version=6.12.3&previous_version=6.12.3` + data: `app_name=${encodeURIComponent(deviceAppName)}&app_version=2.2.483723.0&di.sdk.version=6.12.3&source_token=${encodeURIComponent(this.cookieData.refreshToken)}&package_name=com.amazon.echo&di.hw.version=iPhone&platform=iOS&requested_token_type=access_token&source_token_type=refresh_token&di.os.name=iOS&di.os.version=15.5¤t_version=6.12.3&previous_version=6.12.3` }); } @@ -822,7 +833,7 @@ class AlexaRemote extends EventEmitter { flags.headers = flags.headers || {}; flags.headers.authorization = this.authApiBearerToken; flags.headers.authority = flags.host; - flags.headers['user-agent'] = 'AppleWebKit PitanguiBridge/2.2.483723.0-[HARDWARE=iPhone10_4][SOFTWARE=15.5][DEVICE=iPhone]'; + flags.headers['user-agent'] = `${officialUserAgent} ${this._options.apiUserAgentPostfix}`.trim(); if (!this.authApiBearerToken || Date.now() >= this.authApiBearerExpiry) { this.getAuthApiBearerToken((err, res) => { if (err || !res || !res.access_token || res.token_type !== 'bearer') { @@ -907,8 +918,11 @@ class AlexaRemote extends EventEmitter { } this._options.logger && this._options.logger(`Alexa-Remote: Response: No/Invalid JSON : ${body}`); - if (body.includes('ThrottlingException') || body.includes('Rate exceeded')) { - const delay = Math.floor(Math.random() * 3000) + 10000; + if (body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) { + let delay = Math.floor(Math.random() * 3000) + 10000; + if (body.includes('Too many requests')) { + delay += 20000 + Math.floor(Math.random() * 30000); + } this._options.logger && this._options.logger(`Alexa-Remote: rate exceeded response ... Retrying once in ${delay}ms`); flags = flags || {}; flags.isRetry = true; @@ -923,6 +937,16 @@ class AlexaRemote extends EventEmitter { // maybe set err AND body? // add x-amzn-ErrorType header to err? (e.g. 400 on /player: ExpiredPlayQueueException:http://internal.amazon.com/coral/com.amazon.dee.web.coral.model/) this._options.logger && this._options.logger(`Alexa-Remote: Response: ${JSON.stringify(ret)}`); + if (body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) { + let delay = Math.floor(Math.random() * 3000) + 10000; + if (body.includes('Too many requests')) { + delay += 20000 + Math.floor(Math.random() * 30000); + } + this._options.logger && this._options.logger(`Alexa-Remote: rate exceeded response ... Retrying once in ${delay}ms`); + flags = flags || {}; + flags.isRetry = true; + return setTimeout(() => this.httpsGetCall(path, callback, flags), delay); + } callback(null, ret); callback = null; }; @@ -933,16 +957,16 @@ class AlexaRemote extends EventEmitter { method: 'GET', timeout: flags.timeout || 10000, headers: { - 'User-Agent' : this._options.userAgent, - 'Content-Type': 'application/json; charset=UTF-8', - 'Accept': 'application/json', + 'User-Agent' : `${officialUserAgent} ${this._options.apiUserAgentPostfix}`.trim(), + 'Content-Type': 'application/json; charset=utf-8', + 'Accept': 'application/json; charset=utf-8', 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, //'Content-Type': 'application/json', //'Connection': 'keep-alive', 'csrf' : this.csrf, 'Cookie' : this.cookie, - 'Accept-Encoding': 'gzip,deflate' + 'Accept-Encoding': 'gzip, deflate' } }; @@ -1430,7 +1454,7 @@ class AlexaRemote extends EventEmitter { notification = this.parseValue4Notification(notification, value); // New style we need to add device! - if (notification.trigger && notification.assets && notification.extensions) { + if (notification.trigger && notification.extensions) { notification.endpointId = `${dev.serialNumber}@${dev.deviceType}`; if (recurring) { notification.trigger.recurrence = recurring; @@ -1542,7 +1566,7 @@ class AlexaRemote extends EventEmitter { } else if (notification.musicAlarmId) { newPutNotification.assets = [{ type: 'TONE', - assetId: 'MUSIC-' + notification.musicAlarmId + assetId: `MUSIC-${notification.musicAlarmId}` }]; } return newPutNotification; @@ -1562,7 +1586,7 @@ class AlexaRemote extends EventEmitter { createNotification(notification, callback) { // Alarm new style - if (notification.trigger && notification.assets && notification.extensions) { + if (notification.trigger && notification.extensions) { const flags = { method: 'POST', data: JSON.stringify(notification) @@ -1666,7 +1690,7 @@ class AlexaRemote extends EventEmitter { cached = true; } if (cached === undefined) cached = true; - this.httpsGet (`/api/bluetooth?cached=${cached}&_=%t`, callback); + this.httpsGet (`/api/bluetooth?cached=${cached}`, callback); } tuneinSearchRaw(query, callback) { @@ -2079,12 +2103,16 @@ class AlexaRemote extends EventEmitter { let deviceSerialNumber = 'ALEXA_CURRENT_DSN'; let deviceType= 'ALEXA_CURRENT_DEVICE_TYPE'; let deviceOwnerCustomerId = 'ALEXA_CUSTOMER_ID'; + let deviceAccountId; + let deviceFamily; if (serialOrName && !Array.isArray(serialOrName)) { const currDevice = this.find(serialOrName); if (currDevice) { deviceSerialNumber = currDevice.serialNumber; deviceType = currDevice.deviceType; deviceOwnerCustomerId = currDevice.deviceOwnerCustomerId; + deviceAccountId = currDevice.deviceAccountId; + deviceFamily = currDevice.deviceFamily; } } if (overrideCustomerId) { @@ -2159,6 +2187,38 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.cannedTtsStringId = `alexa.cannedtts.speak.curatedtts-category-${value}/alexa.cannedtts.speak.curatedtts-random`; break; } + case 'fireTVTurnOn': + case 'fireTVTurnOff': + case 'fireTVTurnOnOff': + case 'fireTVPauseVideo': + case 'fireTVResumeVideo': + case 'fireTVNavigateHome': + if (!deviceAccountId) { + throw new Error('No deviceAccountId found'); + } + if (!deviceFamily || deviceFamily !== 'FIRE_TV') { + throw new Error('Device is not a Fire TV'); + } + if (command === 'fireTVTurnOnOff') { + command = value ? 'fireTVTurnOn' : 'fireTVTurnOff'; + } + if (command === 'fireTVTurnOn') { + seqNode.type = 'Alexa.Operation.FireTV.TurnOn'; + } else if (command === 'fireTVTurnOff') { + seqNode.type = 'Alexa.Operation.FireTV.TurnOff'; + } else if (command === 'fireTVPauseVideo') { + seqNode.type = 'Alexa.Operation.FireTV.PauseVideo'; + } else if (command === 'fireTVResumeVideo') { + seqNode.type = 'Alexa.Operation.FireTV.ResumeVideo'; + } else if (command === 'fireTVNavigateHome') { + seqNode.type = 'Alexa.Operation.FireTV.NavigateHome'; + } + seqNode.skillId = 'amzn1.ask.1p.routines.firetv'; + seqNode.operationPayload.deviceAccountId = deviceAccountId; + delete seqNode.operationPayload.deviceType; + delete seqNode.operationPayload.deviceSerialNumber; + delete seqNode.operationPayload.locale; + break; case 'volume': seqNode.type = 'Alexa.DeviceControls.Volume'; value = ~~value; @@ -2168,18 +2228,99 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.value = value; break; case 'deviceStop': + case 'deviceStopAll': seqNode.type = 'Alexa.DeviceControls.Stop'; - seqNode.operationPayload.devices = [ - { - 'deviceSerialNumber': deviceSerialNumber, - 'deviceType': deviceType + if (command === 'deviceStopAll') { + seqNode.operationPayload.devices = [ + { + 'deviceSerialNumber': 'ALEXA_ALL_DSN', + 'deviceType': 'ALEXA_ALL_DEVICE_TYPE' + } + ]; + } else { + seqNode.operationPayload.devices = [ + { + 'deviceSerialNumber': deviceSerialNumber, + 'deviceType': deviceType + } + ]; + + if (serialOrName && Array.isArray(serialOrName)) { + seqNode.operationPayload.devices = []; + serialOrName.forEach((deviceId) => { + const currDevice = this.find(deviceId); + if (!currDevice) return; + seqNode.operationPayload.devices.push({ + 'deviceSerialNumber': currDevice.serialNumber, + 'deviceType': currDevice.deviceType + }); + }); } - ]; + } seqNode.operationPayload.isAssociatedDevice = false; delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; delete seqNode.operationPayload.locale; break; + case 'deviceDoNotDisturb': + case 'deviceDoNotDisturbAll': { + seqNode.type = 'Alexa.DeviceControls.DoNotDisturb'; + if (command === 'deviceDoNotDisturbAll') { + seqNode.operationPayload.devices = [ + { + 'deviceSerialNumber': 'ALEXA_ALL_DSN', + 'deviceType': 'ALEXA_ALL_DEVICE_TYPE' + } + ]; + } else { + seqNode.operationPayload.devices = [ + { + 'deviceSerialNumber': deviceSerialNumber, + 'deviceType': deviceType + } + ]; + + if (serialOrName && Array.isArray(serialOrName)) { + seqNode.operationPayload.devices = []; + serialOrName.forEach((deviceId) => { + const currDevice = this.find(deviceId); + if (!currDevice) return; + seqNode.operationPayload.devices.push({ + 'deviceSerialNumber': currDevice.serialNumber, + 'deviceType': currDevice.deviceType + }); + }); + } + } + seqNode.operationPayload.action = value ? 'Enable' : 'Disable'; + const valueType = typeof value; + if (valueType === 'number' && value <= 12 * 60 * 60) { + const hours = Math.floor(value / 3600); + const minutes = Math.floor((value - hours * 3600) / 60); + const seconds = value - hours * 3600 - minutes * 60; + let durationString = 'DURATION#PT'; + if (hours > 0) { + durationString += `${hours}H`; + } + durationString += `${minutes}M`; + durationString += `${seconds}S`; + seqNode.operationPayload.duration = durationString; + //seqNode.operationPayload.timeZoneId = 'Europe/Berlin'; + } else if (valueType === 'string') { + if (!value.text(/^\d{2}:\d{2}$/)) { + throw new Error('Invalid timepoint value provided'); + } + seqNode.operationPayload.until = `TIME#T${value}`; + //seqNode.operationPayload.timeZoneId = 'Europe/Berlin'; + } else { + throw new Error('Invalid timepoint provided'); + } + seqNode.operationPayload.isAssociatedDevice = false; + delete seqNode.operationPayload.deviceType; + delete seqNode.operationPayload.deviceSerialNumber; + delete seqNode.operationPayload.locale; + break; + } case 'speak': seqNode.type = 'Alexa.Speak'; if (typeof value !== 'string') value = String(value); @@ -2370,7 +2511,7 @@ class AlexaRemote extends EventEmitter { } const dev = this.find(Array.isArray(serialOrName) ? serialOrName[0] : serialOrName); - if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + if (!dev && !command.endsWith('All')) return callback && callback(new Error('Unknown Device or Serial number'), null); if (typeof value === 'function') { callback = value; @@ -2560,6 +2701,56 @@ class AlexaRemote extends EventEmitter { ); } + /*playFireTV(serialOrName, searchPhrase, callback) { + const dev = this.find(serialOrName); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + if (searchPhrase === '') return callback && callback(new Error('Searchphrase empty'), null); + + if (dev.deviceFamily !== 'FIRE_TV') { + return callback && callback(new Error('Device is not a FireTV'), null); + } + + const operationPayload = { + //'deviceType': dev.deviceType, + //'deviceSerialNumber': dev.serialNumber, + 'locale': 'de', // TODO!! + 'customerId': dev.deviceOwnerCustomerId, + 'deviceAccountId': dev.deviceAccountId, + 'searchPhrase': searchPhrase, + 'speakerId': 'ALEXA_CURRENT_SPEAKER_ID' + }; + + const validateObj = { + 'type': 'Alexa.Operation.Video.PlaySearchPhrase', + 'operationPayload': JSON.stringify(operationPayload) + }; + + this.httpsGet (`/api/behaviors/operation/validate`, + (err, res) => { + if (err) { + return callback && callback(err, res); + } + if (res.result !== 'VALID') { + return callback && callback(new Error('Request invalid'), res); + } + validateObj.operationPayload = res.operationPayload; + + const seqCommandObj = { + '@type': 'com.amazon.alexa.behaviors.model.Sequence', + 'startNode': validateObj + }; + seqCommandObj.startNode['@type'] = 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode'; + seqCommandObj.startNode.skillId = 'amzn1.ask.skill.3b150b52-cedb-4792-a4b2-f656523a06f5'; + + return this.sendSequenceCommand(serialOrName, seqCommandObj, callback); + }, + { + method: 'POST', + data: JSON.stringify(validateObj) + } + ); + }*/ + sendTextMessage(conversationId, text, callback) { // [{ // "conversationId": "amzn1.comms.messaging.id.conversationV2~e48ea7a9-b358-44fa-9be4-e45ae6a37c6a", @@ -2617,7 +2808,7 @@ class AlexaRemote extends EventEmitter { callback = serialOrName; serialOrName = null; } - this.httpsGet ('/api/device-preferences', (err, res) => { + this.httpsGet ('/api/device-preferences?cached=true', (err, res) => { if (serialOrName) { const device = this.find(serialOrName); if (!device) { @@ -2662,7 +2853,7 @@ class AlexaRemote extends EventEmitter { } getSmarthomeDevices(callback) { - this.httpsGet ('/api/phoenix?includeRelationships=true&_=%t', function (err, res) { + this.httpsGet ('/api/phoenix?includeRelationships=true', function (err, res) { if (err || !res || !res.networkDetail) return callback(err, res); try { res = JSON.parse(res.networkDetail); @@ -2692,6 +2883,18 @@ class AlexaRemote extends EventEmitter { ); } + getFireTVEntities(callback) { + this.httpsGet ('/api/behaviors/entities?skillId=amzn1.ask.1p.routines.firetv', + callback, + { + headers: { + 'Routines-Version': '3.0.128540' + }, + timeout: 30000 + } + ); + } + getSmarthomeBehaviourActionDefinitions(callback) { this.httpsGet ('/api/behaviors/actionDefinitions?skillId=amzn1.ask.1p.smarthome', callback, @@ -2779,23 +2982,28 @@ class AlexaRemote extends EventEmitter { this.httpsGet ('/api/phoenix/discovery', callback, flags); } - querySmarthomeDevices(applicanceIds, entityType, maxTimeout, callback) { + querySmarthomeDevices(toQuery, entityType, maxTimeout, callback) { if (typeof maxTimeout === 'function') { callback = maxTimeout; maxTimeout = null; } if (typeof entityType === 'function') { callback = entityType; - entityType = 'APPLIANCE'; // other value 'GROUP' + entityType = 'APPLIANCE'; // other value 'GROUP', 'ENTITY' } const reqArr = []; - if (!Array.isArray(applicanceIds)) applicanceIds = [applicanceIds]; - for (const id of applicanceIds) { - reqArr.push({ - 'entityId': id, - 'entityType': entityType - }); + if (!Array.isArray(toQuery)) toQuery = [toQuery]; + for (const id of toQuery) { + if (!id) continue; + if (typeof id === 'object') { + reqArr.push(id); + } else { + reqArr.push({ + 'entityId': id, + 'entityType': entityType + }); + } } const flags = { @@ -2803,7 +3011,7 @@ class AlexaRemote extends EventEmitter { data: JSON.stringify ({ 'stateRequests': reqArr }), - timeout: Math.min(maxTimeout || 60000, Math.max(15000, applicanceIds.length * 200)) + timeout: Math.min(maxTimeout || 60000, Math.max(15000, toQuery.length * 200)) }; @@ -2909,6 +3117,226 @@ class AlexaRemote extends EventEmitter { }; this.httpsGet (`/api/devices/device/${dev.serialNumber}?deviceType=${dev.deviceType}`, callback, flags); } + + getDeviceSettings(serialOrName, settingName, callback) { + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet(`/api/v1/devices/${dev.deviceAccountId}/settings/${settingName}`, (err, res) => { + if (!err && res && typeof res.value === 'string') { + try { + res.value = JSON.parse(res.value); + } catch (err) { + // ignore + } + } + callback && callback(err, res.value); + }); + } + + setDeviceSettings(serialOrName, settingName, value, callback) { + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + const flags = { + method: 'PUT', + data: JSON.stringify ({ + value: JSON.stringify(value) + }) + }; + this.httpsGet(`/api/v1/devices/${dev.deviceAccountId}/settings/${settingName}`, callback, flags); + } + + getConnectedSpeakerOptionSetting(serialOrName, callback) { + this.getDeviceSettings(serialOrName, 'connectedSpeakerOption', callback); + } + + setConnectedSpeakerOptionSetting(serialOrName, speakerType, callback) { + this.setDeviceSettings(serialOrName, 'connectedSpeakerOption', speakerType, callback); + } + + getAttentionSpanSetting(serialOrName, callback) { + this.getDeviceSettings(serialOrName, 'attentionSpan', callback); + } + + setAttentionSpanSetting(serialOrName, enabled, callback) { + this.setDeviceSettings(serialOrName, 'attentionSpan', !!enabled, callback); + } + + getAlexaGesturesSetting(serialOrName, callback) { + this.getDeviceSettings(serialOrName, 'alexaGestures', callback); + } + + setAlexaGesturesSetting(serialOrName, enabled, callback) { + this.setDeviceSettings(serialOrName, 'alexaGestures', !!enabled, callback); + } + + getDisplayPowerSetting(serialOrName, callback) { + this.getDeviceSettings(serialOrName, 'displayPower', (err, res) => { + if (!err && res !== undefined) { + res = res === 'ON'; + } + callback && callback(err, res); + }); + } + + setDisplayPowerSetting(serialOrName, enabled, callback) { + this.setDeviceSettings(serialOrName, 'displayPower', enabled ? 'ON' : 'OFF', callback); + } + + getAdaptiveBrightnessSetting(serialOrName, callback) { + this.getDeviceSettings(serialOrName, 'adaptiveBrightness', (err, res) => { + if (!err && res !== undefined) { + res = res === 'ON'; + } + callback && callback(err, res); + }); + } + + setAdaptiveBrightnessSetting(serialOrName, enabled, callback) { + this.setDeviceSettings(serialOrName, 'adaptiveBrightness', enabled ? 'ON' : 'OFF', callback); + } + + getClockTimeFormatSetting(serialOrName, callback) { + this.getDeviceSettings(serialOrName, 'timeFormat', callback); + } + + setClockTimeFormatSetting(serialOrName, format, callback) { + this.setDeviceSettings(serialOrName, 'timeFormat', format, callback); + } + + getBrightnessSetting(serialOrName, callback) { + this.getDeviceSettings(serialOrName, 'brightness', callback); + } + + setBrightnessSetting(serialOrName, brightness, callback) { + if (typeof brightness !== 'number') { + return callback && callback(new Error('Brightness must be a number'), null); + } + if (brightness < 0 || brightness > 100) { + return callback && callback(new Error('Brightness must be between 0 and 100'), null); + } + this.setDeviceSettings(serialOrName, 'brightness', brightness, callback); + } + + /** + * Response: + * { + * "enabled": true + * } + */ + getEqualizerEnabled(serialOrName, callback) { + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet(`/api/equalizer/enabled/${dev.serialNumber}/${dev.deviceType}`, callback); + } + + /** + * Response: + * { + * "max": 6, + * "min": -6 + * } + */ + getEqualizerRange(serialOrName, callback) { + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet(`/api/devices/${dev.serialNumber}/${dev.deviceType}/audio/v1/getEQRange`, callback); + } + + /** + * Response: + * { + * "bass": 0, + * "mid": 0, + * "treble": 0 + * } + */ + getEqualizerSettings(serialOrName, callback) { + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet(`/api/equalizer/${dev.serialNumber}/${dev.deviceType}`, callback); + } + + setEqualizerSettings(serialOrName, bass, midrange, treble, callback) { + const dev = this.find(serialOrName); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + if (bass !== undefined && typeof bass !== 'number') { + return callback && callback(new Error('Bass value must be a number'), null); + } + if (midrange !== undefined && typeof midrange !== 'number') { + return callback && callback(new Error('Midrange value must be a number'), null); + } + if (treble !== undefined && typeof treble !== 'number') { + return callback && callback(new Error('Treble value must be a number'), null); + } + if (bass === undefined && midrange === undefined && treble === undefined) { + return callback && callback(new Error('At least one value must be provided'), null); + } + + const flags = { + method: 'POST', + data: JSON.stringify ({ + bass, + mid: midrange, + treble + }) + }; + this.httpsGet (`/api/equalizer/${dev.serialNumber}/${dev.deviceType}`, callback, flags); + } + + /** + * Response: + * { + * "ports": [{ + * "direction": "OUTPUT", + * "id": "aux0", + * "inputActivity": null, + * "isEnabled": false, + * "isPlugged": false + * }] + * } + */ + getAuxControllerState(serialOrName, callback) { + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + this.httpsGet(`/api/auxcontroller/${dev.deviceType}/${dev.serialNumber}/state`, callback); + } + + setAuxControllerPortDirection(serialOrName, direction, port, callback) { + if (typeof port === 'function') { + callback = port; + port = 'aux0'; + } + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + const flags = { + method: 'POST', + data: JSON.stringify ({ + direction, + deviceId: dev.serialNumber + }) + }; + this.httpsGet (`/api/auxcontroller/${dev.deviceType}/${dev.serialNumber}/ports/${port}/setDirection`, callback, flags); + } + + getPlayerQueue(serialOrName, size, callback) { + if (typeof size === 'function') { + callback = size; + size = 50; + } + const dev = this.find(serialOrName, callback); + if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); + + + this.httpsGet (`/api/np/queue?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&size=${size}&_=%t`, callback); + } } module.exports = AlexaRemote; diff --git a/example/example.js b/example/example.js index f63b555f..a3cb8a03 100644 --- a/example/example.js +++ b/example/example.js @@ -20,6 +20,8 @@ alexa.init({ // amazonPage: '...', // optional, override Amazon-Login-Page for cookie determination and referer for requests useWsMqtt: true, // optional, true to use the Websocket/MQTT direct push connection cookieRefreshInterval: 7*24*60*1000, // optional, cookie refresh intervall, set to 0 to disable refresh + deviceAppName: '...', // optional: name of the device app name which will be registered with Amazon, leave empty to use a default one + apiUserAgentPostFix: '...', // optional: postfix to add to api useragent, leave empty to use a default one formerDataStorePath: '...', // optional: overwrite path where some of the formerRegistrationData are persisted to optimize against Amazon security measures formerRegistrationData: { ... }, // optional/preferred: provide the result object from subsequent proxy usages here and some generated data will be reused for next proxy call too macDms: { ... }, // required since version 4.0 to use Push connection! Is returned in cookieData.macDms diff --git a/package-lock.json b/package-lock.json index 62be0250..16fd7c66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,17 +9,17 @@ "version": "5.6.0", "license": "MIT", "dependencies": { - "alexa-cookie2": "^4.0.3", + "alexa-cookie2": "^4.1.1", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^8.3.2", - "ws": "^8.8.0" + "ws": "^8.8.1" }, "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.19.0" + "eslint": "^8.20.0" }, "engines": { "node": ">=12.0.0" @@ -355,9 +355,9 @@ "dev": true }, "node_modules/alexa-cookie2": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.3.tgz", - "integrity": "sha512-QNtLzGzRFzyBPfZqSBrLrZ15Zjvwe22H5bvXFfPTHeD3JxLUjtUqZmx94gfEmqZHZv06vhTmDmaiu0OsiU8KIw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.1.tgz", + "integrity": "sha512-wyLXFxD3dvJTU+5v8Mi61Ed9XXdxH6BpLrI90Bu/V07Ip6R/tW/g6xgytjC5L4c0ZdfyGeDMegVY/APRMIQUwQ==", "dependencies": { "cookie": "^0.5.0", "express": "^4.18.1", @@ -779,9 +779,9 @@ } }, "node_modules/eslint": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", - "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", + "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -2401,9 +2401,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", - "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "engines": { "node": ">=10.0.0" }, @@ -2727,9 +2727,9 @@ } }, "alexa-cookie2": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.0.3.tgz", - "integrity": "sha512-QNtLzGzRFzyBPfZqSBrLrZ15Zjvwe22H5bvXFfPTHeD3JxLUjtUqZmx94gfEmqZHZv06vhTmDmaiu0OsiU8KIw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.1.tgz", + "integrity": "sha512-wyLXFxD3dvJTU+5v8Mi61Ed9XXdxH6BpLrI90Bu/V07Ip6R/tW/g6xgytjC5L4c0ZdfyGeDMegVY/APRMIQUwQ==", "requires": { "cookie": "^0.5.0", "express": "^4.18.1", @@ -3050,9 +3050,9 @@ "dev": true }, "eslint": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", - "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", + "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -4252,9 +4252,9 @@ "dev": true }, "ws": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", - "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index dbd33685..a1755ecb 100644 --- a/package.json +++ b/package.json @@ -29,17 +29,17 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^4.0.3", + "alexa-cookie2": "^4.1.1", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.8.0", + "ws": "^8.8.1", "extend": "^3.0.2", "uuid": "^8.3.2" }, "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.19.0" + "eslint": "^8.20.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 85a073bc1ed4198ce44af0d5e2bc75e2c3d681dc Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 18 Jul 2022 10:51:44 +0200 Subject: [PATCH 245/356] chore: release v5.7.0 * (Apollon77) Enhance querySmarthomeDevices to directly hand over an array of request definitions to e.g. also specify properties or such * (Apollon77) Enhance SequenceCommands: * "deviceStop" can also be called with an array of devices * add "deviceStopAll" to stop all devices * add "deviceDoNotDisturb" with allowed values as follows: boolean true/false to enable/disable or a number to set a enable-duration in seconds (up to 43.200 seconds = 12h) or use "HH:MM" as string to define an hour and minute till when it is set to not disturb * add "deviceDoNotDisturbAll" to set Do not disturb for all devices, allowed value is the same as deviceDoNotDisturb * add "fireTVTurnOn" to turn FireTV on (value ignored) * add "fireTVTurnOff" to turn FireTV off (value ignored) * add "fireTVTurnOnOff" to turn a FireTV device on (value===true) or off (value===false) * add "fireTVPauseVideo" to pause a video on a FireTV device * add "fireTVResumeVideo" to resume a video on a FireTV device * add "fireTVNavigateHome" to navigate home on a FireTV device * (Apollon77) Add getFireTVEntities() method to get available FireTV devices and their supported actions * (Apollon77) Flag Fire-TV devices as controllable and having music player support * (Apollon77) Add several new methods to query and change settings: * getEqualizerEnabled() * getEqualizerRange() * getEqualizerSettings() * setEqualizerSettings() * getAuxControllerState() * setAuxControllerPortDirection() * getPlayerQueue() * getDeviceSettings() - generic method, ideally use the methods listed next to get specific settings * setDeviceSettings() - generic method, ideally use the methods listed next to get specific settings * getConnectedSpeakerOptionSetting() * setConnectedSpeakerOptionSetting() * getAttentionSpanSetting() * setAttentionSpanSetting() * getAlexaGesturesSetting() * setAlexaGesturesSetting() * getDisplayPowerSetting() * setDisplayPowerSetting() * getAdaptiveBrightnessSetting() * setAdaptiveBrightnessSetting() * getClockTimeFormatSetting() * setClockTimeFormatSetting() * getBrightnessSetting() * setBrightnessSetting() * (Apollon77) Allow to overwrite the used default App-Name for the Amazon App Registration * (Apollon77) An App name included in formerRegistrationData will be used for some API requests, else the default is used * (Apollon77) Allow to modify the API-User-Agent Postfix to specify application name and version * (Apollon77) Enhance the handling for exceeded rate limit responses * (Apollon77/bbindreiter) Update used User-Agent for some requests --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 67702cc3..799bf69b 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.7.0 (2022-07-18) * (Apollon77) Enhance querySmarthomeDevices to directly hand over an array of request definitions to e.g. also specify properties or such * (Apollon77) Enhance SequenceCommands: * "deviceStop" can also be called with an array of devices diff --git a/package-lock.json b/package-lock.json index 16fd7c66..0153317e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.6.0", + "version": "5.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.6.0", + "version": "5.7.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.1", diff --git a/package.json b/package.json index a1755ecb..9cdf1310 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.6.0", + "version": "5.7.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From c9cb7bc9626ce86b23e99c6dca68fa3c50fadf54 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 18 Jul 2022 23:01:38 +0200 Subject: [PATCH 246/356] * (Apollon77) Fix doNotDisturb/doNotDisturbAll in sequenceCommands * (Apollon77) Other sequence command optimizations --- README.md | 5 +++++ alexa-remote.js | 35 +++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 799bf69b..1e043002 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix doNotDisturb/doNotDisturbAll in sequenceCommands +* (Apollon77) Other sequence command optimizations + ### 5.7.0 (2022-07-18) * (Apollon77) Enhance querySmarthomeDevices to directly hand over an array of request definitions to e.g. also specify properties or such * (Apollon77) Enhance SequenceCommands: diff --git a/alexa-remote.js b/alexa-remote.js index 099be585..2230b50c 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2226,6 +2226,7 @@ class AlexaRemote extends EventEmitter { throw new Error('Volume needs to be between 0 and 100'); } seqNode.operationPayload.value = value; + seqNode.skillId = 'amzn1.ask.1p.alexadevicecontrols'; break; case 'deviceStop': case 'deviceStopAll': @@ -2234,14 +2235,14 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.devices = [ { 'deviceSerialNumber': 'ALEXA_ALL_DSN', - 'deviceType': 'ALEXA_ALL_DEVICE_TYPE' + 'deviceTypeId': 'ALEXA_ALL_DEVICE_TYPE' } ]; } else { seqNode.operationPayload.devices = [ { 'deviceSerialNumber': deviceSerialNumber, - 'deviceType': deviceType + 'deviceTypeId': deviceType } ]; @@ -2252,11 +2253,12 @@ class AlexaRemote extends EventEmitter { if (!currDevice) return; seqNode.operationPayload.devices.push({ 'deviceSerialNumber': currDevice.serialNumber, - 'deviceType': currDevice.deviceType + 'deviceTypeId': currDevice.deviceType }); }); } } + seqNode.skillId = 'amzn1.ask.1p.alexadevicecontrols'; seqNode.operationPayload.isAssociatedDevice = false; delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; @@ -2269,14 +2271,15 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.devices = [ { 'deviceSerialNumber': 'ALEXA_ALL_DSN', - 'deviceType': 'ALEXA_ALL_DEVICE_TYPE' + 'deviceTypeId': 'ALEXA_ALL_DEVICE_TYPE' } ]; } else { seqNode.operationPayload.devices = [ { 'deviceSerialNumber': deviceSerialNumber, - 'deviceType': deviceType + 'deviceTypeId': deviceType, + 'deviceAccountId': deviceAccountId } ]; @@ -2287,11 +2290,14 @@ class AlexaRemote extends EventEmitter { if (!currDevice) return; seqNode.operationPayload.devices.push({ 'deviceSerialNumber': currDevice.serialNumber, - 'deviceType': currDevice.deviceType + 'deviceTypeId': currDevice.deviceType, + 'deviceAccountId': deviceAccountId }); }); } } + seqNode.operationPayload.isAssociatedDevice = false; + seqNode.skillId = 'amzn1.ask.1p.alexadevicecontrols'; seqNode.operationPayload.action = value ? 'Enable' : 'Disable'; const valueType = typeof value; if (valueType === 'number' && value <= 12 * 60 * 60) { @@ -2307,12 +2313,12 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.duration = durationString; //seqNode.operationPayload.timeZoneId = 'Europe/Berlin'; } else if (valueType === 'string') { - if (!value.text(/^\d{2}:\d{2}$/)) { + if (!value.test(/^\d{2}:\d{2}$/)) { throw new Error('Invalid timepoint value provided'); } seqNode.operationPayload.until = `TIME#T${value}`; //seqNode.operationPayload.timeZoneId = 'Europe/Berlin'; - } else { + } else if (valueType !== 'boolean') { throw new Error('Invalid timepoint provided'); } seqNode.operationPayload.isAssociatedDevice = false; @@ -2361,6 +2367,7 @@ class AlexaRemote extends EventEmitter { if (value.length > 250) { throw new Error('text too long, limit are 250 characters', null); } + seqNode.skillId = 'amzn1.ask.1p.saysomething'; seqNode.operationPayload.textToSpeak = value; break; case 'skill': @@ -2399,6 +2406,7 @@ class AlexaRemote extends EventEmitter { delete seqNode.operationPayload.deviceType; delete seqNode.operationPayload.deviceSerialNumber; delete seqNode.operationPayload.locale; + seqNode.skillId = 'amzn1.ask.1p.routines.messaging'; break; } case 'announcement': @@ -2419,6 +2427,7 @@ class AlexaRemote extends EventEmitter { throw new Error('Value needs to be a valid SSML XML string', null); } } + seqNode.skillId = 'amzn1.ask.1p.routines.messaging'; seqNode.operationPayload.expireAfter = 'PT5S'; seqNode.operationPayload.content = [ { @@ -2538,10 +2547,12 @@ class AlexaRemote extends EventEmitter { 'sequenceJson': JSON.stringify(seqCommandObj), 'status': 'ENABLED' }; - reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceType":"ALEXA_CURRENT_DEVICE_TYPE"/g, `"deviceType":"${dev.deviceType}"`); - reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceTypeId":"ALEXA_CURRENT_DEVICE_TYPE"/g, `"deviceTypeId":"${dev.deviceType}"`); - reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceSerialNumber":"ALEXA_CURRENT_DSN"/g, `"deviceSerialNumber":"${dev.serialNumber}"`); - reqObj.sequenceJson = reqObj.sequenceJson.replace(/"customerId":"ALEXA_CUSTOMER_ID"/g, `"customerId":"${dev.deviceOwnerCustomerId}"`); + if (dev) { + reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceType":"ALEXA_CURRENT_DEVICE_TYPE"/g, `"deviceType":"${dev.deviceType}"`); + reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceTypeId":"ALEXA_CURRENT_DEVICE_TYPE"/g, `"deviceTypeId":"${dev.deviceType}"`); + reqObj.sequenceJson = reqObj.sequenceJson.replace(/"deviceSerialNumber":"ALEXA_CURRENT_DSN"/g, `"deviceSerialNumber":"${dev.serialNumber}"`); + reqObj.sequenceJson = reqObj.sequenceJson.replace(/"customerId":"ALEXA_CUSTOMER_ID"/g, `"customerId":"${dev.deviceOwnerCustomerId}"`); + } reqObj.sequenceJson = reqObj.sequenceJson.replace(/"locale":"ALEXA_CURRENT_LOCALE"/g, `"locale":"de-DE"`); this.httpsGet (`/api/behaviors/preview`, From d9fc683bc981e5a6f4360dc1bbb37c3d58378d5e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 18 Jul 2022 23:01:49 +0200 Subject: [PATCH 247/356] chore: release v5.7.1 * (Apollon77) Fix doNotDisturb/doNotDisturbAll in sequenceCommands * (Apollon77) Other sequence command optimizations --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1e043002..7074396e 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.7.1 (2022-07-18) * (Apollon77) Fix doNotDisturb/doNotDisturbAll in sequenceCommands * (Apollon77) Other sequence command optimizations diff --git a/package-lock.json b/package-lock.json index 0153317e..9c59c396 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.7.0", + "version": "5.7.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.7.0", + "version": "5.7.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.1", diff --git a/package.json b/package.json index 9cdf1310..0baf5371 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.7.0", + "version": "5.7.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 6af1ca96d67865f564d886cee9f01b70ffd23c74 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 19 Jul 2022 08:38:18 +0200 Subject: [PATCH 248/356] * (Apollon77) Fix crash case reported by Sentry --- README.md | 4 ++++ alexa-remote.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7074396e..5e2d4141 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix crash case reported by Sentry + ### 5.7.1 (2022-07-18) * (Apollon77) Fix doNotDisturb/doNotDisturbAll in sequenceCommands * (Apollon77) Other sequence command optimizations diff --git a/alexa-remote.js b/alexa-remote.js index 2230b50c..f9375fa4 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -3139,9 +3139,10 @@ class AlexaRemote extends EventEmitter { res.value = JSON.parse(res.value); } catch (err) { // ignore + return callback && callback(new Error(`Invalid value for setting ${settingName}: ${res}`)); } } - callback && callback(err, res.value); + callback && callback(err, res && res.value); }); } From b216834fbbf73f37474825d8ebe2403a41d6b748 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 19 Jul 2022 08:39:16 +0200 Subject: [PATCH 249/356] chore: release v5.7.2 * (Apollon77) Fix crash case reported by Sentry --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5e2d4141..b5d04e45 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.7.2 (2022-07-19) * (Apollon77) Fix crash case reported by Sentry ### 5.7.1 (2022-07-18) diff --git a/package-lock.json b/package-lock.json index 9c59c396..bf4c6cca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.7.1", + "version": "5.7.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.7.1", + "version": "5.7.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.1", diff --git a/package.json b/package.json index 0baf5371..9d9f4f3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.7.1", + "version": "5.7.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 6f8a6efe4238fbda1f4355b00698bed0208f8b15 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 19 Jul 2022 13:06:58 +0200 Subject: [PATCH 250/356] * (Apollon77) Fix deviceStop sequence command --- README.md | 4 ++++ alexa-remote.js | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b5d04e45..90f9a289 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix deviceStop sequence command + ### 5.7.2 (2022-07-19) * (Apollon77) Fix crash case reported by Sentry diff --git a/alexa-remote.js b/alexa-remote.js index f9375fa4..cd375656 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2235,14 +2235,14 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.devices = [ { 'deviceSerialNumber': 'ALEXA_ALL_DSN', - 'deviceTypeId': 'ALEXA_ALL_DEVICE_TYPE' + 'deviceType': 'ALEXA_ALL_DEVICE_TYPE' } ]; } else { seqNode.operationPayload.devices = [ { 'deviceSerialNumber': deviceSerialNumber, - 'deviceTypeId': deviceType + 'deviceType': deviceType } ]; @@ -2253,7 +2253,7 @@ class AlexaRemote extends EventEmitter { if (!currDevice) return; seqNode.operationPayload.devices.push({ 'deviceSerialNumber': currDevice.serialNumber, - 'deviceTypeId': currDevice.deviceType + 'deviceType': currDevice.deviceType }); }); } @@ -2291,7 +2291,7 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.devices.push({ 'deviceSerialNumber': currDevice.serialNumber, 'deviceTypeId': currDevice.deviceType, - 'deviceAccountId': deviceAccountId + 'deviceAccountId': currDevice.deviceAccountId }); }); } From d533412fd9202d1f4552b4f73c3fcea2cd7a8eaf Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 19 Jul 2022 13:07:12 +0200 Subject: [PATCH 251/356] chore: release v5.7.3 * (Apollon77) Fix deviceStop sequence command --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 90f9a289..44752aa2 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.7.3 (2022-07-19) * (Apollon77) Fix deviceStop sequence command ### 5.7.2 (2022-07-19) diff --git a/package-lock.json b/package-lock.json index bf4c6cca..7821f5af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.7.2", + "version": "5.7.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.7.2", + "version": "5.7.3", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.1", diff --git a/package.json b/package.json index 9d9f4f3b..b9310c26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.7.2", + "version": "5.7.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 751926fc12537566665e946611d94d85cfb789c2 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 23 Jul 2022 13:45:28 +0200 Subject: [PATCH 252/356] * Add info on push connection issues and how to solve them --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 44752aa2..c2f75502 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,19 @@ see example folder Partly based on [Amazon Alexa Remote Control](http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html) (PLAIN shell) and [alexa-remote-control](https://github.com/thorsten-gehrig/alexa-remote-control) and [OpenHab-Addon](https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol) Thank you for that work. +## Troubleshooting + +### Push Connections do not connect +Sometimes it could happen that because of too many connection tries aAmazon blocks the push connection endpoint for a specific IP and "device". + +If the Push connection is never established then you can try to use the following: +* delete all cookie, formerRegistrationData and macDms from the settings +* lokale the location of the alexa-cookie2 library in your npm tree +* check if there is a file like .../alexa-cookie2/lib/formerDataStore.json - if existing please delete them +* get new cookie via proxy + +Then it should work again + ## Known issues/Todos * getNotification works, changeNotification not ... maybe change is DELETE +Create :-) (+ source for createNotification: https://github.com/noelportugal/alexa-reminders/blob/master/alexa-reminders.js#L75, and Delete/create: https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/Connection.java#L829) * docu docu docu (sorry ... will come) From f207235707631682eef96590f4431c6acc06de6a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 23 Jul 2022 13:58:51 +0200 Subject: [PATCH 253/356] * update examplem --- example/example.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/example/example.js b/example/example.js index a3cb8a03..81e52f8b 100644 --- a/example/example.js +++ b/example/example.js @@ -6,6 +6,18 @@ let alexa = new Alexa(); // cookie starts with x-amzn-dat and ends with =" csrf=12345780 let cookie = { ... }; +alexa.on('cookie', (cookie, csrf, macDms) => { + // This event is triggered when a cookie is generated OR refreshed. + // Store these values for subsequent starts + // + // cookie to provide in options.cookie on next start + // csrf belongs to cookie and both needed, but is normally extracted from cookie again on start + // macDms needed for push connections. Provide in options.macDms on next start + // Get alexa.cookieData and store too and provide the content in options.formerRegistrationData on next start to allow cookie refreshs + // You can also just store alexa.cookieData and provide this object as options.cookie, then options.formerRegistrationData is handled internally too +}); + + alexa.init({ cookie: cookie, // cookie if already known, else can be generated using proxy proxyOnly: true, @@ -23,7 +35,7 @@ alexa.init({ deviceAppName: '...', // optional: name of the device app name which will be registered with Amazon, leave empty to use a default one apiUserAgentPostFix: '...', // optional: postfix to add to api useragent, leave empty to use a default one formerDataStorePath: '...', // optional: overwrite path where some of the formerRegistrationData are persisted to optimize against Amazon security measures - formerRegistrationData: { ... }, // optional/preferred: provide the result object from subsequent proxy usages here and some generated data will be reused for next proxy call too + formerRegistrationData: { ... }, // optional/preferred: provide the result object from subsequent proxy usages (cookieData) here and some generated data will be reused for next proxy call too macDms: { ... }, // required since version 4.0 to use Push connection! Is returned in cookieData.macDms }, function (err) { @@ -31,11 +43,15 @@ alexa.init({ console.log (err); return; } - console.log(JSON.stringify(alexa.cookie)); - console.log(JSON.stringify(alexa.csrf)); - console.log(JSON.stringify(alexa.cookieData)); for (let deviceSerial of Object.keys(alexa.serialNumbers)) { - console.log (deviceSerial); + console.log(deviceSerial); + + // const device = alexa.find(deviceSerial); // find device object by serial number + // console.log(JSON.stringify(device, null, 2)); // print device object + + // device.sendCommand('volume', 50); // some methods are exposed on device object and can be called without device/deviceSerial + // alexa.sendCommand(device, 'volume', 50); // but can also be called by providing the device object or serial on main class instance + // alexa.sendSequenceCommand(deviceSerial, 'speak', 'Hello friends'); // send sequence command to device } } ); From f2e1c9e7f6057cd1336b3d3962cd3617ca1f6784 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 02:05:09 +0000 Subject: [PATCH 254/356] chore(deps): bump actions/setup-node from 3.3.0 to 3.4.1 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.3.0 to 3.4.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.3.0...v3.4.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 593042f4..11d9f4ac 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.3.0 + uses: actions/setup-node@v3.4.1 with: node-version: ${{ matrix.node-version }} @@ -59,7 +59,7 @@ jobs: uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.3.0 + uses: actions/setup-node@v3.4.1 with: node-version: ${{ matrix.node-version }} From 793085a559633b99c8bb696dd5a2c6449d8245c0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Aug 2022 23:09:50 +0200 Subject: [PATCH 255/356] * (Apollon77) Update cookie library to optimize cookie handling in other regions like australia --- README.md | 4 ++++ package-lock.json | 14 +++++++------- package.json | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c2f75502..09d44788 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Update cookie library to optimize cookie handling in other regions like australia + ### 5.7.3 (2022-07-19) * (Apollon77) Fix deviceStop sequence command diff --git a/package-lock.json b/package-lock.json index 7821f5af..31c4f149 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.7.3", "license": "MIT", "dependencies": { - "alexa-cookie2": "^4.1.1", + "alexa-cookie2": "^4.1.3", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", @@ -355,9 +355,9 @@ "dev": true }, "node_modules/alexa-cookie2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.1.tgz", - "integrity": "sha512-wyLXFxD3dvJTU+5v8Mi61Ed9XXdxH6BpLrI90Bu/V07Ip6R/tW/g6xgytjC5L4c0ZdfyGeDMegVY/APRMIQUwQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.3.tgz", + "integrity": "sha512-T3iTBIBi48d5Fh2g7FhW9hVWr4UuNrQWDI/d2ksrevGCm3mzMae7KI0WanV/GdXAMVRWRnNKBQNAtxx6n0UBoA==", "dependencies": { "cookie": "^0.5.0", "express": "^4.18.1", @@ -2727,9 +2727,9 @@ } }, "alexa-cookie2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.1.tgz", - "integrity": "sha512-wyLXFxD3dvJTU+5v8Mi61Ed9XXdxH6BpLrI90Bu/V07Ip6R/tW/g6xgytjC5L4c0ZdfyGeDMegVY/APRMIQUwQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.3.tgz", + "integrity": "sha512-T3iTBIBi48d5Fh2g7FhW9hVWr4UuNrQWDI/d2ksrevGCm3mzMae7KI0WanV/GdXAMVRWRnNKBQNAtxx6n0UBoA==", "requires": { "cookie": "^0.5.0", "express": "^4.18.1", diff --git a/package.json b/package.json index b9310c26..af0f84bd 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^4.1.1", + "alexa-cookie2": "^4.1.3", "https": "^1.0.0", "querystring": "^0.2.1", "ws": "^8.8.1", From df1ef8a23de680024f75beca79717fa946bc013e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 3 Aug 2022 23:10:07 +0200 Subject: [PATCH 256/356] chore: release v5.7.4 * (Apollon77) Update cookie library to optimize cookie handling in other regions like australia --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 09d44788..a72db8cd 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.7.4 (2022-08-03) * (Apollon77) Update cookie library to optimize cookie handling in other regions like australia ### 5.7.3 (2022-07-19) diff --git a/package-lock.json b/package-lock.json index 31c4f149..856b3218 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.7.3", + "version": "5.7.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.7.3", + "version": "5.7.4", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index af0f84bd..1fbd63f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.7.3", + "version": "5.7.4", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 79b32e2af5c33346ea80b2e307976ac33aa0280a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 4 Aug 2022 23:54:27 +0200 Subject: [PATCH 257/356] * (Apollon77) Fix rate limit retries --- README.md | 4 ++++ alexa-remote.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a72db8cd..65c4d180 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix rate limit retries + ### 5.7.4 (2022-08-03) * (Apollon77) Update cookie library to optimize cookie handling in other regions like australia diff --git a/alexa-remote.js b/alexa-remote.js index cd375656..aeeee01c 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -918,7 +918,7 @@ class AlexaRemote extends EventEmitter { } this._options.logger && this._options.logger(`Alexa-Remote: Response: No/Invalid JSON : ${body}`); - if (body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) { + if ((body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) && flags && !flags.isRetry) { let delay = Math.floor(Math.random() * 3000) + 10000; if (body.includes('Too many requests')) { delay += 20000 + Math.floor(Math.random() * 30000); From 19b12f0cfc7bcc283433df778054621b07278bed Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 4 Aug 2022 23:54:45 +0200 Subject: [PATCH 258/356] chore: release v5.7.5 * (Apollon77) Fix rate limit retries --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 65c4d180..e0d621d4 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.7.5 (2022-08-04) * (Apollon77) Fix rate limit retries ### 5.7.4 (2022-08-03) diff --git a/package-lock.json b/package-lock.json index 856b3218..d548caad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.7.4", + "version": "5.7.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.7.4", + "version": "5.7.5", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index 1fbd63f6..d55bf3e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.7.4", + "version": "5.7.5", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 45210d5f92ad530917dedc4005f3f9bdfce6208b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 6 Aug 2022 19:16:48 +0200 Subject: [PATCH 259/356] * (Apollon77) Fix Timer/Alarm creation with just providing the time and make sure next day is used when time on current day is already over --- README.md | 4 ++++ alexa-remote.js | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e0d621d4..cee798cc 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix Timer/Alarm creation with just providing the time and make sure next day is used when time on current day is already over + ### 5.7.5 (2022-08-04) * (Apollon77) Fix rate limit retries diff --git a/alexa-remote.js b/alexa-remote.js index aeeee01c..3f9fee4a 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1551,6 +1551,15 @@ class AlexaRemote extends EventEmitter { } } + const originalDateTime = `${notification.originalDate} ${notification.originalTime}`; + const bits = originalDateTime.split(/\D/); + const date = new Date(bits[0], --bits[1], bits[2], bits[3], bits[4], bits[5]); + if (date.getTime() < Date.now()) { + date.setDate(date.getDate() + 1); + notification.originalDate = `${date.getFullYear()}-${_00(date.getMonth() + 1)}-${_00(date.getDate())}`; + notification.originalTime = `${_00(date.getHours())}:${_00(date.getMinutes())}:${_00(date.getSeconds())}.000`; + } + if ((value === null || dateOrTimeAdjusted) && (notification.type === 'Alarm' || notification.type === 'MusicAlarm')) { const newPutNotification = { trigger: { @@ -1572,15 +1581,6 @@ class AlexaRemote extends EventEmitter { return newPutNotification; } - const originalDateTime = `${notification.originalDate} ${notification.originalTime}`; - const bits = originalDateTime.split(/\D/); - let date = new Date(bits[0], --bits[1], bits[2], bits[3], bits[4], bits[5]); - if (date.getTime() < Date.now()) { - date = new Date(date.getTime() + 24 * 60 * 60 * 1000); - notification.originalDate = `${date.getFullYear()}-${_00(date.getMonth() + 1)}-${_00(date.getDate())}`; - notification.originalTime = `${_00(date.getHours())}:${_00(date.getMinutes())}:${_00(date.getSeconds())}.000`; - } - return notification; } From 22f24d4963716c13045090dd64101741ab98abef Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 6 Aug 2022 19:17:02 +0200 Subject: [PATCH 260/356] chore: release v5.7.6 * (Apollon77) Fix Timer/Alarm creation with just providing the time and make sure next day is used when time on current day is already over --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cee798cc..e5367918 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.7.6 (2022-08-06) * (Apollon77) Fix Timer/Alarm creation with just providing the time and make sure next day is used when time on current day is already over ### 5.7.5 (2022-08-04) diff --git a/package-lock.json b/package-lock.json index d548caad..ffe8151e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.7.5", + "version": "5.7.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.7.5", + "version": "5.7.6", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index d55bf3e3..c5a970c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.7.5", + "version": "5.7.6", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From e9957f2a3a635d2f1e4bca6e2e1a4f41c7063d7e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 9 Aug 2022 11:54:54 +0200 Subject: [PATCH 261/356] * (Apollon77) Allow sendSequenceCommand method to also send commands to multiple devices (when supported by the relevant command like doNotDisturb) --- README.md | 3 +++ alexa-remote.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5367918..5463d35e 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,9 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Allow sendSequenceCommand method to also send commands to multiple devices (when supported by the relevant command like doNotDisturb) + ### 5.7.6 (2022-08-06) * (Apollon77) Fix Timer/Alarm creation with just providing the time and make sure next day is used when time on current day is already over diff --git a/alexa-remote.js b/alexa-remote.js index 3f9fee4a..023c4788 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2535,7 +2535,7 @@ class AlexaRemote extends EventEmitter { try { seqCommandObj = { '@type': 'com.amazon.alexa.behaviors.model.Sequence', - 'startNode': this.createSequenceNode(command, value, dev, overrideCustomerId) + 'startNode': this.createSequenceNode(command, value, serialOrName, overrideCustomerId) }; } catch (err) { return callback && callback(err, null); From 74e8646bc106da6b088c6000ebb0928f07cf9891 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 9 Aug 2022 11:55:06 +0200 Subject: [PATCH 262/356] chore: release v5.8.0 * (Apollon77) Allow sendSequenceCommand method to also send commands to multiple devices (when supported by the relevant command like doNotDisturb) --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5463d35e..03d8c5af 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 5.8.0 (2022-08-09) * (Apollon77) Allow sendSequenceCommand method to also send commands to multiple devices (when supported by the relevant command like doNotDisturb) ### 5.7.6 (2022-08-06) diff --git a/package-lock.json b/package-lock.json index ffe8151e..0be4e120 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.7.6", + "version": "5.8.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.7.6", + "version": "5.8.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index c5a970c6..bb1bd26e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.7.6", + "version": "5.8.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 0f8927f181249ac44a7f5c488d0e9ff26911dc16 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 18 Aug 2022 08:33:11 +0200 Subject: [PATCH 263/356] * (Apollon77) Fix doNotDisturb sequence command --- README.md | 4 ++++ alexa-remote.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 03d8c5af..8154ae07 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix doNotDisturb sequence command + ### 5.8.0 (2022-08-09) * (Apollon77) Allow sendSequenceCommand method to also send commands to multiple devices (when supported by the relevant command like doNotDisturb) diff --git a/alexa-remote.js b/alexa-remote.js index 023c4788..00dc3550 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2313,7 +2313,7 @@ class AlexaRemote extends EventEmitter { seqNode.operationPayload.duration = durationString; //seqNode.operationPayload.timeZoneId = 'Europe/Berlin'; } else if (valueType === 'string') { - if (!value.test(/^\d{2}:\d{2}$/)) { + if (!/^\d{2}:\d{2}$/.test(value)) { throw new Error('Invalid timepoint value provided'); } seqNode.operationPayload.until = `TIME#T${value}`; From c6e6657fb0d1087081af511b6a4aa5b58e4a9999 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 18 Aug 2022 08:33:40 +0200 Subject: [PATCH 264/356] chore: release v5.8.1 * (Apollon77) Fix doNotDisturb sequence command --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8154ae07..feed4931 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.8.1 (2022-08-18) * (Apollon77) Fix doNotDisturb sequence command ### 5.8.0 (2022-08-09) diff --git a/package-lock.json b/package-lock.json index 0be4e120..92f4c73b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.8.0", + "version": "5.8.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.8.0", + "version": "5.8.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index bb1bd26e..5a05078a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.8.0", + "version": "5.8.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From c017c5eece5aeb88353c13bafd17cc27d78f2c57 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 19 Aug 2022 12:24:05 +0200 Subject: [PATCH 265/356] * (Apollon77) Fix doNotDisturb sequence command when time string was used --- README.md | 4 ++++ alexa-remote.js | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index feed4931..6e365a8a 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix doNotDisturb sequence command when time string was used + ### 5.8.1 (2022-08-18) * (Apollon77) Fix doNotDisturb sequence command diff --git a/alexa-remote.js b/alexa-remote.js index 00dc3550..8b319005 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2105,6 +2105,7 @@ class AlexaRemote extends EventEmitter { let deviceOwnerCustomerId = 'ALEXA_CUSTOMER_ID'; let deviceAccountId; let deviceFamily; + let deviceTimezoneId; if (serialOrName && !Array.isArray(serialOrName)) { const currDevice = this.find(serialOrName); if (currDevice) { @@ -2113,6 +2114,16 @@ class AlexaRemote extends EventEmitter { deviceOwnerCustomerId = currDevice.deviceOwnerCustomerId; deviceAccountId = currDevice.deviceAccountId; deviceFamily = currDevice.deviceFamily; + if (currDevice.preferences && currDevice.preferences.timeZoneId !== undefined) { + deviceTimezoneId = currDevice.preferences.timeZoneId; + } + } + } else { + const currDevice = this.find(serialOrName[0]); + if (currDevice) { + if (currDevice.preferences && currDevice.preferences.timeZoneId !== undefined) { + deviceTimezoneId = currDevice.preferences.timeZoneId; + } } } if (overrideCustomerId) { @@ -2317,7 +2328,7 @@ class AlexaRemote extends EventEmitter { throw new Error('Invalid timepoint value provided'); } seqNode.operationPayload.until = `TIME#T${value}`; - //seqNode.operationPayload.timeZoneId = 'Europe/Berlin'; + seqNode.operationPayload.timeZoneId = deviceTimezoneId || 'Europe/Berlin'; } else if (valueType !== 'boolean') { throw new Error('Invalid timepoint provided'); } From a4d1a72a4de4a4107c25e8ae815c72cf5ca0ec44 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 19 Aug 2022 12:24:18 +0200 Subject: [PATCH 266/356] chore: release v5.8.2 * (Apollon77) Fix doNotDisturb sequence command when time string was used --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6e365a8a..5d94b0f1 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.8.2 (2022-08-19) * (Apollon77) Fix doNotDisturb sequence command when time string was used ### 5.8.1 (2022-08-18) diff --git a/package-lock.json b/package-lock.json index 92f4c73b..d04f49b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.8.1", + "version": "5.8.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.8.1", + "version": "5.8.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index 5a05078a..a21bce21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.8.1", + "version": "5.8.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 9c43afcfc632c05f3aa7c998a091c1736f14c8ae Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 27 Oct 2022 08:56:52 +0200 Subject: [PATCH 267/356] * update gha --- .github/stale.yml | 3 ++- .github/workflows/test-and-release.yml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/stale.yml b/.github/stale.yml index 04f9e03e..8a1bc210 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -14,6 +14,7 @@ onlyLabels: [] exemptLabels: - enhancement - security + - bug # Set to true to ignore issues in a project (defaults to false) exemptProjects: true @@ -75,4 +76,4 @@ only: issues # issues: # exemptLabels: -# - confirmed \ No newline at end of file +# - confirmed diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 11d9f4ac..1dd320ce 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -16,6 +16,11 @@ on: - "v?[0-9]+.[0-9]+.[0-9]+-**" pull_request: {} +# Cancel previous PR/branch runs when a new commit is pushed +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + jobs: # Performs quick checks before the expensive test runs check-and-lint: From 0ef6789bc32f2454792c1122fb0aaa1635609da3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 27 Oct 2022 08:59:38 +0200 Subject: [PATCH 268/356] * (Apollon77) Fix retry issues for rate limited responses from amazon * (Apollon77) Lowercase text that sent to textcommand because other cases had issues in the past --- README.md | 5 +++++ alexa-remote.js | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5d94b0f1..842e34c7 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix retry issues for rate limited responses from amazon +* (Apollon77) Lowercase text that sent to textcommand because other cases had issues in the past + ### 5.8.2 (2022-08-19) * (Apollon77) Fix doNotDisturb sequence command when time string was used diff --git a/alexa-remote.js b/alexa-remote.js index 8b319005..13a13b3b 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -894,9 +894,8 @@ class AlexaRemote extends EventEmitter { return callback(new Error('401 Unauthorized'), null); } - if (!err && typeof res.statusCode === 'number' && res.statusCode === 503 && flags && !flags.isRetry) { + if (!err && typeof res.statusCode === 'number' && res.statusCode === 503 && !flags.isRetry) { this._options.logger && this._options.logger('Alexa-Remote: Response: 503 ... Retrying once'); - flags = flags || {}; flags.isRetry = true; return setTimeout(() => this.httpsGetCall(path, callback, flags), Math.floor(Math.random() * 500) + 500); } @@ -918,13 +917,12 @@ class AlexaRemote extends EventEmitter { } this._options.logger && this._options.logger(`Alexa-Remote: Response: No/Invalid JSON : ${body}`); - if ((body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) && flags && !flags.isRetry) { + if ((body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) && !flags.isRetry) { let delay = Math.floor(Math.random() * 3000) + 10000; if (body.includes('Too many requests')) { delay += 20000 + Math.floor(Math.random() * 30000); } this._options.logger && this._options.logger(`Alexa-Remote: rate exceeded response ... Retrying once in ${delay}ms`); - flags = flags || {}; flags.isRetry = true; return setTimeout(() => this.httpsGetCall(path, callback, flags), delay); } @@ -937,13 +935,12 @@ class AlexaRemote extends EventEmitter { // maybe set err AND body? // add x-amzn-ErrorType header to err? (e.g. 400 on /player: ExpiredPlayQueueException:http://internal.amazon.com/coral/com.amazon.dee.web.coral.model/) this._options.logger && this._options.logger(`Alexa-Remote: Response: ${JSON.stringify(ret)}`); - if (body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) { + if ((body.includes('ThrottlingException') || body.includes('Rate exceeded') || body.includes('Too many requests')) && !flags.isRetry) { let delay = Math.floor(Math.random() * 3000) + 10000; if (body.includes('Too many requests')) { delay += 20000 + Math.floor(Math.random() * 30000); } this._options.logger && this._options.logger(`Alexa-Remote: rate exceeded response ... Retrying once in ${delay}ms`); - flags = flags || {}; flags.isRetry = true; return setTimeout(() => this.httpsGetCall(path, callback, flags), delay); } @@ -951,6 +948,8 @@ class AlexaRemote extends EventEmitter { callback = null; }; + flags = flags || {}; + const options = { host: flags.host || this.baseUrl, path: '', @@ -2182,7 +2181,7 @@ class AlexaRemote extends EventEmitter { case 'textCommand': seqNode.type = 'Alexa.TextCommand'; seqNode.skillId = 'amzn1.ask.1p.tellalexa'; - seqNode.operationPayload.text = value.toString(); + seqNode.operationPayload.text = value.toString().toLowerCase(); break; case 'sound': seqNode.type = 'Alexa.Sound'; From aca70e439de1139d684efca396d3f625bbbb3ae3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 27 Oct 2022 09:01:04 +0200 Subject: [PATCH 269/356] chore: release v5.8.3 * (Apollon77) Fix retry issues for rate limited responses from amazon * (Apollon77) Lowercase text that sent to textcommand because other cases had issues in the past --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 842e34c7..88bce05f 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.8.3 (2022-10-27) * (Apollon77) Fix retry issues for rate limited responses from amazon * (Apollon77) Lowercase text that sent to textcommand because other cases had issues in the past diff --git a/package-lock.json b/package-lock.json index d04f49b0..21ef092b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.8.2", + "version": "5.8.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.8.2", + "version": "5.8.3", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index a21bce21..ef7e1f6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.8.2", + "version": "5.8.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 424f74f43990641070a3ba9f8f5abfd88052f612 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 30 Oct 2022 17:04:22 +0100 Subject: [PATCH 270/356] * (Apollon77) Add new methods for enable/disable of alarms and use in changeNotification if Alarm or MusicAlarm --- README.md | 4 ++++ alexa-remote.js | 26 +++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88bce05f..2ef05c59 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Add new methods for enable/disable of alarms and use in changeNotification if Alarm or MusicAlarm + ### 5.8.3 (2022-10-27) * (Apollon77) Fix retry issues for rate limited responses from amazon * (Apollon77) Lowercase text that sent to textcommand because other cases had issues in the past diff --git a/alexa-remote.js b/alexa-remote.js index 13a13b3b..7871c1e4 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1559,7 +1559,7 @@ class AlexaRemote extends EventEmitter { notification.originalTime = `${_00(date.getHours())}:${_00(date.getMinutes())}:${_00(date.getSeconds())}.000`; } - if ((value === null || dateOrTimeAdjusted) && (notification.type === 'Alarm' || notification.type === 'MusicAlarm')) { + if ((typeof value === 'boolean' || value === null || dateOrTimeAdjusted) && (notification.type === 'Alarm' || notification.type === 'MusicAlarm')) { const newPutNotification = { trigger: { scheduledTime: `${notification.originalDate}T${notification.originalTime.substring(0, notification.originalTime.length - 4)}` @@ -1604,6 +1604,14 @@ class AlexaRemote extends EventEmitter { const finalNotification = this.parseValue4Notification(notification, value); if (finalNotification.trigger && finalNotification.assets && finalNotification.extensions) { + if (typeof value === 'boolean') { // Switch on/off + if (value) { + return this.activateNotificationV2(notification.notificationIndex, finalNotification, callback); + } else { + return this.deactivateNotificationV2(notification.notificationIndex, callback); + } + } + return this.setNotificationV2(notification.notificationIndex, finalNotification, callback); } @@ -1645,6 +1653,22 @@ class AlexaRemote extends EventEmitter { this.httpsGetAuthApi (`/v1/alerts/alarms/${notificationIndex}`, callback, flags); } + activateNotificationV2(notificationIndex, notification, callback) { + const flags = { + method: 'PUT', + data: JSON.stringify(notification) + }; + this.httpsGetAuthApi (`/v1/alerts/alarms/${notificationIndex}/activate`, callback, flags); + } + + deactivateNotificationV2(notificationIndex, callback) { + const flags = { + method: 'PUT', + data: '' + }; + this.httpsGetAuthApi (`/v1/alerts/alarms/${notificationIndex}/cancel`, callback, flags); + } + deleteNotification(notification, callback) { const flags = { data: JSON.stringify (notification), From ceea61b88dae24e6d9b03f4922cc1e255736b18e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 30 Oct 2022 17:06:21 +0100 Subject: [PATCH 271/356] chore: release v5.9.0 * (Apollon77) Add new methods for enable/disable of alarms and use in changeNotification if Alarm or MusicAlarm --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2ef05c59..959f3eb1 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.9.0 (2022-10-30) * (Apollon77) Add new methods for enable/disable of alarms and use in changeNotification if Alarm or MusicAlarm ### 5.8.3 (2022-10-27) diff --git a/package-lock.json b/package-lock.json index 21ef092b..11e7e54a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.8.3", + "version": "5.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.8.3", + "version": "5.9.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index ef7e1f6b..dbbaf4bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.8.3", + "version": "5.9.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From b85654d713292046eb9f9207142add0bc1287c0e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 30 Oct 2022 19:06:47 +0100 Subject: [PATCH 272/356] * (Apollon77) Adjust deleteConversation to the new API (additional parameter is required!) --- README.md | 4 ++++ alexa-remote.js | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 959f3eb1..f035f712 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Adjust deleteConversation to the new API (additional parameter is required!) + ### 5.9.0 (2022-10-30) * (Apollon77) Add new methods for enable/disable of alarms and use in changeNotification if Alarm or MusicAlarm diff --git a/alexa-remote.js b/alexa-remote.js index 7871c1e4..42da8b18 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2832,11 +2832,14 @@ class AlexaRemote extends EventEmitter { ); } - deleteConversation(conversationId, callback) { + deleteConversation(conversationId, lastMessageId, callback) { + if (lastMessageId === undefined) { + lastMessageId = 1; + } const flags = { method: 'DELETE' }; - this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}`, callback, flags); + this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}?lastMessageId=${lastMessageId}`, callback, flags); } setReminder(serialOrName, timestamp, label, callback) { From 4de2bccbd20385d3bc421f14c3de71e7df0ebf9b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 30 Oct 2022 19:06:56 +0100 Subject: [PATCH 273/356] chore: release v5.10.0 * (Apollon77) Adjust deleteConversation to the new API (additional parameter is required!) --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f035f712..55f761d6 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 5.10.0 (2022-10-30) * (Apollon77) Adjust deleteConversation to the new API (additional parameter is required!) ### 5.9.0 (2022-10-30) diff --git a/package-lock.json b/package-lock.json index 11e7e54a..3897d3db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.9.0", + "version": "5.10.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.9.0", + "version": "5.10.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index dbbaf4bd..3796d85d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.9.0", + "version": "5.10.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 43858351d25180bfb78732449e7dbc054175764e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 04:27:40 +0000 Subject: [PATCH 274/356] chore(deps): bump actions/setup-node from 3.4.1 to 3.5.1 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.4.1 to 3.5.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.4.1...v3.5.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 1dd320ce..145fc758 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.4.1 + uses: actions/setup-node@v3.5.1 with: node-version: ${{ matrix.node-version }} @@ -64,7 +64,7 @@ jobs: uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.4.1 + uses: actions/setup-node@v3.5.1 with: node-version: ${{ matrix.node-version }} From 7d8729bcc47c8b511b2c818a94f361f2827a4cae Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 30 Nov 2022 14:57:55 +0100 Subject: [PATCH 275/356] update deps --- package-lock.json | 550 +++++++++++++++++++++++++++++++++++++--------- package.json | 6 +- 2 files changed, 446 insertions(+), 110 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3897d3db..a5ebc94b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,13 @@ "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "uuid": "^8.3.2", - "ws": "^8.8.1" + "uuid": "^9.0.0", + "ws": "^8.11.0" }, "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.20.0" + "eslint": "^8.28.0" }, "engines": { "node": ">=12.0.0" @@ -172,14 +172,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -189,6 +189,9 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/debug": { @@ -215,23 +218,23 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -251,12 +254,60 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@types/http-proxy": { "version": "1.17.9", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", @@ -283,9 +334,9 @@ } }, "node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -779,13 +830,15 @@ } }, "node_modules/eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", + "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -795,18 +848,21 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", "globals": "^13.15.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -817,8 +873,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -903,17 +958,20 @@ "dev": true }, "node_modules/espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, "dependencies": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { @@ -1077,6 +1135,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1117,6 +1184,22 @@ "node": ">= 0.8" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -1210,12 +1293,6 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1283,9 +1360,9 @@ } }, "node_modules/globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", + "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1315,6 +1392,12 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1432,9 +1515,9 @@ } }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", + "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", "dev": true, "engines": { "node": ">= 4" @@ -1524,6 +1607,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", @@ -1558,6 +1650,16 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "node_modules/js-sdsl": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.2.0.tgz", + "integrity": "sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1607,6 +1709,21 @@ "node": ">= 0.8.0" } }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -1806,6 +1923,36 @@ "node": ">= 0.8.0" } }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -1826,6 +1973,15 @@ "node": ">= 0.8" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1924,6 +2080,26 @@ "node": ">=0.4.x" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -1995,6 +2171,16 @@ "node": ">=4" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -2010,6 +2196,29 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -2332,19 +2541,13 @@ } }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", "bin": { "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -2401,9 +2604,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "engines": { "node": ">=10.0.0" }, @@ -2461,6 +2664,18 @@ "engines": { "node": ">=12" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { @@ -2586,14 +2801,14 @@ } }, "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -2620,20 +2835,20 @@ } }, "@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "dependencies": { "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -2647,12 +2862,44 @@ } } }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@types/http-proxy": { "version": "1.17.9", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", @@ -2676,9 +2923,9 @@ } }, "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true }, "acorn-jsx": { @@ -3050,13 +3297,15 @@ "dev": true }, "eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", + "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -3066,18 +3315,21 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", "globals": "^13.15.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -3088,8 +3340,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { "debug": { @@ -3143,12 +3394,12 @@ "dev": true }, "espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, "requires": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } @@ -3278,6 +3529,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -3309,6 +3569,16 @@ "unpipe": "~1.0.0" } }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -3373,12 +3643,6 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3425,9 +3689,9 @@ } }, "globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", + "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3451,6 +3715,12 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3533,9 +3803,9 @@ } }, "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", + "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", "dev": true }, "import-fresh": { @@ -3598,6 +3868,12 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-obj": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", @@ -3620,6 +3896,12 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "js-sdsl": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.2.0.tgz", + "integrity": "sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==", + "dev": true + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3661,6 +3943,15 @@ "type-check": "~0.4.0" } }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3809,6 +4100,24 @@ "word-wrap": "^1.2.3" } }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3823,6 +4132,12 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -3890,6 +4205,12 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==" }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -3943,6 +4264,12 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -3952,6 +4279,15 @@ "glob": "^7.1.3" } }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4204,15 +4540,9 @@ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" }, "vary": { "version": "1.1.2", @@ -4252,9 +4582,9 @@ "dev": true }, "ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "requires": {} }, "y18n": { @@ -4289,6 +4619,12 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 3796d85d..7acceaeb 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,14 @@ "alexa-cookie2": "^4.1.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.8.1", + "ws": "^8.11.0", "extend": "^3.0.2", - "uuid": "^8.3.2" + "uuid": "^9.0.0" }, "devDependencies": { "@alcalzone/release-script": "^3.5.9", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.20.0" + "eslint": "^8.28.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From f3c7b0f76c8812f2ac789cea3e36fb25b732b52e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 30 Nov 2022 14:58:34 +0100 Subject: [PATCH 276/356] * (Apollon77) Do not overwrite Device details by potentially duplicate App Device details --- README.md | 4 ++++ alexa-remote.js | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 55f761d6..8b09d08b 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Do not overwrite Device details by potentially duplicate App Device details + ### 5.10.0 (2022-10-30) * (Apollon77) Adjust deleteConversation to the new API (additional parameter is required!) diff --git a/alexa-remote.js b/alexa-remote.js index 42da8b18..34ae21c0 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -297,26 +297,29 @@ class AlexaRemote extends EventEmitter { } }); + const processedSerialNumbers = []; joinedDevices.forEach((device) => { const existingDevice = this.find(device.serialNumber); if (!existingDevice) { this.serialNumbers[device.serialNumber] = device; } else { + if (device.parentDeviceSerialNumber && processedSerialNumbers.includes(device.serialNumber)) return; device = extend(true, existingDevice, device); } + processedSerialNumbers.push(device.serialNumber); if (devicePreferences[device.serialNumber]) { device.preferences = devicePreferences[device.serialNumber]; } let name = device.accountName; - this.names [name] = device; - this.names [name.toLowerCase()] = device; + this.names[name] = device; + this.names[name.toLowerCase()] = device; if (device.deviceTypeFriendlyName) { name += ` (${device.deviceTypeFriendlyName})`; - this.names [name] = device; - this.names [name.toLowerCase()] = device; + this.names[name] = device; + this.names[name.toLowerCase()] = device; } //device._orig = JSON.parse(JSON.stringify(device)); device._name = name; From 7e5dfe47f1db399d1641a44b67f0effac7a7d877 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 30 Nov 2022 14:59:29 +0100 Subject: [PATCH 277/356] chore: release v5.10.1 * (Apollon77) Do not overwrite Device details by potentially duplicate App Device details --- README.md | 5 ++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8b09d08b..9ae344de 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,8 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ -* (Apollon77) Do not overwrite Device details by potentially duplicate App Device details +### 5.10.1 (2022-11-30) +* (Apollon77) Do not overwrite Device details by potentially duplicate App Device details ### 5.10.0 (2022-10-30) * (Apollon77) Adjust deleteConversation to the new API (additional parameter is required!) diff --git a/package-lock.json b/package-lock.json index a5ebc94b..37acd784 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.10.0", + "version": "5.10.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.10.0", + "version": "5.10.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index 7acceaeb..aa1fd789 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.10.0", + "version": "5.10.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 3a334078d397682a7db91abc31d0a16ffeeba7e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 03:00:41 +0000 Subject: [PATCH 278/356] chore(deps): bump actions/setup-node from 3.5.1 to 3.6.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.1 to 3.6.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.5.1...v3.6.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 145fc758..ac90a8ac 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.5.1 + uses: actions/setup-node@v3.6.0 with: node-version: ${{ matrix.node-version }} @@ -64,7 +64,7 @@ jobs: uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.5.1 + uses: actions/setup-node@v3.6.0 with: node-version: ${{ matrix.node-version }} From f25712f01818e5a729cf7c999c7a14610e652f45 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 14:42:49 +0200 Subject: [PATCH 279/356] Update deps --- package-lock.json | 512 ++++++++++++++++++++++------------------------ package.json | 6 +- 2 files changed, 248 insertions(+), 270 deletions(-) diff --git a/package-lock.json b/package-lock.json index 37acd784..bfb076bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,17 +14,26 @@ "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^9.0.0", - "ws": "^8.11.0" + "ws": "^8.13.0" }, "devDependencies": { - "@alcalzone/release-script": "^3.5.9", + "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.28.0" + "eslint": "^8.46.0" }, "engines": { "node": ">=12.0.0" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@alcalzone/pak": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.1.tgz", @@ -46,23 +55,23 @@ } }, "node_modules/@alcalzone/release-script": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.9.tgz", - "integrity": "sha512-2qBUyh+wd/7KToZGXrJDp8v1nos1jm+xsDiSvI2jv5Co+105N415DCJNtgOvR6s2+/G2lbIZ08oYopl+evHgkw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.6.0.tgz", + "integrity": "sha512-i4Z6QAt5YGm6iM9EYHFCu8MbQ3wwhD2tNp14NxEe6dQnv86BNvikhxfgU4pOkJXW0El/7WgOkFeC9E4fFDBXug==", "dev": true, "dependencies": { "@alcalzone/release-script-core": "3.5.9", "@alcalzone/release-script-plugin-changelog": "3.5.9", "@alcalzone/release-script-plugin-exec": "3.5.9", - "@alcalzone/release-script-plugin-git": "3.5.9", - "@alcalzone/release-script-plugin-package": "3.5.9", - "@alcalzone/release-script-plugin-version": "3.5.9", + "@alcalzone/release-script-plugin-git": "3.6.0", + "@alcalzone/release-script-plugin-package": "3.6.0", + "@alcalzone/release-script-plugin-version": "3.6.0", "alcalzone-shared": "^4.0.1", "axios": "^0.27.1", "enquirer": "^2.3.6", "fs-extra": "^10.1.0", "picocolors": "1.0.0", - "semver": "^7.3.7", + "semver": "^7.5.2", "source-map-support": "^0.5.21", "yargs": "^17.4.1" }, @@ -113,9 +122,9 @@ } }, "node_modules/@alcalzone/release-script-plugin-git": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.9.tgz", - "integrity": "sha512-LT8YSevyLqZFI4rx4ET1qRnqTNnU5rVmQvGFCnC+d375zU5/U2cu19s/WVLChMHkvmUbAwBld+xhqqos2hQrKw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.6.0.tgz", + "integrity": "sha512-dtGh+GWj6a9w4s/GupRxe28EnluvtXvmM60IbEI6diqXDilclE1baZsBsoLyIgA2mPxt+BJpHEe3bk/ysanbug==", "dev": true, "dependencies": { "@alcalzone/release-script-core": "3.5.9", @@ -140,47 +149,71 @@ } }, "node_modules/@alcalzone/release-script-plugin-package": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.9.tgz", - "integrity": "sha512-jYmWzm9Dvnnc6RWTrZApQbeXzaFYSrHqkEHViAtx5NvBztfH3ANwVl6jS4UEaMm2NbIIq6toWGznVvNtnVzEjg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.6.0.tgz", + "integrity": "sha512-eISimXzdlRPMjuUoErwI78BbUO2ijU8ac9lEqzM+piYuuCbYmgr7QTH+r2omPQZiXxmRqUqiZ2/+3XSarAIUlg==", "dev": true, "dependencies": { "@alcalzone/pak": "^0.8.1", "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", - "semver": "^7.3.7" + "semver": "^7.5.2" }, "engines": { "node": ">=12.20" } }, "node_modules/@alcalzone/release-script-plugin-version": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.9.tgz", - "integrity": "sha512-CYN49aXx4QSFRWQN11wCC13SK1ZygILlohYlUFkRiA0g6u2G7z1rjW8QZSLXrR6C6gxzR4zL12VJ/xFZqYeuZA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.6.0.tgz", + "integrity": "sha512-8bVigIbo4oTaA1bl8EpRN6QI2S2mR+G+zFEVj+3dlP5RtgB2JSNUtb91aEnijgaqrvDmy1WwuQP4Z9L7jmL0Pg==", "dev": true, "dependencies": { "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", - "semver": "^7.3.7", + "semver": "^7.5.2", "tiny-glob": "^0.2.9" }, "engines": { "node": ">=12.20" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", + "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -217,10 +250,19 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/@eslint/js": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", + "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -334,9 +376,9 @@ } }, "node_modules/acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -830,49 +872,47 @@ } }, "node_modules/eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", + "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.1", + "@eslint/js": "^8.46.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.2", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", - "grapheme-splitter": "^1.0.4", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -886,9 +926,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -896,42 +936,21 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", + "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/debug": { @@ -958,14 +977,14 @@ "dev": true }, "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -975,9 +994,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -1132,7 +1151,7 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "node_modules/fastq": { @@ -1360,9 +1379,9 @@ } }, "node_modules/globals": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", - "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1392,10 +1411,10 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "node_modules/has": { @@ -1515,9 +1534,9 @@ } }, "node_modules/ignore": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", - "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" @@ -1650,16 +1669,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "node_modules/js-sdsl": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.2.0.tgz", - "integrity": "sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1907,17 +1916,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -2049,9 +2058,9 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, "engines": { "node": ">=6" @@ -2136,18 +2145,6 @@ "util-deprecate": "~1.0.1" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2230,9 +2227,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -2571,15 +2568,6 @@ "node": ">= 8" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -2604,15 +2592,15 @@ "dev": true }, "node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -2679,6 +2667,12 @@ } }, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true + }, "@alcalzone/pak": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.1.tgz", @@ -2702,23 +2696,23 @@ } }, "@alcalzone/release-script": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.5.9.tgz", - "integrity": "sha512-2qBUyh+wd/7KToZGXrJDp8v1nos1jm+xsDiSvI2jv5Co+105N415DCJNtgOvR6s2+/G2lbIZ08oYopl+evHgkw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.6.0.tgz", + "integrity": "sha512-i4Z6QAt5YGm6iM9EYHFCu8MbQ3wwhD2tNp14NxEe6dQnv86BNvikhxfgU4pOkJXW0El/7WgOkFeC9E4fFDBXug==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.5.9", "@alcalzone/release-script-plugin-changelog": "3.5.9", "@alcalzone/release-script-plugin-exec": "3.5.9", - "@alcalzone/release-script-plugin-git": "3.5.9", - "@alcalzone/release-script-plugin-package": "3.5.9", - "@alcalzone/release-script-plugin-version": "3.5.9", + "@alcalzone/release-script-plugin-git": "3.6.0", + "@alcalzone/release-script-plugin-package": "3.6.0", + "@alcalzone/release-script-plugin-version": "3.6.0", "alcalzone-shared": "^4.0.1", "axios": "^0.27.1", "enquirer": "^2.3.6", "fs-extra": "^10.1.0", "picocolors": "1.0.0", - "semver": "^7.3.7", + "semver": "^7.5.2", "source-map-support": "^0.5.21", "yargs": "^17.4.1" } @@ -2754,9 +2748,9 @@ } }, "@alcalzone/release-script-plugin-git": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.5.9.tgz", - "integrity": "sha512-LT8YSevyLqZFI4rx4ET1qRnqTNnU5rVmQvGFCnC+d375zU5/U2cu19s/WVLChMHkvmUbAwBld+xhqqos2hQrKw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.6.0.tgz", + "integrity": "sha512-dtGh+GWj6a9w4s/GupRxe28EnluvtXvmM60IbEI6diqXDilclE1baZsBsoLyIgA2mPxt+BJpHEe3bk/ysanbug==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.5.9", @@ -2775,41 +2769,56 @@ } }, "@alcalzone/release-script-plugin-package": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.5.9.tgz", - "integrity": "sha512-jYmWzm9Dvnnc6RWTrZApQbeXzaFYSrHqkEHViAtx5NvBztfH3ANwVl6jS4UEaMm2NbIIq6toWGznVvNtnVzEjg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.6.0.tgz", + "integrity": "sha512-eISimXzdlRPMjuUoErwI78BbUO2ijU8ac9lEqzM+piYuuCbYmgr7QTH+r2omPQZiXxmRqUqiZ2/+3XSarAIUlg==", "dev": true, "requires": { "@alcalzone/pak": "^0.8.1", "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", - "semver": "^7.3.7" + "semver": "^7.5.2" } }, "@alcalzone/release-script-plugin-version": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.5.9.tgz", - "integrity": "sha512-CYN49aXx4QSFRWQN11wCC13SK1ZygILlohYlUFkRiA0g6u2G7z1rjW8QZSLXrR6C6gxzR4zL12VJ/xFZqYeuZA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.6.0.tgz", + "integrity": "sha512-8bVigIbo4oTaA1bl8EpRN6QI2S2mR+G+zFEVj+3dlP5RtgB2JSNUtb91aEnijgaqrvDmy1WwuQP4Z9L7jmL0Pg==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.5.9", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", - "semver": "^7.3.7", + "semver": "^7.5.2", "tiny-glob": "^0.2.9" } }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true + }, "@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", + "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -2834,10 +2843,16 @@ } } }, + "@eslint/js": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", + "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "dev": true + }, "@humanwhocodes/config-array": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -2923,9 +2938,9 @@ } }, "acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true }, "acorn-jsx": { @@ -3297,49 +3312,47 @@ "dev": true }, "eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", + "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.1", + "@eslint/js": "^8.46.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.2", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", - "grapheme-splitter": "^1.0.4", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "dependencies": { @@ -3361,53 +3374,36 @@ } }, "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", + "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", "dev": true }, "espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "requires": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" } }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -3526,7 +3522,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "fastq": { @@ -3689,9 +3685,9 @@ } }, "globals": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", - "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3715,10 +3711,10 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "has": { @@ -3803,9 +3799,9 @@ } }, "ignore": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", - "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "import-fresh": { @@ -3896,12 +3892,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "js-sdsl": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.2.0.tgz", - "integrity": "sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==", - "dev": true - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -4087,17 +4077,17 @@ } }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" } }, "p-limit": { @@ -4187,9 +4177,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, "qs": { @@ -4241,12 +4231,6 @@ "util-deprecate": "~1.0.1" } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4299,9 +4283,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -4558,12 +4542,6 @@ "isexe": "^2.0.0" } }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -4582,9 +4560,9 @@ "dev": true }, "ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index aa1fd789..04477442 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,14 @@ "alexa-cookie2": "^4.1.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.11.0", + "ws": "^8.13.0", "extend": "^3.0.2", "uuid": "^9.0.0" }, "devDependencies": { - "@alcalzone/release-script": "^3.5.9", + "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.28.0" + "eslint": "^8.46.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From d3296884e3f3600d4ea3bb5d671cabaae2ddab99 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 14:47:37 +0200 Subject: [PATCH 280/356] * (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) --- README.md | 3 +++ alexa-wsmqtt.js | 10 ++++++++++ example/example.js | 1 + 3 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 9ae344de..b964cb00 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,9 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) + ### 5.10.1 (2022-11-30) * (Apollon77) Do not overwrite Device details by potentially duplicate App Device details diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index 71d9dc35..e946bcd5 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -167,6 +167,16 @@ class AlexaWsMqtt extends EventEmitter { connect() { let url; try { + if (this._options.usePushConnectType !== undefined) { + this._options.logger && this._options.logger(`Alexa-Remote WS-MQTT: Try to initialize push connection with type ${this._options.usePushConnectType}`); + if (this._options.usePushConnectType === 1) { + url = this.connectType1(); + } else if (this._options.usePushConnectType === 2) { + url = this.connectType2(); + } else { + throw new Error(`Invalid push connect type ${this._options.usePushConnectType} specified`); + } + } if (!this.macDms || !this.macDms.adp_token || !this.macDms.device_private_key) { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Try to initialize old style push connection because macDms data missing'); url = this.connectType1(); diff --git a/example/example.js b/example/example.js index 81e52f8b..971a1206 100644 --- a/example/example.js +++ b/example/example.js @@ -37,6 +37,7 @@ alexa.init({ formerDataStorePath: '...', // optional: overwrite path where some of the formerRegistrationData are persisted to optimize against Amazon security measures formerRegistrationData: { ... }, // optional/preferred: provide the result object from subsequent proxy usages (cookieData) here and some generated data will be reused for next proxy call too macDms: { ... }, // required since version 4.0 to use Push connection! Is returned in cookieData.macDms + usePushConnectType: 1, // define which push connect type is used to initialize the push connection (type 1 is older but might work better than type 2) }, function (err) { if (err) { From d8bb2576b316aa74f3883c5f1dce5e6dd6b0a670 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 14:54:10 +0200 Subject: [PATCH 281/356] License --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index eb9d6599..59ba3bef 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018-2022 Apollon77 +Copyright (c) 2018-2023 Apollon77 Copyright (c) 2015-2017 soef Permission is hereby granted, free of charge, to any person obtaining a copy From 6125f519726299b97ea356a3e062b4ec931c23cf Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 14:54:19 +0200 Subject: [PATCH 282/356] chore: release v5.10.2 * (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b964cb00..adc720ae 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 5.10.2 (2023-08-08) * (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) ### 5.10.1 (2022-11-30) diff --git a/package-lock.json b/package-lock.json index bfb076bd..cfb08a98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.10.1", + "version": "5.10.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.10.1", + "version": "5.10.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index 04477442..57b35dc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.10.1", + "version": "5.10.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 5e94aa5808a3f8eb89d7907c004a508d33c4df9a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 16:55:23 +0200 Subject: [PATCH 283/356] readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index adc720ae..29dd519f 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ If the Push connection is never established then you can try to use the followin Then it should work again ## Known issues/Todos +* If you still use the SMS based 2FA flow then this might now work. Please update the 2fa method in the amazon settings to the current process. * getNotification works, changeNotification not ... maybe change is DELETE +Create :-) (+ source for createNotification: https://github.com/noelportugal/alexa-reminders/blob/master/alexa-reminders.js#L75, and Delete/create: https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/Connection.java#L829) * docu docu docu (sorry ... will come) From d4ba8c4cbb012777c82979184d16aac4398edee0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 22:04:41 +0200 Subject: [PATCH 284/356] fix for the fix --- README.md | 2 +- alexa-wsmqtt.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 29dd519f..a6899caa 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: -### 5.10.2 (2023-08-08) +### __WORK IN PROGRESS__ * (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) ### 5.10.1 (2022-11-30) diff --git a/alexa-wsmqtt.js b/alexa-wsmqtt.js index e946bcd5..b2cbdfd1 100755 --- a/alexa-wsmqtt.js +++ b/alexa-wsmqtt.js @@ -177,7 +177,7 @@ class AlexaWsMqtt extends EventEmitter { throw new Error(`Invalid push connect type ${this._options.usePushConnectType} specified`); } } - if (!this.macDms || !this.macDms.adp_token || !this.macDms.device_private_key) { + else if (!this.macDms || !this.macDms.adp_token || !this.macDms.device_private_key) { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Try to initialize old style push connection because macDms data missing'); url = this.connectType1(); } else { From ff60f19a43986e3a9d5be2ffa3307697e76d5692 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 22:05:00 +0200 Subject: [PATCH 285/356] chore: release v5.10.3 * (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a6899caa..e27ef73b 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 5.10.3 (2023-08-08) * (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) ### 5.10.1 (2022-11-30) diff --git a/package-lock.json b/package-lock.json index cfb08a98..4fe053bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.10.2", + "version": "5.10.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.10.2", + "version": "5.10.3", "license": "MIT", "dependencies": { "alexa-cookie2": "^4.1.3", diff --git a/package.json b/package.json index 57b35dc4..81a6186d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.10.2", + "version": "5.10.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 0d4a159ce5618a85a63ed3c37695f8d09d22d906 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 8 Aug 2023 22:06:27 +0200 Subject: [PATCH 286/356] release updates --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index ac90a8ac..dc79abe2 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: strategy: matrix: - node-version: [12.x] + node-version: [16.x] steps: - uses: actions/checkout@v3 @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x] + node-version: [16.x] steps: - name: Checkout code From 4e6a68eeb7cee43db7b4444f83c4d96606c45ed8 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 09:08:25 +0200 Subject: [PATCH 287/356] gha updates --- .github/dependabot.yml | 4 +-- .github/workflows/test-and-release.yml | 37 ++++++++++++++------------ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c20ed4ad..b85ff297 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,5 +12,5 @@ updates: interval: monthly time: "04:00" timezone: Europe/Berlin - open-pull-requests-limit: 20 - versioning-strategy: increase \ No newline at end of file + open-pull-requests-limit: 5 + versioning-strategy: increase diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index dc79abe2..bfa614a9 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -35,15 +35,15 @@ jobs: steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.6.0 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Install Dependencies run: npm ci -# - name: Run local tests -# run: npm test + # - name: Run local tests + # run: npm test # Deploys the final package to NPM deploy: @@ -64,42 +64,45 @@ jobs: uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3.6.0 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Extract the version and commit body from the tag + shell: bash id: extract_release - # The body may be multiline, therefore we need to escape some characters + # The body may be multiline, therefore newlines and % need to be escaped run: | VERSION="${{ github.ref }}" - VERSION=${VERSION##*/} - VERSION=${VERSION##*v} - echo "::set-output name=VERSION::$VERSION" + VERSION=${VERSION##*/v} + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + EOF=$(od -An -N6 -x /dev/urandom | tr -d ' ') BODY=$(git show -s --format=%b) - BODY="${BODY//'%'/'%25'}" - BODY="${BODY//$'\n'/'%0A'}" - BODY="${BODY//$'\r'/'%0D'}" - echo "::set-output name=BODY::$BODY" + echo "BODY<<$EOF" >> $GITHUB_OUTPUT + echo "$BODY" >> $GITHUB_OUTPUT + echo "$EOF" >> $GITHUB_OUTPUT + if [[ $VERSION == *"-"* ]] ; then + echo "TAG=--tag next" >> $GITHUB_OUTPUT + fi - name: Install Dependencies run: npm ci -# - name: Create a clean build -# run: npm run build + # - name: Create a clean build + # run: npm run build - name: Publish package to npm run: | npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} npm whoami - npm publish + npm publish ${{ steps.extract_release.outputs.TAG }} - name: Create Github Release - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: Release v${{ steps.extract_release.outputs.VERSION }} + name: Release v${{ steps.extract_release.outputs.VERSION }} draft: false # Prerelease versions create prereleases on Github prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} From 7e79be163dfbbae9e5a15696d988ac9003cb3f5e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 09:08:50 +0200 Subject: [PATCH 288/356] Add new HTTP2/Push handling --- alexa-http2push.js | 239 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100755 alexa-http2push.js diff --git a/alexa-http2push.js b/alexa-http2push.js new file mode 100755 index 00000000..2031ca57 --- /dev/null +++ b/alexa-http2push.js @@ -0,0 +1,239 @@ +const http2 = require('http2'); +const EventEmitter = require('events'); + +class AlexaHttp2Push extends EventEmitter { + + constructor(options, access_token, update_access_token) { + super(); + + this._options = options; + this.stop = false; + this.client = null; + this.stream = null; + this.pingPongInterval = null; + this.errorRetryCounter = 0; + this.reconnectTimeout = null; + this.pongTimeout = null; + this.initTimeout = null; + this.connectionActive = false; + this.access_token = access_token; + this.update_access_token = update_access_token; + } + + isConnected() { + return this.connectionActive; + } + + connect() { + const http2_options = { + ':method': 'GET', + ':path': '/v20160207/directives', + ':authority': 'bob-dispatch-prod-eu.amazon.com', + ':scheme': 'https', + 'authorization': `Bearer ${this.access_token}`, + 'accept-encoding': 'gzip', + 'user-agent': 'okhttp/4.3.2-SNAPSHOT', + }; + + const onHttp2Close = (code, reason) => { + if (reason) { + reason = reason.toString(); + } + try { + this.client && this.client.close(); + } catch (err) { + // ignore + } + this.client = null; + this.stream = null; + this.connectionActive = false; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Close: ' + code + ': ' + reason); + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; + } + if (this.pingPongInterval) { + clearInterval(this.pingPongInterval); + this.pingPongInterval = null; + } + if (this.pongTimeout) { + clearTimeout(this.pongTimeout); + this.pongTimeout = null; + } + if (this.stop) return; + if (this.errorRetryCounter > 100) { + this.emit('disconnect', false, 'Too many failed retries. Check cookie and data'); + return; + } else { + this.errorRetryCounter++; + } + + const retryDelay = Math.min(60, (this.errorRetryCounter * 5) + 5); + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Retry Connection in ' + retryDelay + 's'); + this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); + this.reconnectTimeout && clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = setTimeout(() => { + this.reconnectTimeout = null; + this.connect(); + }, retryDelay * 1000); + }; + + const onPingResponse = () => { + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Initialization completed'); + this.emit('connect'); + } + if (this.pongTimeout) { + clearTimeout(this.pongTimeout); + this.pongTimeout = null; + } + this.connectionActive = true; + }; + + try { + this.client = http2.connect(`https://${http2_options[':authority']}`, () => { + this.stream = this.client.request(http2_options); + + this.stream.on('response', async (headers) => { + if (headers[':status'] === 403) { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error 403 .... refresh token'); + this.update_access_token(token => { + if (token) { + this.access_token = token; + } + onHttp2Close(headers[':status']); + }); + } + else if (headers[':status'] !== 200) { + onHttp2Close(headers[':status']); + } + }); + + this.stream.on('data', (chunk) => { + if (this.stop) { + this.stream && this.stream.end(); + this.client && this.client.close(); + return; + } + chunk = chunk.toString(); + if (chunk.startsWith('------')) { + this.client.ping(onPingResponse); + + this.pingPongInterval = setInterval(() => { + if (!this.stream || !this.client) return; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Send Ping'); + //console.log('SEND: ' + msg.toString('hex')); + this.client.ping(onPingResponse); + + this.pongTimeout = setTimeout(() => { + this.pongTimeout = null; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: No Pong received after 30s'); + this.stream && this.stream.end(); + this.client && this.client.close(); + this.connectionActive = false; + }, 30000); + }, 180000); + + return; + } + if (chunk.startsWith('Content-Type: application/json')) { + const json_start = chunk.indexOf('{'); + const json_end = chunk.lastIndexOf('}'); + if (json_start === -1 || json_end === -1) { + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find json in chunk: ${chunk}`); + return; + } + const message = chunk.substring(json_start, json_end + 1); + try { + const data = JSON.parse(message); + if (!data || !data.directive || !data.directive.payload || !Array.isArray(data.directive.payload.renderingUpdates)) { + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find renderingUpdates in json: ${message}`); + return; + } + data.directive.payload.renderingUpdates.forEach(update => { + if (!update || !update.resourceMetadata) { + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find resourceMetadata in renderingUpdates: ${message}`); + } + const dataContent = JSON.parse(update.resourceMetadata); + + const command = dataContent.command; + const payload = JSON.parse(dataContent.payload); + + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Command ' + command + ': ' + JSON.stringify(payload, null, 4)); + this.emit('command', command, payload); + }); + } catch (err) { + this.emit('unexpected-response', `Could not parse json: ${message} : ${err.message}`); + } + } + }); + + this.stream.on('close', onHttp2Close); + + this.stream.on('error', (error) => { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Stream-Error: ' + error); + this.emit('error', error); + this.stream && this.stream.end(); + this.client && this.client.close(); + }); + }); + + this.client.on('close', onHttp2Close); + + this.client.on('error', (error) => { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Client-Error: ' + error); + this.emit('error', error); + this.stream && this.stream.end(); + this.client && this.client.close(); + }); + } + catch (err) { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Init ' + err.message); + this._options.logger && this._options.logger(err.stack); + this.emit('error', err); + return; + } + this.initTimeout && clearTimeout(this.initTimeout); + + this.initTimeout = setTimeout(() => { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Initialization not done within 30s'); + try { + this.stream && this.stream.end(); + this.client && this.client.close(); + } catch (err) { + //just make sure + } + if (this.stream || !this.reconnectTimeout) { // seems no close was emitted so far?! + onHttp2Close(); + } + }, 30000); + } + + disconnect() { + if (this.reconnectTimeout) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + } + if (this.pollingTimeout) { + clearTimeout(this.pollingTimeout); + this.pollingTimeout = null; + } + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; + } + this.stop = true; + if (!this.client && !this.stream) return; + try { + this.stream && this.stream.end(); + this.client && this.client.close(); + } catch (e) { + this.connectionActive && this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Disconnect error: ' + e.message); + } + } +} + + +module.exports = AlexaHttp2Push; From 63606a184514509be5c049f21f2120182ebf7125 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 09:09:05 +0200 Subject: [PATCH 289/356] integrate push handling --- alexa-remote.d.ts | 11 ++++- alexa-remote.js | 103 +++++++++++++++++++++++++++++++++------------- 2 files changed, 84 insertions(+), 30 deletions(-) diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index cb7728b8..dc6414b9 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -17,7 +17,9 @@ declare module "alexa-remote2" { deviceAppName: string; acceptLanguage: string; amazonPage: string; + /** @deprecated */ useWsMqtt: boolean; + usePushConnection: boolean; cookieRefreshInterval: number; macDms: { device_private_key: string; @@ -38,6 +40,7 @@ declare module "alexa-remote2" { "amazonPage": string; "csrf": string; "deviceAppName": string; + dataVersion: number | undefined; } }>; @@ -298,7 +301,13 @@ declare module "alexa-remote2" { initBluetoothState(callback: CallbackWithError): void; + /** @deprecated */ initWsMqttConnection(): void; + initPushConnection(): void; + + /** @deprecated */ + isWsMqttConnected(): boolean; + isPushConnected(): boolean; getPushedActivities(): void; @@ -699,8 +708,6 @@ declare module "alexa-remote2" { getAuthenticationDetails(): GetAuthenticationDetails; - isWsMqttConnected(): boolean; - stopProxyServer(callback: CallbackWithError): void getWholeHomeAudioGroups(callback: CallbackWithErrorAndBody): void diff --git a/alexa-remote.js b/alexa-remote.js index 34ae21c0..b1814f65 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -2,14 +2,15 @@ const https = require('https'); const querystring = require('querystring'); const os = require('os'); const extend = require('extend'); -const AlexaWsMqtt = require('./alexa-wsmqtt.js'); +//const AlexaWsMqtt = require('./alexa-wsmqtt.js'); +const AlexaHttp2Push = require('./alexa-http2push.js'); const { v1: uuidv1 } = require('uuid'); const zlib = require('zlib'); const fsPath = require('path'); const EventEmitter = require('events'); -const officialUserAgent = 'AppleWebKit PitanguiBridge/2.2.483723.0-[HARDWARE=iPhone10_4][SOFTWARE=15.5][DEVICE=iPhone]'; +const officialUserAgent = 'AppleWebKit PitanguiBridge/2.2.556530.0-[HARDWARE=iPhone14_7][SOFTWARE=16.6][DEVICE=iPhone]'; function _00(val) { let s = val.toString(); @@ -126,7 +127,7 @@ class AlexaRemote extends EventEmitter { self._options.logger && self._options.logger('Alexa-Remote: cookie was provided'); if (self._options.formerRegistrationData) { const tokensValidSince = Date.now() - self._options.formerRegistrationData.tokenDate; - if (tokensValidSince < 24 * 60 * 60 * 1000 && self._options.macDms) { + if (tokensValidSince < 24 * 60 * 60 * 1000 && self._options.macDms && self._options.formerRegistrationData.dataVersion === 2) { return callback(null); } self._options.logger && self._options.logger('Alexa-Remote: former registration data exist, try refresh'); @@ -191,8 +192,8 @@ class AlexaRemote extends EventEmitter { this._options.logger && this._options.logger(`Alexa-Remote: Could not query endpoints: ${err}`); } this.prepare(() => { - if (this._options.useWsMqtt) { - this.initWsMqttConnection(); + if (this._options.useWsMqtt || this._options.usePushConnection) { + this.initPushConnection(); } callback && callback(); }); @@ -402,18 +403,50 @@ class AlexaRemote extends EventEmitter { this.alexaCookie.stopProxyServer(callback); } + /** @deprecated */ isWsMqttConnected() { - return this.alexaWsMqtt && this.alexaWsMqtt.isConnected(); + return this.isPushConnected(); } + isPushConnected() { + return this.alexahttp2Push && this.alexahttp2Push.isConnected(); + } + + /** + * @deprecated + */ initWsMqttConnection() { - if (this.alexaWsMqtt) { - this.alexaWsMqtt.removeAllListeners(); - this.alexaWsMqtt.disconnect(); - this.alexaWsMqtt = null; + return this.initPushConnection(); + } + + initPushConnection() { + if (this.alexahttp2Push) { + this.alexahttp2Push.removeAllListeners(); + this.alexahttp2Push.disconnect(); + this.alexahttp2Push = null; + } + if (!this.authApiBearerToken) { + this.updateApiBearerToken((err) => { + if (err) { + this._options.logger && this._options.logger('Alexa-Remote: Initializing WS-MQTT Push Connection failed because no Access-Token available!'); + } else { + return this.initPushConnection(); + } + }); + return; } - this.alexaWsMqtt = new AlexaWsMqtt(this._options, this.cookie, this.macDms); - if (!this.alexaWsMqtt) return; + this.alexahttp2Push = new AlexaHttp2Push(this._options, this.authApiBearerToken, (callback) => { + this._options.logger && this._options.logger('Alexa-Remote: Update access token ...'); + this.updateApiBearerToken((err) => { + if (err) { + this._options.logger && this._options.logger('Alexa-Remote: Initializing WS-MQTT Push Connection failed because no Access-Token available!'); + callback(null); + } else { + callback(this.authApiBearerToken); + } + }); + }); + if (!this.alexahttp2Push) return; this._options.logger && this._options.logger('Alexa-Remote: Initialize WS-MQTT Push Connection'); @@ -422,19 +455,19 @@ class AlexaRemote extends EventEmitter { this.activityUpdateTimeout = null; this.activityUpdateRunning = false; - this.alexaWsMqtt.on('disconnect', (retries, msg) => { + this.alexahttp2Push.on('disconnect', (retries, msg) => { this.emit('ws-disconnect', retries, msg); }); - this.alexaWsMqtt.on('error', (error) => { + this.alexahttp2Push.on('error', (error) => { this.emit('ws-error', error); }); - this.alexaWsMqtt.on('connect', () => { + this.alexahttp2Push.on('connect', () => { this.emit('ws-connect'); }); - this.alexaWsMqtt.on('unknown', (incomingMsg) => { + this.alexahttp2Push.on('unknown', (incomingMsg) => { this.emit('ws-unknown-message', incomingMsg); }); - this.alexaWsMqtt.on('command', (command, payload) => { + this.alexahttp2Push.on('command', (command, payload) => { this.emit('command', { 'command': command, 'payload': payload }); @@ -721,6 +754,8 @@ class AlexaRemote extends EventEmitter { case 'PUSH_MICROPHONE_STATE': case 'PUSH_DELETE_DOPPLER_ACTIVITIES': case 'PUSH_DEVICE_SETUP_STATE_CHANGE': + case 'NotifyNowPlayingUpdated': // TODO + case 'NotifyMediaSessionsUpdated': return; } @@ -728,7 +763,7 @@ class AlexaRemote extends EventEmitter { this.emit('ws-unknown-command', command, payload); }); - this.alexaWsMqtt.connect(); + this.alexahttp2Push.connect(); } getPushedActivities() { @@ -749,7 +784,7 @@ class AlexaRemote extends EventEmitter { else { lastFoundQueueIndex = queueIndex; const activity = res.splice(found, 1)[0]; - this._options.logger && this._options.logger(`Alexa-Remote: Activity found ${found} for Activity ID ${entry.key.entryId}`); + this._options.logger && this._options.logger(`Alexa-Remote: Activity found entry ${found} for Activity ID ${entry.key.entryId}`); activity.destinationUserId = entry.destinationUserId; this.emit('ws-device-activity', activity); } @@ -787,8 +822,8 @@ class AlexaRemote extends EventEmitter { clearTimeout(this.cookieRefreshTimeout); this.cookieRefreshTimeout = null; } - if (this.alexaWsMqtt) { - this.alexaWsMqtt.disconnect(); + if (this.alexahttp2Push) { + this.alexahttp2Push.disconnect(); } } @@ -819,7 +854,22 @@ class AlexaRemote extends EventEmitter { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - data: `app_name=${encodeURIComponent(deviceAppName)}&app_version=2.2.483723.0&di.sdk.version=6.12.3&source_token=${encodeURIComponent(this.cookieData.refreshToken)}&package_name=com.amazon.echo&di.hw.version=iPhone&platform=iOS&requested_token_type=access_token&source_token_type=refresh_token&di.os.name=iOS&di.os.version=15.5¤t_version=6.12.3&previous_version=6.12.3` + data: `app_name=${encodeURIComponent(deviceAppName)}&app_version=2.2.556530.0&di.sdk.version=6.12.4&source_token=${encodeURIComponent(this.cookieData.refreshToken)}&package_name=com.amazon.echo&di.hw.version=iPhone&platform=iOS&requested_token_type=access_token&source_token_type=refresh_token&di.os.name=iOS&di.os.version=16.6¤t_version=6.12.4&previous_version=6.12.4` + }); + } + + updateApiBearerToken(callback) { + if (this.authApiBearerToken && Date.now() < this.authApiBearerExpiry) { + return callback && callback(null); + } + this.getAuthApiBearerToken((err, res) => { + if (err || !res || !res.access_token || res.token_type !== 'bearer') { + this._options.logger && this._options.logger(`Alexa-Remote: Error getting auth token: ${err ? err.message : res}`); + return callback && callback(err); + } + this.authApiBearerToken = res.access_token; + this.authApiBearerExpiry = Date.now() + res.expires_in * 1000; + callback && callback(err); }); } @@ -838,13 +888,10 @@ class AlexaRemote extends EventEmitter { flags.headers.authority = flags.host; flags.headers['user-agent'] = `${officialUserAgent} ${this._options.apiUserAgentPostfix}`.trim(); if (!this.authApiBearerToken || Date.now() >= this.authApiBearerExpiry) { - this.getAuthApiBearerToken((err, res) => { - if (err || !res || !res.access_token || res.token_type !== 'bearer') { - this._options.logger && this._options.logger(`Alexa-Remote: Error getting auth token: ${err.message}`); + this.updateApiBearerToken(err => { + if (err) { return callback && callback(err); } - this.authApiBearerToken = res.access_token; - this.authApiBearerExpiry = Date.now() + res.expires_in * 1000; flags.headers.authorization = this.authApiBearerToken; this.httpsGet(true, path, callback, flags); }); @@ -1134,7 +1181,7 @@ class AlexaRemote extends EventEmitter { } getUsersMe(callback) { - this.httpsGetCall('/api/users/me?platform=ios&version=2.2.483723.0', callback); + this.httpsGetCall('/api/users/me?platform=ios&version=2.2.556530.0', callback); } getHousehold(callback) { From dac99bc2dabdc22517cb2333c2604bdd3e87987c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 09:09:15 +0200 Subject: [PATCH 290/356] dep upgrades --- package-lock.json | 508 ++++++++++++++++++++++------------------------ package.json | 6 +- 2 files changed, 247 insertions(+), 267 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4fe053bd..0b575b39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.10.3", "license": "MIT", "dependencies": { - "alexa-cookie2": "^4.1.3", + "alexa-cookie2": "^5.0.0", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", @@ -19,10 +19,10 @@ "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.46.0" + "eslint": "^8.48.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -205,9 +205,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", - "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -227,33 +227,10 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@eslint/eslintrc/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/@eslint/js": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", - "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", + "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -273,29 +250,6 @@ "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -424,43 +378,20 @@ "node": ">=12" } }, - "node_modules/alcalzone-shared/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/alcalzone-shared/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/alexa-cookie2": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.3.tgz", - "integrity": "sha512-T3iTBIBi48d5Fh2g7FhW9hVWr4UuNrQWDI/d2ksrevGCm3mzMae7KI0WanV/GdXAMVRWRnNKBQNAtxx6n0UBoA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.0.tgz", + "integrity": "sha512-xzQcPAYb1KK5kkMt2jDjaKanpkKHqI75Qkb31R+204vVeAZHCtAVvTxnzY1DKLxtCO2DS/178WKHZy72D4s8Ew==", "dependencies": { "cookie": "^0.5.0", - "express": "^4.18.1", + "express": "^4.18.2", "http-proxy-middleware": "^2.0.6", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.0.0" } }, "node_modules/ansi-colors": { @@ -530,9 +461,9 @@ "dev": true }, "node_modules/body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -542,7 +473,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", + "qs": "6.11.0", "raw-body": "2.5.1", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -552,6 +483,19 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -723,9 +667,9 @@ ] }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } @@ -763,11 +707,20 @@ } }, "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { - "ms": "2.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/deep-is": { @@ -872,15 +825,15 @@ } }, "node_modules/eslint": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", - "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", + "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.1", - "@eslint/js": "^8.46.0", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.48.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -891,7 +844,7 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.2", + "eslint-visitor-keys": "^3.4.3", "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", @@ -942,9 +895,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", - "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -953,29 +906,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/eslint/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -1072,13 +1002,13 @@ } }, "node_modules/express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.0", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -1097,7 +1027,7 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.10.3", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.18.0", @@ -1112,6 +1042,19 @@ "node": ">= 0.10.0" } }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/express/node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1203,6 +1146,19 @@ "node": ">= 0.8" } }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -1322,12 +1278,13 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -1379,9 +1336,9 @@ } }, "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1437,6 +1394,17 @@ "node": ">=8" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -1842,9 +1810,10 @@ } }, "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/natural-compare": { "version": "1.4.0", @@ -1873,9 +1842,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2067,9 +2036,9 @@ } }, "node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { "side-channel": "^1.0.4" }, @@ -2264,6 +2233,19 @@ "node": ">= 0.8.0" } }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2810,9 +2792,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", - "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -2824,29 +2806,12 @@ "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, "@eslint/js": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", - "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", + "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", "dev": true }, "@humanwhocodes/config-array": { @@ -2858,23 +2823,6 @@ "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.5" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, "@humanwhocodes/module-importer": { @@ -2969,32 +2917,15 @@ "dev": true, "requires": { "debug": "^4.3.2" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, "alexa-cookie2": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-4.1.3.tgz", - "integrity": "sha512-T3iTBIBi48d5Fh2g7FhW9hVWr4UuNrQWDI/d2ksrevGCm3mzMae7KI0WanV/GdXAMVRWRnNKBQNAtxx6n0UBoA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.0.tgz", + "integrity": "sha512-xzQcPAYb1KK5kkMt2jDjaKanpkKHqI75Qkb31R+204vVeAZHCtAVvTxnzY1DKLxtCO2DS/178WKHZy72D4s8Ew==", "requires": { "cookie": "^0.5.0", - "express": "^4.18.1", + "express": "^4.18.2", "http-proxy-middleware": "^2.0.6", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", @@ -3056,9 +2987,9 @@ "dev": true }, "body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "requires": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -3068,10 +2999,25 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", + "qs": "6.11.0", "raw-body": "2.5.1", "type-is": "~1.6.18", "unpipe": "1.0.0" + }, + "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" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } } }, "brace-expansion": { @@ -3200,9 +3146,9 @@ } }, "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" }, "cookie": { "version": "0.5.0", @@ -3231,11 +3177,12 @@ } }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "requires": { - "ms": "2.0.0" + "ms": "2.1.2" } }, "deep-is": { @@ -3312,15 +3259,15 @@ "dev": true }, "eslint": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", - "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", + "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.1", - "@eslint/js": "^8.46.0", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.48.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -3331,7 +3278,7 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.2", + "eslint-visitor-keys": "^3.4.3", "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", @@ -3354,23 +3301,6 @@ "optionator": "^0.9.3", "strip-ansi": "^6.0.1", "text-table": "^0.2.0" - }, - "dependencies": { - "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, "eslint-scope": { @@ -3384,9 +3314,9 @@ } }, "eslint-visitor-keys": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", - "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { @@ -3458,13 +3388,13 @@ } }, "express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.0", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -3483,7 +3413,7 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.10.3", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.18.0", @@ -3495,6 +3425,19 @@ "vary": "~1.1.2" }, "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" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -3563,6 +3506,21 @@ "parseurl": "~1.3.3", "statuses": "2.0.1", "unpipe": "~1.0.0" + }, + "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" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } } }, "find-up": { @@ -3646,12 +3604,13 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -3685,9 +3644,9 @@ } }, "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3731,6 +3690,11 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -4021,9 +3985,10 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "natural-compare": { "version": "1.4.0", @@ -4046,9 +4011,9 @@ } }, "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, "on-finished": { "version": "2.4.1", @@ -4183,9 +4148,9 @@ "dev": true }, "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "requires": { "side-channel": "^1.0.4" } @@ -4311,6 +4276,21 @@ "statuses": "2.0.1" }, "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" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } + } + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", diff --git a/package.json b/package.json index 81a6186d..fe8673a4 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^4.1.3", + "alexa-cookie2": "^5.0.0", "https": "^1.0.0", "querystring": "^0.2.1", "ws": "^8.13.0", @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.46.0" + "eslint": "^8.48.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", @@ -53,7 +53,7 @@ "url": "https://github.com/Apollon77/alexa-remote/issues" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.0.0" }, "types": "alexa-remote.d.ts", "main": "alexa-remote.js", From 77de2673712b858e5439fe19b7f3b39878f27481 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 15:54:49 +0200 Subject: [PATCH 291/356] Optimize reconnection logics --- alexa-http2push.js | 344 +++++++++++++++++++++++---------------------- alexa-remote.js | 2 +- 2 files changed, 180 insertions(+), 166 deletions(-) diff --git a/alexa-http2push.js b/alexa-http2push.js index 2031ca57..60a32de5 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -3,7 +3,7 @@ const EventEmitter = require('events'); class AlexaHttp2Push extends EventEmitter { - constructor(options, access_token, update_access_token) { + constructor(options, update_access_token) { super(); this._options = options; @@ -16,8 +16,9 @@ class AlexaHttp2Push extends EventEmitter { this.pongTimeout = null; this.initTimeout = null; this.connectionActive = false; - this.access_token = access_token; + this.access_token = null; this.update_access_token = update_access_token; + this.inClosing = false; } isConnected() { @@ -25,190 +26,203 @@ class AlexaHttp2Push extends EventEmitter { } connect() { - const http2_options = { - ':method': 'GET', - ':path': '/v20160207/directives', - ':authority': 'bob-dispatch-prod-eu.amazon.com', - ':scheme': 'https', - 'authorization': `Bearer ${this.access_token}`, - 'accept-encoding': 'gzip', - 'user-agent': 'okhttp/4.3.2-SNAPSHOT', - }; - - const onHttp2Close = (code, reason) => { - if (reason) { - reason = reason.toString(); - } - try { - this.client && this.client.close(); - } catch (err) { - // ignore - } - this.client = null; - this.stream = null; - this.connectionActive = false; - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Close: ' + code + ': ' + reason); - if (this.initTimeout) { - clearTimeout(this.initTimeout); - this.initTimeout = null; - } - if (this.pingPongInterval) { - clearInterval(this.pingPongInterval); - this.pingPongInterval = null; - } - if (this.pongTimeout) { - clearTimeout(this.pongTimeout); - this.pongTimeout = null; - } - if (this.stop) return; - if (this.errorRetryCounter > 100) { - this.emit('disconnect', false, 'Too many failed retries. Check cookie and data'); - return; - } else { - this.errorRetryCounter++; - } - - const retryDelay = Math.min(60, (this.errorRetryCounter * 5) + 5); - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Retry Connection in ' + retryDelay + 's'); - this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); - this.reconnectTimeout && clearTimeout(this.reconnectTimeout); - this.reconnectTimeout = setTimeout(() => { - this.reconnectTimeout = null; - this.connect(); - }, retryDelay * 1000); - }; - - const onPingResponse = () => { - if (this.initTimeout) { - clearTimeout(this.initTimeout); - this.initTimeout = null; - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Initialization completed'); - this.emit('connect'); - } - if (this.pongTimeout) { - clearTimeout(this.pongTimeout); - this.pongTimeout = null; - } - this.connectionActive = true; - }; + this.inClosing = false; + this.update_access_token(token => { + this.access_token = token; + + const http2_options = { + ':method': 'GET', + ':path': '/v20160207/directives', + ':authority': 'bob-dispatch-prod-eu.amazon.com', + ':scheme': 'https', + 'authorization': `Bearer ${this.access_token}`, + 'accept-encoding': 'gzip', + 'user-agent': 'okhttp/4.3.2-SNAPSHOT', + }; + + const onHttp2Close = (code, reason, immediateReconnect) => { + if (this.inClosing) return; + this.inClosing = true; + if (reason) { + reason = reason.toString(); + } + try { + this.stream && this.stream.end(); + } catch (err) { + // ignore + } + try { + this.client && this.client.close(); + } catch (err) { + // ignore + } + this.client = null; + this.stream = null; + this.connectionActive = false; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Close: ' + code + ': ' + reason); + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; + } + if (this.pingPongInterval) { + clearInterval(this.pingPongInterval); + this.pingPongInterval = null; + } + if (this.pongTimeout) { + clearTimeout(this.pongTimeout); + this.pongTimeout = null; + } + if (this.stop) return; + if (this.errorRetryCounter > 100) { + this.emit('disconnect', false, 'Too many failed retries. Check cookie and data'); + return; + } else { + this.errorRetryCounter++; + } + + const retryDelay = (immediateReconnect || this.errorRetryCounter === 1) ? 0 : Math.min(60, this.errorRetryCounter * 5); + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Retry Connection in ' + retryDelay + 's'); + this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); + this.reconnectTimeout && clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = setTimeout(() => { + this.reconnectTimeout = null; + this.connect(); + }, retryDelay * 1000); + }; + + const onPingResponse = () => { + if (this.initTimeout) { + clearTimeout(this.initTimeout); + this.initTimeout = null; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Initialization completed'); + this.emit('connect'); + } + if (this.pongTimeout) { + clearTimeout(this.pongTimeout); + this.pongTimeout = null; + } + this.connectionActive = true; + this.errorRetryCounter = 0; + }; - try { - this.client = http2.connect(`https://${http2_options[':authority']}`, () => { - this.stream = this.client.request(http2_options); - - this.stream.on('response', async (headers) => { - if (headers[':status'] === 403) { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error 403 .... refresh token'); - this.update_access_token(token => { - if (token) { - this.access_token = token; - } + try { + this.client = http2.connect(`https://${http2_options[':authority']}`, () => { + this.stream = this.client.request(http2_options); + + this.stream.on('response', async (headers) => { + if (headers[':status'] === 403) { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error 403 .... refresh token'); + this.update_access_token(token => { + if (token) { + this.access_token = token; + } + onHttp2Close(headers[':status'], undefined, this.errorRetryCounter < 3); + }); + } + else if (headers[':status'] !== 200) { onHttp2Close(headers[':status']); - }); - } - else if (headers[':status'] !== 200) { - onHttp2Close(headers[':status']); - } - }); + } + }); - this.stream.on('data', (chunk) => { - if (this.stop) { - this.stream && this.stream.end(); - this.client && this.client.close(); - return; - } - chunk = chunk.toString(); - if (chunk.startsWith('------')) { - this.client.ping(onPingResponse); - - this.pingPongInterval = setInterval(() => { - if (!this.stream || !this.client) return; - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Send Ping'); - //console.log('SEND: ' + msg.toString('hex')); + this.stream.on('data', (chunk) => { + if (this.stop) { + this.stream && this.stream.end(); + this.client && this.client.close(); + return; + } + chunk = chunk.toString(); + if (chunk.startsWith('------')) { this.client.ping(onPingResponse); - this.pongTimeout = setTimeout(() => { - this.pongTimeout = null; - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: No Pong received after 30s'); - this.stream && this.stream.end(); - this.client && this.client.close(); - this.connectionActive = false; - }, 30000); - }, 180000); - - return; - } - if (chunk.startsWith('Content-Type: application/json')) { - const json_start = chunk.indexOf('{'); - const json_end = chunk.lastIndexOf('}'); - if (json_start === -1 || json_end === -1) { - this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find json in chunk: ${chunk}`); + this.pingPongInterval = setInterval(() => { + if (!this.stream || !this.client) return; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Send Ping'); + //console.log('SEND: ' + msg.toString('hex')); + this.client.ping(onPingResponse); + + this.pongTimeout = setTimeout(() => { + this.pongTimeout = null; + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: No Pong received after 30s'); + this.stream && this.stream.end(); + this.client && this.client.close(); + this.connectionActive = false; + }, 30000); + }, 180000); + return; } - const message = chunk.substring(json_start, json_end + 1); - try { - const data = JSON.parse(message); - if (!data || !data.directive || !data.directive.payload || !Array.isArray(data.directive.payload.renderingUpdates)) { - this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find renderingUpdates in json: ${message}`); + if (chunk.startsWith('Content-Type: application/json')) { + const json_start = chunk.indexOf('{'); + const json_end = chunk.lastIndexOf('}'); + if (json_start === -1 || json_end === -1) { + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find json in chunk: ${chunk}`); return; } - data.directive.payload.renderingUpdates.forEach(update => { - if (!update || !update.resourceMetadata) { - this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find resourceMetadata in renderingUpdates: ${message}`); + const message = chunk.substring(json_start, json_end + 1); + try { + const data = JSON.parse(message); + if (!data || !data.directive || !data.directive.payload || !Array.isArray(data.directive.payload.renderingUpdates)) { + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find renderingUpdates in json: ${message}`); + return; } - const dataContent = JSON.parse(update.resourceMetadata); + data.directive.payload.renderingUpdates.forEach(update => { + if (!update || !update.resourceMetadata) { + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Unexpected ResponseCould not find resourceMetadata in renderingUpdates: ${message}`); + } + const dataContent = JSON.parse(update.resourceMetadata); + + const command = dataContent.command; + const payload = JSON.parse(dataContent.payload); + + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Command ' + command + ': ' + JSON.stringify(payload, null, 4)); + this.emit('command', command, payload); + }); + } catch (err) { + this.emit('unexpected-response', `Could not parse json: ${message} : ${err.message}`); + } + } + }); - const command = dataContent.command; - const payload = JSON.parse(dataContent.payload); + this.stream.on('close', onHttp2Close); - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Command ' + command + ': ' + JSON.stringify(payload, null, 4)); - this.emit('command', command, payload); - }); - } catch (err) { - this.emit('unexpected-response', `Could not parse json: ${message} : ${err.message}`); - } - } + this.stream.on('error', (error) => { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Stream-Error: ' + error); + this.emit('error', error); + this.stream && this.stream.end(); + this.client && this.client.close(); + }); }); - this.stream.on('close', onHttp2Close); + this.client.on('close', onHttp2Close); - this.stream.on('error', (error) => { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Stream-Error: ' + error); + this.client.on('error', (error) => { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Client-Error: ' + error); this.emit('error', error); this.stream && this.stream.end(); this.client && this.client.close(); }); - }); - - this.client.on('close', onHttp2Close); - - this.client.on('error', (error) => { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Client-Error: ' + error); - this.emit('error', error); - this.stream && this.stream.end(); - this.client && this.client.close(); - }); - } - catch (err) { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Init ' + err.message); - this._options.logger && this._options.logger(err.stack); - this.emit('error', err); - return; - } - this.initTimeout && clearTimeout(this.initTimeout); - - this.initTimeout = setTimeout(() => { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Initialization not done within 30s'); - try { - this.stream && this.stream.end(); - this.client && this.client.close(); - } catch (err) { - //just make sure } - if (this.stream || !this.reconnectTimeout) { // seems no close was emitted so far?! - onHttp2Close(); + catch (err) { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Init ' + err.message); + this._options.logger && this._options.logger(err.stack); + this.emit('error', err); + return; } - }, 30000); + this.initTimeout && clearTimeout(this.initTimeout); + + this.initTimeout = setTimeout(() => { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Initialization not done within 30s'); + try { + this.stream && this.stream.end(); + this.client && this.client.close(); + } catch (err) { + //just make sure + } + if (this.stream || !this.reconnectTimeout) { // seems no close was emitted so far?! + onHttp2Close(); + } + }, 30000); + }); } disconnect() { diff --git a/alexa-remote.js b/alexa-remote.js index b1814f65..895ccdda 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -435,7 +435,7 @@ class AlexaRemote extends EventEmitter { }); return; } - this.alexahttp2Push = new AlexaHttp2Push(this._options, this.authApiBearerToken, (callback) => { + this.alexahttp2Push = new AlexaHttp2Push(this._options, (callback) => { this._options.logger && this._options.logger('Alexa-Remote: Update access token ...'); this.updateApiBearerToken((err) => { if (err) { From 5a1564d24b24da9b1ad41665a9501ede49cb9cbb Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 15:55:02 +0200 Subject: [PATCH 292/356] Readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e27ef73b..1626d52b 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,11 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* IMPORTANT: Node.js 16 is now required minimum Node.js version! +* (Apollon77) Replace WS-MQTT by the new HTTP/2 push connection + ### 5.10.3 (2023-08-08) * (Apollon77) Add new parameter usePushConnectType to specify which connectType for the push connection should be used (valid values 1, 2) From bc687b9e36da7c2318c56b4e1bec677c7198dbd4 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 15:56:22 +0200 Subject: [PATCH 293/356] chore: release v6.0.0 * IMPORTANT: Node.js 16 is now required minimum Node.js version! * (Apollon77) Replace WS-MQTT by the new HTTP/2 push connection --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1626d52b..a5202f03 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 6.0.0 (2023-09-08) * IMPORTANT: Node.js 16 is now required minimum Node.js version! * (Apollon77) Replace WS-MQTT by the new HTTP/2 push connection diff --git a/package-lock.json b/package-lock.json index 0b575b39..336370e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "5.10.3", + "version": "6.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "5.10.3", + "version": "6.0.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index fe8673a4..62542e34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "5.10.3", + "version": "6.0.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 9915a13a22f38a6a4662b225843b9f41fab5ab79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:56:40 +0000 Subject: [PATCH 294/356] chore(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-automerge.yml | 2 +- .github/workflows/test-and-release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index 7ebd3105..dfddd2c7 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check if PR should be auto-merged uses: ahmadnassri/action-dependabot-auto-merge@v2 diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index bfa614a9..068df561 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -33,7 +33,7 @@ jobs: node-version: [16.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: @@ -61,7 +61,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 From 1aeb8cd282fbf96da603cca872b3c542180bb2e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:56:46 +0000 Subject: [PATCH 295/356] chore(deps): bump ws from 8.13.0 to 8.14.0 Bumps [ws](https://github.com/websockets/ws) from 8.13.0 to 8.14.0. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.13.0...8.14.0) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 336370e3..68553ed9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^9.0.0", - "ws": "^8.13.0" + "ws": "^8.14.0" }, "devDependencies": { "@alcalzone/release-script": "^3.6.0", @@ -2574,9 +2574,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.0.tgz", + "integrity": "sha512-WR0RJE9Ehsio6U4TuM+LmunEsjQ5ncHlw4sn9ihD6RoJKZrVyH9FWV3dmnwu8B2aNib1OvG2X6adUCyFpQyWcg==", "engines": { "node": ">=10.0.0" }, @@ -4540,9 +4540,9 @@ "dev": true }, "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.0.tgz", + "integrity": "sha512-WR0RJE9Ehsio6U4TuM+LmunEsjQ5ncHlw4sn9ihD6RoJKZrVyH9FWV3dmnwu8B2aNib1OvG2X6adUCyFpQyWcg==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index 62542e34..f9e0e425 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "alexa-cookie2": "^5.0.0", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.13.0", + "ws": "^8.14.0", "extend": "^3.0.2", "uuid": "^9.0.0" }, From 158144cff673f3278e7acfb35df0ff4dc2ca1901 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 22:10:49 +0200 Subject: [PATCH 296/356] optimization --- alexa-http2push.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/alexa-http2push.js b/alexa-http2push.js index 60a32de5..2609d310 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -30,10 +30,17 @@ class AlexaHttp2Push extends EventEmitter { this.update_access_token(token => { this.access_token = token; + let host = 'bob-dispatch-prod-eu.amazon.com'; + if (this._options.amazonPage === 'amazon.com') { + host = 'bob-dispatch-prod-na.amazon.com'; + } else if (this._options.amazonPage === 'amazon.com.au' || this._options.amazonPage === 'amazon.co.jp') { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH currently not supported for AU/JP. Contact the developer if you need it.'); + } + const http2_options = { ':method': 'GET', ':path': '/v20160207/directives', - ':authority': 'bob-dispatch-prod-eu.amazon.com', + ':authority': host, ':scheme': 'https', 'authorization': `Bearer ${this.access_token}`, 'accept-encoding': 'gzip', @@ -80,7 +87,7 @@ class AlexaHttp2Push extends EventEmitter { this.errorRetryCounter++; } - const retryDelay = (immediateReconnect || this.errorRetryCounter === 1) ? 0 : Math.min(60, this.errorRetryCounter * 5); + const retryDelay = (immediateReconnect || this.errorRetryCounter === 1) ? 1 : Math.min(60, this.errorRetryCounter * 5); this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Retry Connection in ' + retryDelay + 's'); this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); this.reconnectTimeout && clearTimeout(this.reconnectTimeout); From 6740fb0d35b8b549ce89b4fbecfe01f56dffe339 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 22:25:06 +0200 Subject: [PATCH 297/356] optimization --- alexa-http2push.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/alexa-http2push.js b/alexa-http2push.js index 2609d310..edba834e 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -33,9 +33,13 @@ class AlexaHttp2Push extends EventEmitter { let host = 'bob-dispatch-prod-eu.amazon.com'; if (this._options.amazonPage === 'amazon.com') { host = 'bob-dispatch-prod-na.amazon.com'; - } else if (this._options.amazonPage === 'amazon.com.au' || this._options.amazonPage === 'amazon.co.jp') { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH currently not supported for AU/JP. Contact the developer if you need it.'); + } else if (this._options.amazonPage === 'amazon.co.jp') { + host = 'bob-dispatch-prod-fe.amazon.co.jp'; + } else if (this._options.amazonPage === 'amazon.com.au') { + host = 'bob-dispatch-prod-fe.amazon.com.au'; } + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Use host ${host}`); + const http2_options = { ':method': 'GET', From f4f6826d08671620c97f59e4fb8fcd86e402610e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 22:31:33 +0200 Subject: [PATCH 298/356] release preps --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index a5202f03..41c8b7f3 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,11 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Optimize reconnection timing +* (Apollon77) Added support for NA/JP and potentially AU regions + ### 6.0.0 (2023-09-08) * IMPORTANT: Node.js 16 is now required minimum Node.js version! * (Apollon77) Replace WS-MQTT by the new HTTP/2 push connection From 9289914c549590fd91884fbec5f2eba52a1fa4d0 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 8 Sep 2023 22:31:45 +0200 Subject: [PATCH 299/356] chore: release v6.0.1 * (Apollon77) Optimize reconnection timing * (Apollon77) Added support for NA/JP and potentially AU regions --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 41c8b7f3..80912a4d 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 6.0.1 (2023-09-08) * (Apollon77) Optimize reconnection timing * (Apollon77) Added support for NA/JP and potentially AU regions diff --git a/package-lock.json b/package-lock.json index 68553ed9..763bad2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.0.0", + "version": "6.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.0.0", + "version": "6.0.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index f9e0e425..428896fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.0.0", + "version": "6.0.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 128adf857c2b56356e472104d6bf7b9a7059d007 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Sep 2023 08:54:42 +0200 Subject: [PATCH 300/356] * (Apollon77) Added experimental support for BR region --- README.md | 4 ++++ alexa-http2push.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 80912a4d..0e7b788e 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Added experimental support for BR region + ### 6.0.1 (2023-09-08) * (Apollon77) Optimize reconnection timing * (Apollon77) Added support for NA/JP and potentially AU regions diff --git a/alexa-http2push.js b/alexa-http2push.js index edba834e..ef85af5b 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -33,6 +33,8 @@ class AlexaHttp2Push extends EventEmitter { let host = 'bob-dispatch-prod-eu.amazon.com'; if (this._options.amazonPage === 'amazon.com') { host = 'bob-dispatch-prod-na.amazon.com'; + } else if (this._options.amazonPage === 'amazon.com.br') { + host = 'bob-dispatch-prod-na.amazon.com'; } else if (this._options.amazonPage === 'amazon.co.jp') { host = 'bob-dispatch-prod-fe.amazon.co.jp'; } else if (this._options.amazonPage === 'amazon.com.au') { From c29aec3fba6acd2404d16b9bc5878d2e74283123 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Sep 2023 08:54:56 +0200 Subject: [PATCH 301/356] chore: release v6.0.2 * (Apollon77) Added experimental support for BR region --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0e7b788e..61b9ed28 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 6.0.2 (2023-09-09) * (Apollon77) Added experimental support for BR region ### 6.0.1 (2023-09-08) diff --git a/package-lock.json b/package-lock.json index 763bad2c..49366a89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.0.1", + "version": "6.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.0.1", + "version": "6.0.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index 428896fc..fade99f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.0.1", + "version": "6.0.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From c4fc6c9b720c69af14cfd400e9f0d1588bc75d67 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Sep 2023 15:15:18 +0200 Subject: [PATCH 302/356] * (Apollon77) Introduce optional parameter "pushDispatchHost" to specify the host for the push connection * (Apollon77) Make sure cookie refresh timeout is valid and prevent overflow * (Apollon77) Fix support for push connections JP/AU regions --- README.md | 8 +++++++- alexa-http2push.js | 8 +++++--- alexa-remote.js | 3 +++ example/example.js | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 61b9ed28..b44bbc65 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,14 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Introduce optional parameter "pushDispatchHost" to specify the host for the push connection +* (Apollon77) Make sure cookie refresh timeout is valid and prevent overflow +* (Apollon77) Fix support for push connections JP/AU regions + ### 6.0.2 (2023-09-09) -* (Apollon77) Added experimental support for BR region +* (Apollon77) Added experimental support push connections in BR region ### 6.0.1 (2023-09-08) * (Apollon77) Optimize reconnection timing diff --git a/alexa-http2push.js b/alexa-http2push.js index ef85af5b..842a935d 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -31,14 +31,16 @@ class AlexaHttp2Push extends EventEmitter { this.access_token = token; let host = 'bob-dispatch-prod-eu.amazon.com'; - if (this._options.amazonPage === 'amazon.com') { + if (this._options.pushDispatchHost) { + host = this._options.pushDispatchHost; + } else if (this._options.amazonPage === 'amazon.com') { host = 'bob-dispatch-prod-na.amazon.com'; } else if (this._options.amazonPage === 'amazon.com.br') { host = 'bob-dispatch-prod-na.amazon.com'; } else if (this._options.amazonPage === 'amazon.co.jp') { - host = 'bob-dispatch-prod-fe.amazon.co.jp'; + host = 'bob-dispatch-prod-fe.amazon.com'; } else if (this._options.amazonPage === 'amazon.com.au') { - host = 'bob-dispatch-prod-fe.amazon.com.au'; + host = 'bob-dispatch-prod-fe.amazon.com'; } this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Use host ${host}`); diff --git a/alexa-remote.js b/alexa-remote.js index 895ccdda..f8174678 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -108,6 +108,9 @@ class AlexaRemote extends EventEmitter { if (this._options.cookieRefreshInterval !== 0) { this._options.cookieRefreshInterval = this._options.cookieRefreshInterval || 4 * 24 * 60 * 60 * 1000; // Auto Refresh after 4 days } + if (this._options.cookieRefreshInterval <= 0 || this._options.cookieRefreshInterval > 2147483646) { + this._options.cookieRefreshInterval = 4 * 24 * 60 * 60 * 1000; // Auto Refresh after 4 days + } const self = this; function getCookie(callback) { diff --git a/example/example.js b/example/example.js index 971a1206..37c46f10 100644 --- a/example/example.js +++ b/example/example.js @@ -31,6 +31,7 @@ alexa.init({ // acceptLanguage: '...', // optional, override Accept-Language-Header for cookie determination // amazonPage: '...', // optional, override Amazon-Login-Page for cookie determination and referer for requests useWsMqtt: true, // optional, true to use the Websocket/MQTT direct push connection +// pushDispatchHost: '...', // optional, override push endpoint host cookieRefreshInterval: 7*24*60*1000, // optional, cookie refresh intervall, set to 0 to disable refresh deviceAppName: '...', // optional: name of the device app name which will be registered with Amazon, leave empty to use a default one apiUserAgentPostFix: '...', // optional: postfix to add to api useragent, leave empty to use a default one From b98c4736a9e833f08d1a2d2b882df62b93de336b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Sep 2023 15:15:34 +0200 Subject: [PATCH 303/356] chore: release v6.1.0 * (Apollon77) Introduce optional parameter "pushDispatchHost" to specify the host for the push connection * (Apollon77) Make sure cookie refresh timeout is valid and prevent overflow * (Apollon77) Fix support for push connections JP/AU regions --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b44bbc65..f34ba32a 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 6.1.0 (2023-09-09) * (Apollon77) Introduce optional parameter "pushDispatchHost" to specify the host for the push connection * (Apollon77) Make sure cookie refresh timeout is valid and prevent overflow * (Apollon77) Fix support for push connections JP/AU regions diff --git a/package-lock.json b/package-lock.json index 49366a89..0e87fbd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.0.2", + "version": "6.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.0.2", + "version": "6.1.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index fade99f4..9403c494 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.0.2", + "version": "6.1.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 1f419f8caf7a156fcf4ba6e2a8c83a4f0670d24f Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Sep 2023 15:24:00 +0200 Subject: [PATCH 304/356] * (Apollon77) Fix for cookie refresh check --- README.md | 4 ++++ alexa-remote.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f34ba32a..d220596c 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix for cookie refresh check + ### 6.1.0 (2023-09-09) * (Apollon77) Introduce optional parameter "pushDispatchHost" to specify the host for the push connection * (Apollon77) Make sure cookie refresh timeout is valid and prevent overflow diff --git a/alexa-remote.js b/alexa-remote.js index f8174678..8a1b388c 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -108,7 +108,7 @@ class AlexaRemote extends EventEmitter { if (this._options.cookieRefreshInterval !== 0) { this._options.cookieRefreshInterval = this._options.cookieRefreshInterval || 4 * 24 * 60 * 60 * 1000; // Auto Refresh after 4 days } - if (this._options.cookieRefreshInterval <= 0 || this._options.cookieRefreshInterval > 2147483646) { + if (this._options.cookieRefreshInterval < 0 || this._options.cookieRefreshInterval > 2147483646) { this._options.cookieRefreshInterval = 4 * 24 * 60 * 60 * 1000; // Auto Refresh after 4 days } From 5de34f10fb824985fea570ccb84ea02c5bef39bf Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 9 Sep 2023 15:24:20 +0200 Subject: [PATCH 305/356] chore: release v6.1.1 * (Apollon77) Fix for cookie refresh check --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d220596c..75cf4b24 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 6.1.1 (2023-09-09) * (Apollon77) Fix for cookie refresh check ### 6.1.0 (2023-09-09) diff --git a/package-lock.json b/package-lock.json index 0e87fbd8..48292b0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.1.0", + "version": "6.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.1.0", + "version": "6.1.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index 9403c494..cb427422 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.1.0", + "version": "6.1.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 22cfcefefc5ef5b5e0583d2a9ef9d2a4233502ff Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Sep 2023 10:11:06 +0200 Subject: [PATCH 306/356] * (Apollon77) Optimize reconnection handling for push connections --- README.md | 4 ++++ alexa-http2push.js | 16 +++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 75cf4b24..6fe9819e 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Optimize reconnection handling for push connections + ### 6.1.1 (2023-09-09) * (Apollon77) Fix for cookie refresh check diff --git a/alexa-http2push.js b/alexa-http2push.js index 842a935d..20f50140 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -62,12 +62,12 @@ class AlexaHttp2Push extends EventEmitter { reason = reason.toString(); } try { - this.stream && this.stream.end(); + this.stream && this.stream.destroy(); } catch (err) { // ignore } try { - this.client && this.client.close(); + this.client && this.client.destroy(); } catch (err) { // ignore } @@ -97,7 +97,7 @@ class AlexaHttp2Push extends EventEmitter { const retryDelay = (immediateReconnect || this.errorRetryCounter === 1) ? 1 : Math.min(60, this.errorRetryCounter * 5); this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Retry Connection in ' + retryDelay + 's'); - this.emit('disconnect', true, 'Retry Connection in ' + retryDelay + 's'); + this.emit('disconnect', true, `Retry Connection in ${retryDelay}s (${code}: ${reason})`); this.reconnectTimeout && clearTimeout(this.reconnectTimeout); this.reconnectTimeout = setTimeout(() => { this.reconnectTimeout = null; @@ -105,7 +105,7 @@ class AlexaHttp2Push extends EventEmitter { }, retryDelay * 1000); }; - const onPingResponse = () => { + const onPingResponse = (resetErrorCount) => { if (this.initTimeout) { clearTimeout(this.initTimeout); this.initTimeout = null; @@ -117,7 +117,9 @@ class AlexaHttp2Push extends EventEmitter { this.pongTimeout = null; } this.connectionActive = true; - this.errorRetryCounter = 0; + if (resetErrorCount) { + this.errorRetryCounter = 0; + } }; try { @@ -147,13 +149,13 @@ class AlexaHttp2Push extends EventEmitter { } chunk = chunk.toString(); if (chunk.startsWith('------')) { - this.client.ping(onPingResponse); + this.client.ping(() => onPingResponse(false)); this.pingPongInterval = setInterval(() => { if (!this.stream || !this.client) return; this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Send Ping'); //console.log('SEND: ' + msg.toString('hex')); - this.client.ping(onPingResponse); + this.client.ping(() => onPingResponse(true)); this.pongTimeout = setTimeout(() => { this.pongTimeout = null; From b801cc99a52bc73a62c6ab7e531e90418bace04b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 12 Sep 2023 10:11:42 +0200 Subject: [PATCH 307/356] chore: release v6.1.2 * (Apollon77) Optimize reconnection handling for push connections --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6fe9819e..49c35b01 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 6.1.2 (2023-09-12) * (Apollon77) Optimize reconnection handling for push connections ### 6.1.1 (2023-09-09) diff --git a/package-lock.json b/package-lock.json index 48292b0a..85821aaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.1.1", + "version": "6.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.1.1", + "version": "6.1.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index cb427422..a0a58c11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.1.1", + "version": "6.1.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From fc933dad0feaa401224f869befae8221cc2ad952 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 02:14:26 +0000 Subject: [PATCH 308/356] chore(deps-dev): bump eslint from 8.48.0 to 8.50.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.50.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.50.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 46 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85821aaa..f3682d1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.48.0" + "eslint": "^8.50.0" }, "engines": { "node": ">=16.0.0" @@ -228,18 +228,18 @@ } }, "node_modules/@eslint/js": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", - "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", + "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -825,16 +825,16 @@ } }, "node_modules/eslint": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", - "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", + "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint/js": "8.50.0", + "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.12.4", @@ -2809,15 +2809,15 @@ } }, "@eslint/js": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", - "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", + "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -3259,16 +3259,16 @@ "dev": true }, "eslint": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", - "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", + "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.48.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint/js": "8.50.0", + "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.12.4", diff --git a/package.json b/package.json index a0a58c11..ecdbaad4 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.48.0" + "eslint": "^8.50.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 8c3b259fed91a56d62cfd8580d3a4c81ef357616 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 02:14:35 +0000 Subject: [PATCH 309/356] chore(deps): bump ws from 8.14.0 to 8.14.2 Bumps [ws](https://github.com/websockets/ws) from 8.14.0 to 8.14.2. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.14.0...8.14.2) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85821aaa..a8ac1f9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^9.0.0", - "ws": "^8.14.0" + "ws": "^8.14.2" }, "devDependencies": { "@alcalzone/release-script": "^3.6.0", @@ -2574,9 +2574,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.0.tgz", - "integrity": "sha512-WR0RJE9Ehsio6U4TuM+LmunEsjQ5ncHlw4sn9ihD6RoJKZrVyH9FWV3dmnwu8B2aNib1OvG2X6adUCyFpQyWcg==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, @@ -4540,9 +4540,9 @@ "dev": true }, "ws": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.0.tgz", - "integrity": "sha512-WR0RJE9Ehsio6U4TuM+LmunEsjQ5ncHlw4sn9ihD6RoJKZrVyH9FWV3dmnwu8B2aNib1OvG2X6adUCyFpQyWcg==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index a0a58c11..9e1ad038 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "alexa-cookie2": "^5.0.0", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.14.0", + "ws": "^8.14.2", "extend": "^3.0.2", "uuid": "^9.0.0" }, From 6df48e2ace2c536e0ebb598d771774b785fbef41 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 27 Oct 2023 16:50:47 +0200 Subject: [PATCH 310/356] * (Apollon77) Adjust Activity detection to work with recent Amazon changes --- README.md | 4 ++ alexa-remote.js | 119 ++++++++++++++++++++++++++++++++++++++-------- package-lock.json | 94 +++++++++++++++++++++--------------- package.json | 4 +- 4 files changed, 162 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 49c35b01..e0d68b4c 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Adjust Activity detection to work with recent Amazon changes + ### 6.1.2 (2023-09-12) * (Apollon77) Optimize reconnection handling for push connections diff --git a/alexa-remote.js b/alexa-remote.js index 8a1b388c..77015f6c 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -39,6 +39,15 @@ class AlexaRemote extends EventEmitter { this.authApiBearerToken = null; this.authApiBearerExpiry = null; + + this.lastVolumes = {}; + this.lastEqualizer = {}; + this.lastPushedActivity = {}; + + this.activityUpdateQueue = []; + this.activityUpdateNotFoundCounter = 0; + this.activityUpdateTimeout = null; + this.activityUpdateRunning = false; } setCookie(_cookie) { @@ -422,6 +431,26 @@ class AlexaRemote extends EventEmitter { return this.initPushConnection(); } + simulateActivity(deviceSerialNumber, destinationUserId) { + if (this.activityUpdateTimeout && this.activityUpdateQueue.some(entry => entry.deviceSerialNumber === deviceSerialNumber && entry.destinationUserId === destinationUserId)) return; + + this._options.logger && this._options.logger(`Alexa-Remote: Simulate activity for ${deviceSerialNumber} with destinationUserId ${destinationUserId} ... fetch in 2s`); + + if (this.activityUpdateTimeout) { + clearTimeout(this.activityUpdateTimeout); + this.activityUpdateTimeout = null; + } + this.activityUpdateQueue.push({ + deviceSerialNumber: deviceSerialNumber, + destinationUserId: destinationUserId, + activityTimestamp: Date.now() + }); + this.activityUpdateTimeout = setTimeout(() => { + this.activityUpdateTimeout = null; + this.getPushedActivities(); + }, 2500); + } + initPushConnection() { if (this.alexahttp2Push) { this.alexahttp2Push.removeAllListeners(); @@ -453,11 +482,6 @@ class AlexaRemote extends EventEmitter { this._options.logger && this._options.logger('Alexa-Remote: Initialize WS-MQTT Push Connection'); - this.activityUpdateQueue = []; - this.activityUpdateNotFoundCounter = 0; - this.activityUpdateTimeout = null; - this.activityUpdateRunning = false; - this.alexahttp2Push.on('disconnect', (retries, msg) => { this.emit('ws-disconnect', retries, msg); }); @@ -617,6 +641,20 @@ class AlexaRemote extends EventEmitter { 'volumeSetting': 50 } */ + if ( + !this.lastVolumes[payload.dopplerId.deviceSerialNumber] || + ( + this.lastVolumes[payload.dopplerId.deviceSerialNumber].volumeSetting === payload.volumeSetting && + this.lastVolumes[payload.dopplerId.deviceSerialNumber].isMuted === payload.isMuted + ) + ) { + this.simulateActivity(payload.dopplerId.deviceSerialNumber, payload.destinationUserId); + } + this.lastVolumes[payload.dopplerId.deviceSerialNumber] = { + volumeSetting: payload.volumeSetting, + isMuted: payload.isMuted + }; + this.emit('ws-volume-change', { destinationUserId: payload.destinationUserId, deviceSerialNumber: payload.dopplerId.deviceSerialNumber, @@ -657,6 +695,22 @@ class AlexaRemote extends EventEmitter { 'midrange': 0 } */ + if ( + !this.lastEqualizer[payload.dopplerId.deviceSerialNumber] || + ( + this.lastEqualizer[payload.dopplerId.deviceSerialNumber].bass === payload.bass && + this.lastEqualizer[payload.dopplerId.deviceSerialNumber].treble === payload.treble && + this.lastEqualizer[payload.dopplerId.deviceSerialNumber].midrange === payload.midrange + ) + ) { + this.simulateActivity(payload.dopplerId.deviceSerialNumber, payload.destinationUserId); + } + this.lastEqualizer[payload.dopplerId.deviceSerialNumber] = { + bass: payload.bass, + treble: payload.treble, + midrange: payload.midrange + }; + this.emit('ws-equilizer-state-change', { destinationUserId: payload.destinationUserId, deviceSerialNumber: payload.dopplerId.deviceSerialNumber, @@ -770,33 +824,57 @@ class AlexaRemote extends EventEmitter { } getPushedActivities() { + this._options.logger && this._options.logger(`Alexa-Remote: Get pushed activities ... ${this.activityUpdateQueue.length} entries in queue (already running: ${this.activityUpdateRunning})`); if (this.activityUpdateRunning || !this.activityUpdateQueue.length) return; this.activityUpdateRunning = true; - this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false}, (err, res) => { + this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false, forceRequest: true}, (err, res) => { this.activityUpdateRunning = false; if (!err && res) { this._options.logger && this._options.logger(`Alexa-Remote: Activity data ${JSON.stringify(res)}`); // TODO REMOVE let lastFoundQueueIndex = -1; this.activityUpdateQueue.forEach((entry, queueIndex) => { - const found = res.findIndex(activity => activity.data.recordKey.endsWith(`#${entry.key.entryId}`) && activity.data.customerId === entry.key.registeredUserId); + if (entry.key) { // deprecated + const found = res.findIndex(activity => activity.data.recordKey.endsWith(`#${entry.key.entryId}`) && activity.data.customerId === entry.key.registeredUserId); - if (found === -1) { - this._options.logger && this._options.logger(`Alexa-Remote: Activity for id ${entry.key.entryId} not found`); - } - else { - lastFoundQueueIndex = queueIndex; - const activity = res.splice(found, 1)[0]; - this._options.logger && this._options.logger(`Alexa-Remote: Activity found entry ${found} for Activity ID ${entry.key.entryId}`); - activity.destinationUserId = entry.destinationUserId; - this.emit('ws-device-activity', activity); + if (found === -1) { + this._options.logger && this._options.logger(`Alexa-Remote: Activity for id ${entry.key.entryId} not found`); + } else { + lastFoundQueueIndex = queueIndex; + const activity = res.splice(found, 1)[0]; + this._options.logger && this._options.logger(`Alexa-Remote: Activity found entry ${found} for Activity ID ${entry.key.entryId}`); + activity.destinationUserId = entry.destinationUserId; + this.emit('ws-device-activity', activity); + } + } else { + const lastPushedActivity = this.lastPushedActivity[entry.deviceSerialNumber] || Date.now() - 30_000; + const found = res.findIndex(activity => activity.data.recordKey.endsWith(`#${entry.deviceSerialNumber}`) && activity.data.customerId === entry.destinationUserId && activity.creationTimestamp >= entry.activityTimestamp - 10_000 && activity.creationTimestamp > lastPushedActivity); // Only if current stuff is found + + if (found === -1) { + this._options.logger && this._options.logger(`Alexa-Remote: Activity for device ${entry.deviceSerialNumber} not found`); + } else { + const activity = res.splice(found, 1)[0]; + this._options.logger && this._options.logger(`Alexa-Remote: Activity (ts=${activity.creationTimestamp}) found entry ${found} for device ${entry.deviceSerialNumber}`); + activity.destinationUserId = entry.destinationUserId; + this.emit('ws-device-activity', activity); + if (activity.data.utteranceType !== 'WAKE_WORD_ONLY') { + this.lastPushedActivity[entry.deviceSerialNumber] = activity.creationTimestamp; + lastFoundQueueIndex = queueIndex; + } else { + this._options.logger && this._options.logger(`Alexa-Remote: Only Wakeword activity for device ${entry.deviceSerialNumber} found. try again in 2,5s`); + lastFoundQueueIndex = -2; + } + } } }); - if (lastFoundQueueIndex === -1) { + if (lastFoundQueueIndex < 0) { this._options.logger && this._options.logger(`Alexa-Remote: No activities from stored ${this.activityUpdateQueue.length} entries found in queue (${this.activityUpdateNotFoundCounter})`); this.activityUpdateNotFoundCounter++; - if (this.activityUpdateNotFoundCounter > 5) { + if ( + (lastFoundQueueIndex === -1 && this.activityUpdateNotFoundCounter > 2) || // 2 tries without wakeword + (lastFoundQueueIndex === -2 && this.activityUpdateNotFoundCounter > 5) // 5 tries with wakeword + ) { this._options.logger && this._options.logger('Alexa-Remote: Reset expected activities'); this.activityUpdateQueue = []; this.activityUpdateNotFoundCounter = 0; @@ -813,7 +891,7 @@ class AlexaRemote extends EventEmitter { this.activityUpdateTimeout = setTimeout(() => { this.activityUpdateTimeout = null; this.getPushedActivities(); - }, 300); + }, 2500); } @@ -1896,6 +1974,9 @@ class AlexaRemote extends EventEmitter { callback = options; options = {}; } + if (!options.forceRequest && this.activityUpdateQueue.length) { + return callback && callback(new Error('Activity update is running, please try again later.')); + } this.httpsGet (`https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records` + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + `&endTime=${options.endTime || Date.now() + 24 * 60 * 60 * 1000}` + diff --git a/package-lock.json b/package-lock.json index c1a085f6..3851d66d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,13 @@ "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "uuid": "^9.0.0", + "uuid": "^9.0.1", "ws": "^8.14.2" }, "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.50.0" + "eslint": "^8.52.0" }, "engines": { "node": ">=16.0.0" @@ -228,21 +228,21 @@ } }, "node_modules/@eslint/js": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", - "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", + "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -264,9 +264,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -317,6 +317,12 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -825,18 +831,19 @@ } }, "node_modules/eslint": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", - "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", + "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.50.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/js": "8.52.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -2520,9 +2527,13 @@ } }, "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { "uuid": "dist/bin/uuid" } @@ -2809,18 +2820,18 @@ } }, "@eslint/js": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", - "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", + "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" } @@ -2832,9 +2843,9 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "@nodelib/fs.scandir": { @@ -2876,6 +2887,12 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -3259,18 +3276,19 @@ "dev": true }, "eslint": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", - "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", + "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.50.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/js": "8.52.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -4504,9 +4522,9 @@ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" }, "vary": { "version": "1.1.2", diff --git a/package.json b/package.json index 4c231f6c..caef32b0 100644 --- a/package.json +++ b/package.json @@ -34,12 +34,12 @@ "querystring": "^0.2.1", "ws": "^8.14.2", "extend": "^3.0.2", - "uuid": "^9.0.0" + "uuid": "^9.0.1" }, "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.50.0" + "eslint": "^8.52.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 9e9476ada303efebf45a3f5dc6015dd8667d3349 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 27 Oct 2023 16:52:22 +0200 Subject: [PATCH 311/356] chore: release v6.2.0 * (Apollon77) Adjust Activity detection to work with recent Amazon changes --- README.md | 5 ++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e0d68b4c..d7e7699a 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,8 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ -* (Apollon77) Adjust Activity detection to work with recent Amazon changes +### 6.2.0 (2023-10-27) +* (Apollon77) Adjust Activity detection to work with recent Amazon changes ### 6.1.2 (2023-09-12) * (Apollon77) Optimize reconnection handling for push connections diff --git a/package-lock.json b/package-lock.json index 3851d66d..b387e8fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.1.2", + "version": "6.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.1.2", + "version": "6.2.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index caef32b0..7a5102c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.1.2", + "version": "6.2.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From df0a17190abfe7b585705b55c7baff624472e948 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 28 Oct 2023 00:07:24 +0200 Subject: [PATCH 312/356] * (Apollon77) Optimize activity detection to process all relevant entries and not just the last one --- README.md | 4 ++++ alexa-remote.js | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index d7e7699a..9707fdb9 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Optimize activity detection to process all relevant entries and not just the last one + ### 6.2.0 (2023-10-27) * (Apollon77) Adjust Activity detection to work with recent Amazon changes diff --git a/alexa-remote.js b/alexa-remote.js index 77015f6c..84718798 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -830,6 +830,7 @@ class AlexaRemote extends EventEmitter { this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false, forceRequest: true}, (err, res) => { this.activityUpdateRunning = false; if (!err && res) { + res.reverse(); this._options.logger && this._options.logger(`Alexa-Remote: Activity data ${JSON.stringify(res)}`); // TODO REMOVE let lastFoundQueueIndex = -1; From 53fdfa1cdf077f1a8d45c7271b039c96d951220e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 28 Oct 2023 00:07:43 +0200 Subject: [PATCH 313/356] chore: release v6.2.1 * (Apollon77) Optimize activity detection to process all relevant entries and not just the last one --- README.md | 5 ++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9707fdb9..5d9987b7 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,8 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ -* (Apollon77) Optimize activity detection to process all relevant entries and not just the last one +### 6.2.1 (2023-10-27) +* (Apollon77) Optimize activity detection to process all relevant entries and not just the last one ### 6.2.0 (2023-10-27) * (Apollon77) Adjust Activity detection to work with recent Amazon changes diff --git a/package-lock.json b/package-lock.json index b387e8fe..15fc0baf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.2.0", + "version": "6.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index 7a5102c7..49fec556 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.2.0", + "version": "6.2.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From feb1dfc909f8878bb1c67684fcb38a14bd420ddb Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 29 Oct 2023 09:53:13 +0100 Subject: [PATCH 314/356] * (Apollon77) Optimize activity detection to process all relevant entries in all cases --- README.md | 4 ++++ alexa-remote.js | 35 ++++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5d9987b7..2cd7237a 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Optimize activity detection to process all relevant entries in all cases + ### 6.2.1 (2023-10-27) * (Apollon77) Optimize activity detection to process all relevant entries and not just the last one diff --git a/alexa-remote.js b/alexa-remote.js index 84718798..4b183c68 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -842,28 +842,38 @@ class AlexaRemote extends EventEmitter { this._options.logger && this._options.logger(`Alexa-Remote: Activity for id ${entry.key.entryId} not found`); } else { lastFoundQueueIndex = queueIndex; + this.activityUpdateQueue.splice(0, lastFoundQueueIndex + 1); const activity = res.splice(found, 1)[0]; this._options.logger && this._options.logger(`Alexa-Remote: Activity found entry ${found} for Activity ID ${entry.key.entryId}`); activity.destinationUserId = entry.destinationUserId; this.emit('ws-device-activity', activity); } } else { - const lastPushedActivity = this.lastPushedActivity[entry.deviceSerialNumber] || Date.now() - 30_000; - const found = res.findIndex(activity => activity.data.recordKey.endsWith(`#${entry.deviceSerialNumber}`) && activity.data.customerId === entry.destinationUserId && activity.creationTimestamp >= entry.activityTimestamp - 10_000 && activity.creationTimestamp > lastPushedActivity); // Only if current stuff is found + const lastPushedActivity = this.lastPushedActivity[entry.deviceSerialNumber] || Date.now() - 30000; + const found = res.filter(activity => activity.data.recordKey.endsWith(`#${entry.deviceSerialNumber}`) && activity.data.customerId === entry.destinationUserId && activity.creationTimestamp >= entry.activityTimestamp - 10000 && activity.creationTimestamp > lastPushedActivity); // Only if current stuff is found - if (found === -1) { + if (found.length === 0) { this._options.logger && this._options.logger(`Alexa-Remote: Activity for device ${entry.deviceSerialNumber} not found`); } else { - const activity = res.splice(found, 1)[0]; - this._options.logger && this._options.logger(`Alexa-Remote: Activity (ts=${activity.creationTimestamp}) found entry ${found} for device ${entry.deviceSerialNumber}`); - activity.destinationUserId = entry.destinationUserId; - this.emit('ws-device-activity', activity); - if (activity.data.utteranceType !== 'WAKE_WORD_ONLY') { - this.lastPushedActivity[entry.deviceSerialNumber] = activity.creationTimestamp; + let foundSomething = false; + found.forEach((activity, index) => { + if (activity.data.utteranceType === 'WAKE_WORD_ONLY' && index === 0 && this.activityUpdateNotFoundCounter > 0 && found.length > 1) return; + this._options.logger && this._options.logger(`Alexa-Remote: Activity (ts=${activity.creationTimestamp}) found for device ${entry.deviceSerialNumber}`); + activity.destinationUserId = entry.destinationUserId; + this.emit('ws-device-activity', activity); + if (activity.data.utteranceType !== 'WAKE_WORD_ONLY') { + this.lastPushedActivity[entry.deviceSerialNumber] = activity.creationTimestamp; + foundSomething = true; + } else { + this._options.logger && this._options.logger(`Alexa-Remote: Only Wakeword activity for device ${entry.deviceSerialNumber} found. try again in 2,5s`); + if (!foundSomething) { + lastFoundQueueIndex = -2; + } + } + }); + if (foundSomething) { lastFoundQueueIndex = queueIndex; - } else { - this._options.logger && this._options.logger(`Alexa-Remote: Only Wakeword activity for device ${entry.deviceSerialNumber} found. try again in 2,5s`); - lastFoundQueueIndex = -2; + this.activityUpdateQueue.splice(queueIndex, 1); } } } @@ -883,7 +893,6 @@ class AlexaRemote extends EventEmitter { } else { this.activityUpdateNotFoundCounter = 0; - this.activityUpdateQueue.splice(0, lastFoundQueueIndex + 1); this._options.logger && this._options.logger(`Alexa-Remote: ${this.activityUpdateQueue.length} entries left in activity queue`); } } From 165035de2a6a71f37d2daec32059b9335db02ee5 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 29 Oct 2023 09:54:07 +0100 Subject: [PATCH 315/356] chore: release v6.2.2 * (Apollon77) Optimize activity detection to process all relevant entries in all cases --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2cd7237a..97cf8349 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 6.2.2 (2023-10-29) * (Apollon77) Optimize activity detection to process all relevant entries in all cases ### 6.2.1 (2023-10-27) diff --git a/package-lock.json b/package-lock.json index 15fc0baf..03f53931 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.2.1", + "version": "6.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.2.1", + "version": "6.2.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index 49fec556..4cc293a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.2.1", + "version": "6.2.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 690be7e72066daba6411d82ff51d2eb0a7637d22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 03:28:50 +0000 Subject: [PATCH 316/356] chore(deps): bump actions/setup-node from 3 to 4 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 068df561..352c90c2 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -64,7 +64,7 @@ jobs: uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} From 7178c1aae50e6789370abd9ab8f7e053111d05fd Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 8 Nov 2023 16:03:43 +0100 Subject: [PATCH 317/356] * (Apollon77) Optimize activity detection to process all relevant entries in all cases --- README.md | 4 ++++ alexa-remote.js | 28 +++++++++++++++++++++------- example/example.js | 1 + 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 97cf8349..a80e0397 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Add new option "autoQueryActivityOnTrigger" to activate the automatic activity triggering (default is off!) +* (Apollon77) Optimize Timing for activity queries + ### 6.2.2 (2023-10-29) * (Apollon77) Optimize activity detection to process all relevant entries in all cases diff --git a/alexa-remote.js b/alexa-remote.js index 4b183c68..d5b75c71 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -432,9 +432,10 @@ class AlexaRemote extends EventEmitter { } simulateActivity(deviceSerialNumber, destinationUserId) { + if (!this._options.autoQueryActivityOnTrigger) return; if (this.activityUpdateTimeout && this.activityUpdateQueue.some(entry => entry.deviceSerialNumber === deviceSerialNumber && entry.destinationUserId === destinationUserId)) return; - this._options.logger && this._options.logger(`Alexa-Remote: Simulate activity for ${deviceSerialNumber} with destinationUserId ${destinationUserId} ... fetch in 2s`); + this._options.logger && this._options.logger(`Alexa-Remote: Simulate activity for ${deviceSerialNumber} with destinationUserId ${destinationUserId} ... fetch in 3s`); if (this.activityUpdateTimeout) { clearTimeout(this.activityUpdateTimeout); @@ -448,7 +449,7 @@ class AlexaRemote extends EventEmitter { this.activityUpdateTimeout = setTimeout(() => { this.activityUpdateTimeout = null; this.getPushedActivities(); - }, 2500); + }, 4000); } initPushConnection() { @@ -824,12 +825,26 @@ class AlexaRemote extends EventEmitter { } getPushedActivities() { + if (!this._options.autoQueryActivityOnTrigger) return; this._options.logger && this._options.logger(`Alexa-Remote: Get pushed activities ... ${this.activityUpdateQueue.length} entries in queue (already running: ${this.activityUpdateRunning})`); if (this.activityUpdateRunning || !this.activityUpdateQueue.length) return; this.activityUpdateRunning = true; - this.getCustomerHistoryRecords({maxRecordSize: this.activityUpdateQueue.length + 2, filter: false, forceRequest: true}, (err, res) => { + let earliestActionDate = Date.now(); + this.activityUpdateQueue.forEach(entry => { + if (entry.activityTimestamp < earliestActionDate) earliestActionDate = entry.activityTimestamp; + }); + this.getCustomerHistoryRecords({ + maxRecordSize: this.activityUpdateQueue.length + 2, + filter: false, + forceRequest: true, + startTime: earliestActionDate - 60000, + }, (err, res) => { this.activityUpdateRunning = false; - if (!err && res) { + if (!res || (err && err.message.includes('no body'))) { + err = null; + res = []; + } + if (!err) { res.reverse(); this._options.logger && this._options.logger(`Alexa-Remote: Activity data ${JSON.stringify(res)}`); // TODO REMOVE @@ -901,8 +916,7 @@ class AlexaRemote extends EventEmitter { this.activityUpdateTimeout = setTimeout(() => { this.activityUpdateTimeout = null; this.getPushedActivities(); - }, 2500); - + }, 4000); } }); @@ -1042,7 +1056,7 @@ class AlexaRemote extends EventEmitter { } if (err || !body) { // Method 'DELETE' may return HTTP STATUS 200 without body - this._options.logger && this._options.logger('Alexa-Remote: Response: No body'); + this._options.logger && this._options.logger(`Alexa-Remote: Response: No body (code=${res && res.statusCode})`); return typeof res.statusCode === 'number' && res.statusCode >= 200 && res.statusCode < 300 ? callback(null, {'success': true}) : callback(new Error('no body'), null); } diff --git a/example/example.js b/example/example.js index 37c46f10..5610359d 100644 --- a/example/example.js +++ b/example/example.js @@ -39,6 +39,7 @@ alexa.init({ formerRegistrationData: { ... }, // optional/preferred: provide the result object from subsequent proxy usages (cookieData) here and some generated data will be reused for next proxy call too macDms: { ... }, // required since version 4.0 to use Push connection! Is returned in cookieData.macDms usePushConnectType: 1, // define which push connect type is used to initialize the push connection (type 1 is older but might work better than type 2) + autoQueryActivityOnTrigger: false, // optional: if true, alexa will query the activity on each - use with care and only if needed! }, function (err) { if (err) { From fa51a2cc5939736e7b252dd6491165bc85edd9fe Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 8 Nov 2023 16:03:54 +0100 Subject: [PATCH 318/356] chore: release v7.0.0 * (Apollon77) Add new option "autoQueryActivityOnTrigger" to activate the automatic activity triggering (default is off!) * (Apollon77) Optimize Timing for activity queries --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a80e0397..58200e95 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Then it should work again * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 7.0.0 (2023-11-08) * (Apollon77) Add new option "autoQueryActivityOnTrigger" to activate the automatic activity triggering (default is off!) * (Apollon77) Optimize Timing for activity queries diff --git a/package-lock.json b/package-lock.json index 03f53931..d2ddf5c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "6.2.2", + "version": "7.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "6.2.2", + "version": "7.0.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.0", diff --git a/package.json b/package.json index 4cc293a5..9e4f962f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "6.2.2", + "version": "7.0.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 3e677b5d9788e2ff8b47095ae38afdb3643ed7fe Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 10 Nov 2023 10:59:21 +0100 Subject: [PATCH 319/356] troubleshooting enhanced --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 58200e95..cd131aa5 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,14 @@ Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN. **All product and company names or logos are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or any associated subsidiaries! This personal project is maintained in spare time and has no business goal.** **ALEXA is a trademark of AMAZON TECHNOLOGIES, INC.** -## Example +## Troubleshooting -see example folder +### Issues when getting the cookie and tokens initially +If you still use the E-Mail or SMS based 2FA flow then this might not work. Please update the 2FA/OTP method in the amazon settings to the current process. -## Thanks: -Partly based on [Amazon Alexa Remote Control](http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html) (PLAIN shell) and [alexa-remote-control](https://github.com/thorsten-gehrig/alexa-remote-control) and [OpenHab-Addon](https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol) -Thank you for that work. +If you open the Proxy URL from a mobile device where also the Alexa App is installed on it might be that it do not work because Amazon might open the Alexa App. So please use a device or PC where the Alexa App is not installed -## Troubleshooting +If you see a page that tells you that "alexa.amazon.xx is deprecated" and you should use the alexa app and with a QR code on it when you enter the Proxy URL" then this means that you call the proxy URL ith a different IP/Domainname then you entered in the "proxy own IP" settings or you adjusted the IP shown in the Adapter configuration. The "proxy own IP" setting **needs to** match the IP/Domainname you use to call the proxy URL! ### Push Connections do not connect Sometimes it could happen that because of too many connection tries aAmazon blocks the push connection endpoint for a specific IP and "device". @@ -31,8 +30,15 @@ If the Push connection is never established then you can try to use the followin Then it should work again +## Example + +see example folder + +## Thanks: +Partly based on [Amazon Alexa Remote Control](http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html) (PLAIN shell) and [alexa-remote-control](https://github.com/thorsten-gehrig/alexa-remote-control) and [OpenHab-Addon](https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol) +Thank you for that work. + ## Known issues/Todos -* If you still use the SMS based 2FA flow then this might now work. Please update the 2fa method in the amazon settings to the current process. * getNotification works, changeNotification not ... maybe change is DELETE +Create :-) (+ source for createNotification: https://github.com/noelportugal/alexa-reminders/blob/master/alexa-reminders.js#L75, and Delete/create: https://github.com/openhab/openhab2-addons/blob/f54c9b85016758ff6d271b62d255bbe41a027928/addons/binding/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/Connection.java#L829) * docu docu docu (sorry ... will come) From b88f40221900de015430105f53f21fc69e504f61 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 24 Nov 2023 13:33:22 +0100 Subject: [PATCH 320/356] update --- README.md | 3 ++ alexa-http2push.js | 15 +++++- alexa-remote.js | 2 +- example/example.js | 12 +++-- package-lock.json | 127 +++++++++++++++++++++++++-------------------- package.json | 4 +- 6 files changed, 98 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index cd131aa5..af043e38 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Prevent some error/crash cases + ### 7.0.0 (2023-11-08) * (Apollon77) Add new option "autoQueryActivityOnTrigger" to activate the automatic activity triggering (default is off!) * (Apollon77) Optimize Timing for activity queries diff --git a/alexa-http2push.js b/alexa-http2push.js index 20f50140..de75c530 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -124,7 +124,14 @@ class AlexaHttp2Push extends EventEmitter { try { this.client = http2.connect(`https://${http2_options[':authority']}`, () => { - this.stream = this.client.request(http2_options); + if (!this.client) return; + try { + this.stream = this.client.request(http2_options); + } catch (error) { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Request ' + error.message); + this.emit('error', error); + return; + } this.stream.on('response', async (headers) => { if (headers[':status'] === 403) { @@ -155,7 +162,11 @@ class AlexaHttp2Push extends EventEmitter { if (!this.stream || !this.client) return; this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Send Ping'); //console.log('SEND: ' + msg.toString('hex')); - this.client.ping(() => onPingResponse(true)); + try { + this.client.ping(() => onPingResponse(true)); + } catch (error) { + this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Ping ' + error.message); + } this.pongTimeout = setTimeout(() => { this.pongTimeout = null; diff --git a/alexa-remote.js b/alexa-remote.js index d5b75c71..fb4ab3d2 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1998,7 +1998,7 @@ class AlexaRemote extends EventEmitter { callback = options; options = {}; } - if (!options.forceRequest && this.activityUpdateQueue.length) { + if (!options.forceRequest && this.activityUpdateQueue && this.activityUpdateQueue.length) { return callback && callback(new Error('Activity update is running, please try again later.')); } this.httpsGet (`https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records` + diff --git a/example/example.js b/example/example.js index 5610359d..4e644fdb 100644 --- a/example/example.js +++ b/example/example.js @@ -21,11 +21,15 @@ alexa.on('cookie', (cookie, csrf, macDms) => { alexa.init({ cookie: cookie, // cookie if already known, else can be generated using proxy proxyOnly: true, - proxyOwnIp: 'localhost', - proxyPort: 3001, + proxyOwnIp: 'localhost', // required if proxy enabled: provide the own IP with which you later access the proxy. + // Providing/Using a hostname here can lead to issues! + proxyPort: 3001, // optional: use this port for the proxy proxyLogLevel: 'info', bluetooth: true, logger: console.log, // optional + + // The following options are optional. Try without them first and just use really needed ones!! + alexaServiceHost: 'layla.amazon.de', // optional, e.g. "pitangui.amazon.com" for amazon.com, default is "layla.amazon.de" // userAgent: '...', // optional, override used user-Agent for all Requests and Cookie determination // acceptLanguage: '...', // optional, override Accept-Language-Header for cookie determination @@ -37,8 +41,8 @@ alexa.init({ apiUserAgentPostFix: '...', // optional: postfix to add to api useragent, leave empty to use a default one formerDataStorePath: '...', // optional: overwrite path where some of the formerRegistrationData are persisted to optimize against Amazon security measures formerRegistrationData: { ... }, // optional/preferred: provide the result object from subsequent proxy usages (cookieData) here and some generated data will be reused for next proxy call too - macDms: { ... }, // required since version 4.0 to use Push connection! Is returned in cookieData.macDms - usePushConnectType: 1, // define which push connect type is used to initialize the push connection (type 1 is older but might work better than type 2) + macDms: { ... }, // required in version 4.0 to use old Push connection! Is returned in cookieData.macDms, No longer needed since HTTP2-Push connection + usePushConnectType: 3, // define which push connect type is used to initialize the push connection (type 1 and 2 or outdated, defaults to 3 autoQueryActivityOnTrigger: false, // optional: if true, alexa will query the activity on each - use with care and only if needed! }, function (err) { diff --git a/package-lock.json b/package-lock.json index d2ddf5c1..f0932e31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "7.0.0", "license": "MIT", "dependencies": { - "alexa-cookie2": "^5.0.0", + "alexa-cookie2": "^5.0.1", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", @@ -19,7 +19,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.52.0" + "eslint": "^8.54.0" }, "engines": { "node": ">=16.0.0" @@ -205,9 +205,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -228,9 +228,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -336,9 +336,9 @@ } }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -385,11 +385,11 @@ } }, "node_modules/alexa-cookie2": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.0.tgz", - "integrity": "sha512-xzQcPAYb1KK5kkMt2jDjaKanpkKHqI75Qkb31R+204vVeAZHCtAVvTxnzY1DKLxtCO2DS/178WKHZy72D4s8Ew==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.1.tgz", + "integrity": "sha512-Ent7l6VS8RONay1fMQ5QZe9dOULjNEjjht0bEWNGii3mOozAlcg5lCNWeNONWl3Vpb10F8zUSZlxjyh32F1mIQ==", "dependencies": { - "cookie": "^0.5.0", + "cookie": "^0.6.0", "express": "^4.18.2", "http-proxy-middleware": "^2.0.6", "http-proxy-response-rewrite": "^0.0.1", @@ -400,6 +400,14 @@ "node": ">=16.0.0" } }, + "node_modules/alexa-cookie2/node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -831,15 +839,15 @@ } }, "node_modules/eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1343,9 +1351,9 @@ } }, "node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1509,9 +1517,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -2034,9 +2042,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -2803,9 +2811,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -2820,9 +2828,9 @@ } }, "@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true }, "@humanwhocodes/config-array": { @@ -2903,9 +2911,9 @@ } }, "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true }, "acorn-jsx": { @@ -2937,16 +2945,23 @@ } }, "alexa-cookie2": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.0.tgz", - "integrity": "sha512-xzQcPAYb1KK5kkMt2jDjaKanpkKHqI75Qkb31R+204vVeAZHCtAVvTxnzY1DKLxtCO2DS/178WKHZy72D4s8Ew==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.1.tgz", + "integrity": "sha512-Ent7l6VS8RONay1fMQ5QZe9dOULjNEjjht0bEWNGii3mOozAlcg5lCNWeNONWl3Vpb10F8zUSZlxjyh32F1mIQ==", "requires": { - "cookie": "^0.5.0", + "cookie": "^0.6.0", "express": "^4.18.2", "http-proxy-middleware": "^2.0.6", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.1" + }, + "dependencies": { + "cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" + } } }, "ansi-colors": { @@ -3276,15 +3291,15 @@ "dev": true }, "eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -3662,9 +3677,9 @@ } }, "globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3781,9 +3796,9 @@ } }, "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true }, "import-fresh": { @@ -4160,9 +4175,9 @@ } }, "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, "qs": { diff --git a/package.json b/package.json index 9e4f962f..a721ca0c 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^5.0.0", + "alexa-cookie2": "^5.0.1", "https": "^1.0.0", "querystring": "^0.2.1", "ws": "^8.14.2", @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.6.0", "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.52.0" + "eslint": "^8.54.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 5054e07b8a9f3fb4f4aaaf44e4c9d5a8f9d17576 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 24 Nov 2023 13:35:51 +0100 Subject: [PATCH 321/356] chore: release v7.0.1 * (Apollon77) Prevent some error/crash cases --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index af043e38..b3d06b18 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 7.0.1 (2023-11-24) * (Apollon77) Prevent some error/crash cases ### 7.0.0 (2023-11-08) diff --git a/package-lock.json b/package-lock.json index f0932e31..7e39be0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "7.0.0", + "version": "7.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "7.0.0", + "version": "7.0.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.1", diff --git a/package.json b/package.json index a721ca0c..4f295eee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "7.0.0", + "version": "7.0.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 0598d48b5a30c8bd491134f8bd774518c26ed7b7 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 25 Nov 2023 21:54:30 +0100 Subject: [PATCH 322/356] * (Apollon77) Adjust some texts --- README.md | 3 +++ package-lock.json | 14 +++++++------- package.json | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b3d06b18..75566117 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Adjust some texts + ### 7.0.1 (2023-11-24) * (Apollon77) Prevent some error/crash cases diff --git a/package-lock.json b/package-lock.json index 7e39be0a..b60bcfc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "7.0.1", "license": "MIT", "dependencies": { - "alexa-cookie2": "^5.0.1", + "alexa-cookie2": "^5.0.2", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", @@ -385,9 +385,9 @@ } }, "node_modules/alexa-cookie2": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.1.tgz", - "integrity": "sha512-Ent7l6VS8RONay1fMQ5QZe9dOULjNEjjht0bEWNGii3mOozAlcg5lCNWeNONWl3Vpb10F8zUSZlxjyh32F1mIQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.2.tgz", + "integrity": "sha512-FELHbhJ0DR5JA3o/c0utTv26V+Uo39UX+GIVHnZiy/RogthHFvBPwO9ir3sVXYOT+0FnpxVg4jKHzF1CCTkcJQ==", "dependencies": { "cookie": "^0.6.0", "express": "^4.18.2", @@ -2945,9 +2945,9 @@ } }, "alexa-cookie2": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.1.tgz", - "integrity": "sha512-Ent7l6VS8RONay1fMQ5QZe9dOULjNEjjht0bEWNGii3mOozAlcg5lCNWeNONWl3Vpb10F8zUSZlxjyh32F1mIQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.2.tgz", + "integrity": "sha512-FELHbhJ0DR5JA3o/c0utTv26V+Uo39UX+GIVHnZiy/RogthHFvBPwO9ir3sVXYOT+0FnpxVg4jKHzF1CCTkcJQ==", "requires": { "cookie": "^0.6.0", "express": "^4.18.2", diff --git a/package.json b/package.json index 4f295eee..dc65c02f 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^5.0.1", + "alexa-cookie2": "^5.0.2", "https": "^1.0.0", "querystring": "^0.2.1", "ws": "^8.14.2", From d03f25ca5eb18bdfffdd044d3f2fdc7620af1a97 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sat, 25 Nov 2023 21:56:00 +0100 Subject: [PATCH 323/356] chore: release v7.0.2 * (Apollon77) Adjust some texts --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 75566117..4202e126 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 7.0.2 (2023-11-25) * (Apollon77) Adjust some texts ### 7.0.1 (2023-11-24) diff --git a/package-lock.json b/package-lock.json index b60bcfc0..c9b4f1a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "7.0.1", + "version": "7.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "7.0.1", + "version": "7.0.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.2", diff --git a/package.json b/package.json index dc65c02f..8e35eec0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "7.0.1", + "version": "7.0.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From cb2123f6d9b70b8bf8008af8ede01985ad70f4e8 Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Thu, 21 Dec 2023 16:38:20 +0100 Subject: [PATCH 324/356] Hide "undefined" in the logging --- README.md | 12 ++++----- alexa-http2push.js | 62 +++++++++++++++++++++++++++------------------- package.json | 8 +++--- 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 4202e126..9ad61f13 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,18 @@ Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN. ## Troubleshooting ### Issues when getting the cookie and tokens initially -If you still use the E-Mail or SMS based 2FA flow then this might not work. Please update the 2FA/OTP method in the amazon settings to the current process. +If you still use the E-Mail or SMS based 2FA flow, then this might not work. Please update the 2FA/OTP method in the amazon settings to the current process. -If you open the Proxy URL from a mobile device where also the Alexa App is installed on it might be that it do not work because Amazon might open the Alexa App. So please use a device or PC where the Alexa App is not installed +If you open the Proxy URL from a mobile device where also the Alexa App is installed on, it might be that it does not work because Amazon might open the Alexa App. So please use a device or PC where the Alexa App is not installed -If you see a page that tells you that "alexa.amazon.xx is deprecated" and you should use the alexa app and with a QR code on it when you enter the Proxy URL" then this means that you call the proxy URL ith a different IP/Domainname then you entered in the "proxy own IP" settings or you adjusted the IP shown in the Adapter configuration. The "proxy own IP" setting **needs to** match the IP/Domainname you use to call the proxy URL! +If you see a page that tells you that "alexa.amazon.xx is deprecated" and you should use the alexa app and with a QR code on it when you enter the Proxy URL" then this means that you call the proxy URL ith a different IP/Domainname then you entered in the "proxy own IP" settings, or you adjusted the IP shown in the Adapter configuration. The "proxy own IP" setting **needs to** match the IP/Domainname you use to call the proxy URL! ### Push Connections do not connect Sometimes it could happen that because of too many connection tries aAmazon blocks the push connection endpoint for a specific IP and "device". -If the Push connection is never established then you can try to use the following: -* delete all cookie, formerRegistrationData and macDms from the settings -* lokale the location of the alexa-cookie2 library in your npm tree +If the Push connection is never established, then you can try to use the following: +* delete all cookies, formerRegistrationData and macDms from the settings +* locale the location of the alexa-cookie2 library in your npm tree * check if there is a file like .../alexa-cookie2/lib/formerDataStore.json - if existing please delete them * get new cookie via proxy diff --git a/alexa-http2push.js b/alexa-http2push.js index de75c530..6de3252b 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -45,7 +45,7 @@ class AlexaHttp2Push extends EventEmitter { this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Use host ${host}`); - const http2_options = { + const http2Options = { ':method': 'GET', ':path': '/v20160207/directives', ':authority': host, @@ -74,7 +74,7 @@ class AlexaHttp2Push extends EventEmitter { this.client = null; this.stream = null; this.connectionActive = false; - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Close: ' + code + ': ' + reason); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Close: ${code}: ${reason}`); if (this.initTimeout) { clearTimeout(this.initTimeout); this.initTimeout = null; @@ -87,17 +87,23 @@ class AlexaHttp2Push extends EventEmitter { clearTimeout(this.pongTimeout); this.pongTimeout = null; } - if (this.stop) return; + if (this.stop) { + return; + } if (this.errorRetryCounter > 100) { this.emit('disconnect', false, 'Too many failed retries. Check cookie and data'); return; - } else { - this.errorRetryCounter++; } + this.errorRetryCounter++; + const retryDelay = (immediateReconnect || this.errorRetryCounter === 1) ? 1 : Math.min(60, this.errorRetryCounter * 5); - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Retry Connection in ' + retryDelay + 's'); - this.emit('disconnect', true, `Retry Connection in ${retryDelay}s (${code}: ${reason})`); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Retry Connection in ${retryDelay}s`); + if (code !== undefined || reason !== undefined) { + this.emit('disconnect', true, `Retry Connection in ${retryDelay}s (${code}: ${reason})`); + } else { + this.emit('disconnect', true, `Retry Connection in ${retryDelay}s`); + } this.reconnectTimeout && clearTimeout(this.reconnectTimeout); this.reconnectTimeout = setTimeout(() => { this.reconnectTimeout = null; @@ -123,12 +129,14 @@ class AlexaHttp2Push extends EventEmitter { }; try { - this.client = http2.connect(`https://${http2_options[':authority']}`, () => { - if (!this.client) return; + this.client = http2.connect(`https://${http2Options[':authority']}`, () => { + if (!this.client) { + return; + } try { - this.stream = this.client.request(http2_options); + this.stream = this.client.request(http2Options); } catch (error) { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Request ' + error.message); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Error on Request ${error.message}`); this.emit('error', error); return; } @@ -142,8 +150,7 @@ class AlexaHttp2Push extends EventEmitter { } onHttp2Close(headers[':status'], undefined, this.errorRetryCounter < 3); }); - } - else if (headers[':status'] !== 200) { + } else if (headers[':status'] !== 200) { onHttp2Close(headers[':status']); } }); @@ -159,13 +166,15 @@ class AlexaHttp2Push extends EventEmitter { this.client.ping(() => onPingResponse(false)); this.pingPongInterval = setInterval(() => { - if (!this.stream || !this.client) return; + if (!this.stream || !this.client) { + return; + } this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Send Ping'); - //console.log('SEND: ' + msg.toString('hex')); + // console.log('SEND: ' + msg.toString('hex')); try { this.client.ping(() => onPingResponse(true)); } catch (error) { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Ping ' + error.message); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Error on Ping ${error.message}`); } this.pongTimeout = setTimeout(() => { @@ -202,11 +211,11 @@ class AlexaHttp2Push extends EventEmitter { const command = dataContent.command; const payload = JSON.parse(dataContent.payload); - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Command ' + command + ': ' + JSON.stringify(payload, null, 4)); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Command ${command}: ${JSON.stringify(payload, null, 4)}`); this.emit('command', command, payload); }); } catch (err) { - this.emit('unexpected-response', `Could not parse json: ${message} : ${err.message}`); + this.emit('unexpected-response', `Could not parse json: ${message}: ${err.message}`); } } }); @@ -214,7 +223,7 @@ class AlexaHttp2Push extends EventEmitter { this.stream.on('close', onHttp2Close); this.stream.on('error', (error) => { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Stream-Error: ' + error); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Stream-Error: ${error}`); this.emit('error', error); this.stream && this.stream.end(); this.client && this.client.close(); @@ -224,14 +233,14 @@ class AlexaHttp2Push extends EventEmitter { this.client.on('close', onHttp2Close); this.client.on('error', (error) => { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Client-Error: ' + error); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Client-Error: ${error}`); this.emit('error', error); this.stream && this.stream.end(); this.client && this.client.close(); }); } catch (err) { - this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Error on Init ' + err.message); + this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Error on Init ${err.message}`); this._options.logger && this._options.logger(err.stack); this.emit('error', err); return; @@ -244,9 +253,9 @@ class AlexaHttp2Push extends EventEmitter { this.stream && this.stream.end(); this.client && this.client.close(); } catch (err) { - //just make sure + // just make sure } - if (this.stream || !this.reconnectTimeout) { // seems no close was emitted so far?! + if (this.stream || !this.reconnectTimeout) { // it seems no close was emitted so far?! onHttp2Close(); } }, 30000); @@ -267,15 +276,16 @@ class AlexaHttp2Push extends EventEmitter { this.initTimeout = null; } this.stop = true; - if (!this.client && !this.stream) return; + if (!this.client && !this.stream) { + return; + } try { this.stream && this.stream.end(); this.client && this.client.close(); } catch (e) { - this.connectionActive && this._options.logger && this._options.logger('Alexa-Remote HTTP2-PUSH: Disconnect error: ' + e.message); + this.connectionActive && this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Disconnect error: ${e.message}`); } } } - module.exports = AlexaHttp2Push; diff --git a/package.json b/package.json index 8e35eec0..630ee11c 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,14 @@ "alexa-cookie2": "^5.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.14.2", + "ws": "^8.15.1", "extend": "^3.0.2", "uuid": "^9.0.1" }, "devDependencies": { - "@alcalzone/release-script": "^3.6.0", - "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.54.0" + "@alcalzone/release-script": "^3.7.0", + "@alcalzone/release-script-plugin-license": "^3.7.0", + "eslint": "^8.56.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From bfce41bf8c219dd2974db04e1fd2978cab3e542c Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Thu, 21 Dec 2023 16:50:10 +0100 Subject: [PATCH 325/356] Updated package-lock.json --- package-lock.json | 360 +++++++++++++++++++++++++--------------------- 1 file changed, 200 insertions(+), 160 deletions(-) diff --git a/package-lock.json b/package-lock.json index c9b4f1a4..1c7fd42a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,12 +14,12 @@ "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^9.0.1", - "ws": "^8.14.2" + "ws": "^8.15.1" }, "devDependencies": { - "@alcalzone/release-script": "^3.6.0", - "@alcalzone/release-script-plugin-license": "^3.5.9", - "eslint": "^8.54.0" + "@alcalzone/release-script": "^3.7.0", + "@alcalzone/release-script-plugin-license": "^3.7.0", + "eslint": "^8.56.0" }, "engines": { "node": ">=16.0.0" @@ -35,39 +35,55 @@ } }, "node_modules/@alcalzone/pak": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.1.tgz", - "integrity": "sha512-sPdxNxdXLH96kbyWLdIljVSIY2N6/qnPqkq5AlWvuizjGQUwHIUtWZHLss9XNDV/hY7YkgdIb9ILHbMTnRBxVQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.1.tgz", + "integrity": "sha512-h7XjOabYWFXWy4gv4KI1TZdzI/0oqe4bGZ2iyi7phldchCxf8+fgz3/ThGdQSd7oJMGJH+hmO1z/b9mb887bvg==", "dev": true, "dependencies": { - "axios": "^0.26.0", - "execa": "^5.0.0", - "fs-extra": "^10.0.1" + "axios": "^1.6.2", + "execa": "~5.0.1", + "fs-extra": "^10.1.0", + "semver": "^7.3.7", + "tiny-glob": "^0.2.9" } }, - "node_modules/@alcalzone/pak/node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "node_modules/@alcalzone/pak/node_modules/execa": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.1.tgz", + "integrity": "sha512-4hFTjFbFzQa3aCLobpbPJR/U+VoL1wdV5ozOWjeet0AWDeYr9UFGM1eUFWHX+VtOWFq4p0xXUXfW1YxUaP4fpw==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.8" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, "node_modules/@alcalzone/release-script": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.6.0.tgz", - "integrity": "sha512-i4Z6QAt5YGm6iM9EYHFCu8MbQ3wwhD2tNp14NxEe6dQnv86BNvikhxfgU4pOkJXW0El/7WgOkFeC9E4fFDBXug==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.7.0.tgz", + "integrity": "sha512-+aDCbmDLxySKxKEoG/qnwLThj1uZWU1vRkNFeCKtNdf6DLOAevzwMcNGl/6a+CTih4M5CBSoi20orYrjHqsmLg==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.9", - "@alcalzone/release-script-plugin-changelog": "3.5.9", - "@alcalzone/release-script-plugin-exec": "3.5.9", - "@alcalzone/release-script-plugin-git": "3.6.0", - "@alcalzone/release-script-plugin-package": "3.6.0", - "@alcalzone/release-script-plugin-version": "3.6.0", + "@alcalzone/release-script-core": "3.7.0", + "@alcalzone/release-script-plugin-changelog": "3.7.0", + "@alcalzone/release-script-plugin-exec": "3.7.0", + "@alcalzone/release-script-plugin-git": "3.7.0", + "@alcalzone/release-script-plugin-package": "3.7.0", + "@alcalzone/release-script-plugin-version": "3.7.0", "alcalzone-shared": "^4.0.1", - "axios": "^0.27.1", + "axios": "^1.6.2", "enquirer": "^2.3.6", "fs-extra": "^10.1.0", "picocolors": "1.0.0", @@ -83,9 +99,9 @@ } }, "node_modules/@alcalzone/release-script-core": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", - "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.7.0.tgz", + "integrity": "sha512-4np4dBziwX/aNRhS/gpK8bwa0wpLe7oomzJ7YTUXf5bUtV/UTpN2a9tm5Bp7ElnisKj6N3AqHl4lVXRo4L9hYg==", "dev": true, "dependencies": { "execa": "^5.1.1" @@ -95,12 +111,12 @@ } }, "node_modules/@alcalzone/release-script-plugin-changelog": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.9.tgz", - "integrity": "sha512-KmOMbjd7ta/Wl2OWQUxMpNza6Sr5/sB7AfV7BC0uCl839StnoivSjqywDfNcgJq97fxMs7hnGT/uYaz7oTUm7A==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.7.0.tgz", + "integrity": "sha512-AlLOIjIPP42uBmvcdYkfijYDzolyY6JmfbTmdxQDBLyrgYXnuUr2GaKxbpeWSbvcAuUhNvHCAyI6LI90X3OTEg==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0" }, @@ -109,12 +125,12 @@ } }, "node_modules/@alcalzone/release-script-plugin-exec": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.9.tgz", - "integrity": "sha512-Y6OM+gEpfYYoDvHdzNUtgVZiBAgOzGWZk9yRPF5l8UWE3+tQAyMWavk2m08ExbEICfGV1lb8lRBzAdQaf7/0HA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.7.0.tgz", + "integrity": "sha512-ZhlKGhxa71mLyYB1/ojzik2RKcSAeIjuwKzlWRd6oUvKoZPe7eAjLYneXx5viQC6tvDJE4dvN1NlkFGWsSlZYA==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1" }, "engines": { @@ -122,12 +138,12 @@ } }, "node_modules/@alcalzone/release-script-plugin-git": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.6.0.tgz", - "integrity": "sha512-dtGh+GWj6a9w4s/GupRxe28EnluvtXvmM60IbEI6diqXDilclE1baZsBsoLyIgA2mPxt+BJpHEe3bk/ysanbug==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.7.0.tgz", + "integrity": "sha512-4wA1XNnU7uyNnzXaLe4eBd1pfyk6VhVBuTzQ5EKraLNEXZ+JWWxeYMdcJGI6QdA1qAtld91gLRfLI1Ewye9ecQ==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "fs-extra": "^10.1.0" }, "engines": { @@ -135,12 +151,12 @@ } }, "node_modules/@alcalzone/release-script-plugin-license": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.9.tgz", - "integrity": "sha512-Wa+RN968zYK0ZNkkaIRfD3Ru2ndWLD5e+VNbah4krtoeHqvQDiOPlfcWM0McU8q3ud+AMPwhYEwR1mh2lwi0gg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.7.0.tgz", + "integrity": "sha512-HLnKHr3pc6NJJ7zAa8S/SdC305oEurnkRa9XNP5F6rgrixsxUiynBVh0tpPsVsOTdndm7fNIBRfR66IGnw0cag==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" }, @@ -149,13 +165,13 @@ } }, "node_modules/@alcalzone/release-script-plugin-package": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.6.0.tgz", - "integrity": "sha512-eISimXzdlRPMjuUoErwI78BbUO2ijU8ac9lEqzM+piYuuCbYmgr7QTH+r2omPQZiXxmRqUqiZ2/+3XSarAIUlg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.0.tgz", + "integrity": "sha512-eZSzE+Hbt6otxleIGBSkXUwspKTlYdKrV8Bp9jDm0ZwSTZ/0jt6zPjL/HfCeX2hd5JtjGc/YEzuHuDVv1fHi8A==", "dev": true, "dependencies": { - "@alcalzone/pak": "^0.8.1", - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/pak": "^0.10.1", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", "semver": "^7.5.2" @@ -165,12 +181,12 @@ } }, "node_modules/@alcalzone/release-script-plugin-version": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.6.0.tgz", - "integrity": "sha512-8bVigIbo4oTaA1bl8EpRN6QI2S2mR+G+zFEVj+3dlP5RtgB2JSNUtb91aEnijgaqrvDmy1WwuQP4Z9L7jmL0Pg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.7.0.tgz", + "integrity": "sha512-030NGQeB+mglVz/58cx0WO4QiFChaSd/pz35mnOrUc9PbKWRpzisTVOt4IhCV/++YiAVibJO31NMNzvipPdx4Q==", "dev": true, "dependencies": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", "semver": "^7.5.2", @@ -205,9 +221,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -228,9 +244,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -373,12 +389,12 @@ } }, "node_modules/alcalzone-shared": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.1.tgz", - "integrity": "sha512-6t0LFCIGvBG24grbV93Y1+MJjoyqgUpPOp/PkOcal1ZXXUUMEaZKPu6NfN6e3x5k2P2mnNaY2eXn/VmpWDLzYA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.8.tgz", + "integrity": "sha512-Rr0efCjNL9lw7miDvU8exL87Y42ehsLU2jUGNQUphhnlvxnTMrHeApWgoOSGZvsE2PhxC3KO7Z+VpQ/IbuV3aA==", "dev": true, "dependencies": { - "debug": "^4.3.2" + "debug": "^4.3.4" }, "engines": { "node": ">=12" @@ -459,13 +475,14 @@ "dev": true }, "node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/balanced-match": { @@ -839,15 +856,15 @@ } }, "node_modules/eslint": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.54.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1351,9 +1368,9 @@ } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2041,6 +2058,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -2320,9 +2343,9 @@ } }, "node_modules/signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "node_modules/source-map": { @@ -2593,9 +2616,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "version": "8.15.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", + "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", "engines": { "node": ">=10.0.0" }, @@ -2675,41 +2698,51 @@ "dev": true }, "@alcalzone/pak": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.8.1.tgz", - "integrity": "sha512-sPdxNxdXLH96kbyWLdIljVSIY2N6/qnPqkq5AlWvuizjGQUwHIUtWZHLss9XNDV/hY7YkgdIb9ILHbMTnRBxVQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.1.tgz", + "integrity": "sha512-h7XjOabYWFXWy4gv4KI1TZdzI/0oqe4bGZ2iyi7phldchCxf8+fgz3/ThGdQSd7oJMGJH+hmO1z/b9mb887bvg==", "dev": true, "requires": { - "axios": "^0.26.0", - "execa": "^5.0.0", - "fs-extra": "^10.0.1" + "axios": "^1.6.2", + "execa": "~5.0.1", + "fs-extra": "^10.1.0", + "semver": "^7.3.7", + "tiny-glob": "^0.2.9" }, "dependencies": { - "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "execa": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.1.tgz", + "integrity": "sha512-4hFTjFbFzQa3aCLobpbPJR/U+VoL1wdV5ozOWjeet0AWDeYr9UFGM1eUFWHX+VtOWFq4p0xXUXfW1YxUaP4fpw==", "dev": true, "requires": { - "follow-redirects": "^1.14.8" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" } } } }, "@alcalzone/release-script": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.6.0.tgz", - "integrity": "sha512-i4Z6QAt5YGm6iM9EYHFCu8MbQ3wwhD2tNp14NxEe6dQnv86BNvikhxfgU4pOkJXW0El/7WgOkFeC9E4fFDBXug==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.7.0.tgz", + "integrity": "sha512-+aDCbmDLxySKxKEoG/qnwLThj1uZWU1vRkNFeCKtNdf6DLOAevzwMcNGl/6a+CTih4M5CBSoi20orYrjHqsmLg==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.9", - "@alcalzone/release-script-plugin-changelog": "3.5.9", - "@alcalzone/release-script-plugin-exec": "3.5.9", - "@alcalzone/release-script-plugin-git": "3.6.0", - "@alcalzone/release-script-plugin-package": "3.6.0", - "@alcalzone/release-script-plugin-version": "3.6.0", + "@alcalzone/release-script-core": "3.7.0", + "@alcalzone/release-script-plugin-changelog": "3.7.0", + "@alcalzone/release-script-plugin-exec": "3.7.0", + "@alcalzone/release-script-plugin-git": "3.7.0", + "@alcalzone/release-script-plugin-package": "3.7.0", + "@alcalzone/release-script-plugin-version": "3.7.0", "alcalzone-shared": "^4.0.1", - "axios": "^0.27.1", + "axios": "^1.6.2", "enquirer": "^2.3.6", "fs-extra": "^10.1.0", "picocolors": "1.0.0", @@ -2719,76 +2752,76 @@ } }, "@alcalzone/release-script-core": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.5.9.tgz", - "integrity": "sha512-rRxosfZMtpDcIm+sPTdwP5oVRBLX1WLYImrp0nUhqOPNN/UD5l9TxNVXDhGUsstXhaRXXBYS2BnOQwR308OfyA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.7.0.tgz", + "integrity": "sha512-4np4dBziwX/aNRhS/gpK8bwa0wpLe7oomzJ7YTUXf5bUtV/UTpN2a9tm5Bp7ElnisKj6N3AqHl4lVXRo4L9hYg==", "dev": true, "requires": { "execa": "^5.1.1" } }, "@alcalzone/release-script-plugin-changelog": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.5.9.tgz", - "integrity": "sha512-KmOMbjd7ta/Wl2OWQUxMpNza6Sr5/sB7AfV7BC0uCl839StnoivSjqywDfNcgJq97fxMs7hnGT/uYaz7oTUm7A==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.7.0.tgz", + "integrity": "sha512-AlLOIjIPP42uBmvcdYkfijYDzolyY6JmfbTmdxQDBLyrgYXnuUr2GaKxbpeWSbvcAuUhNvHCAyI6LI90X3OTEg==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0" } }, "@alcalzone/release-script-plugin-exec": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.5.9.tgz", - "integrity": "sha512-Y6OM+gEpfYYoDvHdzNUtgVZiBAgOzGWZk9yRPF5l8UWE3+tQAyMWavk2m08ExbEICfGV1lb8lRBzAdQaf7/0HA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.7.0.tgz", + "integrity": "sha512-ZhlKGhxa71mLyYB1/ojzik2RKcSAeIjuwKzlWRd6oUvKoZPe7eAjLYneXx5viQC6tvDJE4dvN1NlkFGWsSlZYA==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1" } }, "@alcalzone/release-script-plugin-git": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.6.0.tgz", - "integrity": "sha512-dtGh+GWj6a9w4s/GupRxe28EnluvtXvmM60IbEI6diqXDilclE1baZsBsoLyIgA2mPxt+BJpHEe3bk/ysanbug==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.7.0.tgz", + "integrity": "sha512-4wA1XNnU7uyNnzXaLe4eBd1pfyk6VhVBuTzQ5EKraLNEXZ+JWWxeYMdcJGI6QdA1qAtld91gLRfLI1Ewye9ecQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "fs-extra": "^10.1.0" } }, "@alcalzone/release-script-plugin-license": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.9.tgz", - "integrity": "sha512-Wa+RN968zYK0ZNkkaIRfD3Ru2ndWLD5e+VNbah4krtoeHqvQDiOPlfcWM0McU8q3ud+AMPwhYEwR1mh2lwi0gg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.7.0.tgz", + "integrity": "sha512-HLnKHr3pc6NJJ7zAa8S/SdC305oEurnkRa9XNP5F6rgrixsxUiynBVh0tpPsVsOTdndm7fNIBRfR66IGnw0cag==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" } }, "@alcalzone/release-script-plugin-package": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.6.0.tgz", - "integrity": "sha512-eISimXzdlRPMjuUoErwI78BbUO2ijU8ac9lEqzM+piYuuCbYmgr7QTH+r2omPQZiXxmRqUqiZ2/+3XSarAIUlg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.0.tgz", + "integrity": "sha512-eZSzE+Hbt6otxleIGBSkXUwspKTlYdKrV8Bp9jDm0ZwSTZ/0jt6zPjL/HfCeX2hd5JtjGc/YEzuHuDVv1fHi8A==", "dev": true, "requires": { - "@alcalzone/pak": "^0.8.1", - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/pak": "^0.10.1", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", "semver": "^7.5.2" } }, "@alcalzone/release-script-plugin-version": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.6.0.tgz", - "integrity": "sha512-8bVigIbo4oTaA1bl8EpRN6QI2S2mR+G+zFEVj+3dlP5RtgB2JSNUtb91aEnijgaqrvDmy1WwuQP4Z9L7jmL0Pg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.7.0.tgz", + "integrity": "sha512-030NGQeB+mglVz/58cx0WO4QiFChaSd/pz35mnOrUc9PbKWRpzisTVOt4IhCV/++YiAVibJO31NMNzvipPdx4Q==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.5.9", + "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", "fs-extra": "^10.1.0", "semver": "^7.5.2", @@ -2811,9 +2844,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -2828,9 +2861,9 @@ } }, "@eslint/js": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true }, "@humanwhocodes/config-array": { @@ -2936,12 +2969,12 @@ } }, "alcalzone-shared": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.1.tgz", - "integrity": "sha512-6t0LFCIGvBG24grbV93Y1+MJjoyqgUpPOp/PkOcal1ZXXUUMEaZKPu6NfN6e3x5k2P2mnNaY2eXn/VmpWDLzYA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.8.tgz", + "integrity": "sha512-Rr0efCjNL9lw7miDvU8exL87Y42ehsLU2jUGNQUphhnlvxnTMrHeApWgoOSGZvsE2PhxC3KO7Z+VpQ/IbuV3aA==", "dev": true, "requires": { - "debug": "^4.3.2" + "debug": "^4.3.4" } }, "alexa-cookie2": { @@ -3003,13 +3036,14 @@ "dev": true }, "axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dev": true, "requires": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "balanced-match": { @@ -3291,15 +3325,15 @@ "dev": true }, "eslint": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.54.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -3677,9 +3711,9 @@ } }, "globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -4174,6 +4208,12 @@ "ipaddr.js": "1.9.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -4373,9 +4413,9 @@ } }, "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "source-map": { @@ -4573,9 +4613,9 @@ "dev": true }, "ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "version": "8.15.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", + "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", "requires": {} }, "y18n": { From ee80f50fd2dfa92ff1af6037de90b42a2035aa0c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 25 Jan 2024 09:17:30 +0100 Subject: [PATCH 326/356] deps --- LICENSE | 2 +- package-lock.json | 14 +++++++------- package.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LICENSE b/LICENSE index 59ba3bef..cdd8dafa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018-2023 Apollon77 +Copyright (c) 2018-2024 Apollon77 Copyright (c) 2015-2017 soef Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/package-lock.json b/package-lock.json index 1c7fd42a..2123260d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^9.0.1", - "ws": "^8.15.1" + "ws": "^8.16.0" }, "devDependencies": { "@alcalzone/release-script": "^3.7.0", @@ -2616,9 +2616,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.15.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", - "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "engines": { "node": ">=10.0.0" }, @@ -4613,9 +4613,9 @@ "dev": true }, "ws": { - "version": "8.15.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", - "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index 630ee11c..7b1b20e6 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "alexa-cookie2": "^5.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.15.1", + "ws": "^8.16.0", "extend": "^3.0.2", "uuid": "^9.0.1" }, From 7f50e068856d7de0aa0a725adb6be540d22cc178 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 25 Jan 2024 09:18:02 +0100 Subject: [PATCH 327/356] * (Apollon77) Adjust Activity Record query to newest Amazon adjustments --- README.md | 3 + alexa-remote.js | 240 ++++++++++++++++++++++++++++-------------------- 2 files changed, 144 insertions(+), 99 deletions(-) diff --git a/README.md b/README.md index 9ad61f13..12a86982 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: +### __WORK IN PROGRESS__ +* (Apollon77) Adjust Activity Record query to newest Amazon adjustments + ### 7.0.2 (2023-11-25) * (Apollon77) Adjust some texts diff --git a/alexa-remote.js b/alexa-remote.js index fb4ab3d2..7d7e11f7 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -40,6 +40,10 @@ class AlexaRemote extends EventEmitter { this.authApiBearerToken = null; this.authApiBearerExpiry = null; + this.activityCsrfToken = null; + this.activityCsrfTokenExpiry = null; + this.activityCsrfTokenReferer = null; + this.lastVolumes = {}; this.lastEqualizer = {}; this.lastPushedActivity = {}; @@ -1060,6 +1064,10 @@ class AlexaRemote extends EventEmitter { return typeof res.statusCode === 'number' && res.statusCode >= 200 && res.statusCode < 300 ? callback(null, {'success': true}) : callback(new Error('no body'), null); } + if (flags && flags.handleAsText) { + return callback(null, body); + } + let ret; try { ret = JSON.parse(body); @@ -1993,6 +2001,121 @@ class AlexaRemote extends EventEmitter { ); } + _getCustomerHistoryRecords(options, callback) { + let url = `https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records-v2` + + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + + `&endTime=${options.endTime || Date.now() + 24 * 60 * 60 * 1000}`; + if (options.recordType && options.recordType !== 'VOICE_HISTORY') { + url += `&pageType=${options.recordType}`; + } + //ignoring maxSize for now and just take the 10 that are returned. `&maxRecordSize=${options.maxRecordSize || 1}`, + this.httpsGet( + url, + (err, result) => { + if (err || !result) return callback/*.length >= 2*/ && callback(err, result); + + const ret = []; + if (result.customerHistoryRecords) { + for (let r = 0; r < result.customerHistoryRecords.length; r++) { + const res = result.customerHistoryRecords[r]; + const o = { + data: res + }; + const convParts = {}; + if (res.voiceHistoryRecordItems && Array.isArray(res.voiceHistoryRecordItems)) { + res.voiceHistoryRecordItems.forEach(item => { + convParts[item.recordItemType] = convParts[item.recordItemType] || []; + convParts[item.recordItemType].push(item); + }); + o.conversionDetails = convParts; + } + + const recordKey = res.recordKey.split('#'); // A3NSX4MMJVG96V#1612297041815#A1RABVCI4QCIKC#G0911W0793360TLG + + o.deviceType = recordKey[2] || null; + //o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; + o.creationTimestamp = res.timestamp || null; + //o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED + + o.deviceSerialNumber = recordKey[3]; + if (!this.serialNumbers[o.deviceSerialNumber]) continue; + o.name = this.serialNumbers[o.deviceSerialNumber].accountName; + const dev = this.find(o.deviceSerialNumber); + const wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; + + o.description = {'summary': ''}; + if (convParts.CUSTOMER_TRANSCRIPT || convParts.ASR_REPLACEMENT_TEXT) { + if (convParts.CUSTOMER_TRANSCRIPT) { + convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { + let text = trans.transcriptText; + if (wakeWord && text.startsWith(wakeWord)) { + text = text.substr(wakeWord.length).trim(); + } else if (text.startsWith('alexa')) { + text = text.substr(5).trim(); + } + o.description.summary += `${text}, `; + }); + } + if (convParts.ASR_REPLACEMENT_TEXT) { + convParts.ASR_REPLACEMENT_TEXT.forEach(trans => { + let text = trans.transcriptText; + if (wakeWord && text.startsWith(wakeWord)) { + text = text.substr(wakeWord.length).trim(); + } else if (text.startsWith('alexa')) { + text = text.substr(5).trim(); + } + o.description.summary += `${text}, `; + }); + } + o.description.summary = o.description.summary.substring(0, o.description.summary.length - 2).trim(); + } + o.alexaResponse = ''; + if (convParts.ALEXA_RESPONSE || convParts.TTS_REPLACEMENT_TEXT) { + if (convParts.ALEXA_RESPONSE) { + convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += `${trans.transcriptText}, `); + } + if (convParts.TTS_REPLACEMENT_TEXT) { + convParts.TTS_REPLACEMENT_TEXT.forEach(trans => o.alexaResponse += `${trans.transcriptText}, `); + } + o.alexaResponse = o.alexaResponse.substring(0, o.alexaResponse.length - 2).trim(); + } + if (options.filter) { + if (!o.description || !o.description.summary.length) continue; + + if (res.utteranceType === 'WAKE_WORD_ONLY') { + continue; + } + + switch (o.description.summary) { + case 'stopp': + case 'alexa': + case 'echo': + case 'computer': + case 'amazon': + case 'ziggy': + case ',': + case '': + continue; + } + } + + if (o.description.summary || !options.filter) ret.push(o); + } + } + if (typeof callback === 'function') return callback (err, ret); + }, + { + headers: { + 'authority': `www.${this._options.amazonPage}`, + 'anti-csrftoken-a2z': this.activityCsrfToken, + 'referer': this.activityCsrfTokenReferer + }, + method: 'POST', + data: '{"previousRequestToken": null}' + } + ); + } + getCustomerHistoryRecords(options, callback) { if (typeof options === 'function') { callback = options; @@ -2001,110 +2124,29 @@ class AlexaRemote extends EventEmitter { if (!options.forceRequest && this.activityUpdateQueue && this.activityUpdateQueue.length) { return callback && callback(new Error('Activity update is running, please try again later.')); } - this.httpsGet (`https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records` + - `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + - `&endTime=${options.endTime || Date.now() + 24 * 60 * 60 * 1000}` + - `&recordType=${options.recordType || 'VOICE_HISTORY'}` + - `&maxRecordSize=${options.maxRecordSize || 1}`, - (err, result) => { - if (err || !result) return callback/*.length >= 2*/ && callback(err, result); - const ret = []; - if (result.customerHistoryRecords) { - for (let r = 0; r < result.customerHistoryRecords.length; r++) { - const res = result.customerHistoryRecords[r]; - const o = { - data: res - }; - const convParts = {}; - if (res.voiceHistoryRecordItems && Array.isArray(res.voiceHistoryRecordItems)) { - res.voiceHistoryRecordItems.forEach(item => { - convParts[item.recordItemType] = convParts[item.recordItemType] || []; - convParts[item.recordItemType].push(item); - }); - o.conversionDetails = convParts; - } + if (this.activityCsrfToken && this.activityCsrfTokenExpiry > Date.now()) { + return this._getCustomerHistoryRecords(options, callback); + } - const recordKey = res.recordKey.split('#'); // A3NSX4MMJVG96V#1612297041815#A1RABVCI4QCIKC#G0911W0793360TLG - - o.deviceType = recordKey[2] || null; - //o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; - o.creationTimestamp = res.timestamp || null; - //o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED - - o.deviceSerialNumber = recordKey[3]; - if (!this.serialNumbers[o.deviceSerialNumber]) continue; - o.name = this.serialNumbers[o.deviceSerialNumber].accountName; - const dev = this.find(o.deviceSerialNumber); - const wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; - - o.description = {'summary': ''}; - if (convParts.CUSTOMER_TRANSCRIPT || convParts.ASR_REPLACEMENT_TEXT) { - if (convParts.CUSTOMER_TRANSCRIPT) { - convParts.CUSTOMER_TRANSCRIPT.forEach(trans => { - let text = trans.transcriptText; - if (wakeWord && text.startsWith(wakeWord)) { - text = text.substr(wakeWord.length).trim(); - } else if (text.startsWith('alexa')) { - text = text.substr(5).trim(); - } - o.description.summary += `${text}, `; - }); - } - if (convParts.ASR_REPLACEMENT_TEXT) { - convParts.ASR_REPLACEMENT_TEXT.forEach(trans => { - let text = trans.transcriptText; - if (wakeWord && text.startsWith(wakeWord)) { - text = text.substr(wakeWord.length).trim(); - } else if (text.startsWith('alexa')) { - text = text.substr(5).trim(); - } - o.description.summary += `${text}, `; - }); - } - o.description.summary = o.description.summary.substring(0, o.description.summary.length - 2).trim(); - } - o.alexaResponse = ''; - if (convParts.ALEXA_RESPONSE || convParts.TTS_REPLACEMENT_TEXT) { - if (convParts.ALEXA_RESPONSE) { - convParts.ALEXA_RESPONSE.forEach(trans => o.alexaResponse += `${trans.transcriptText}, `); - } - if (convParts.TTS_REPLACEMENT_TEXT) { - convParts.TTS_REPLACEMENT_TEXT.forEach(trans => o.alexaResponse += `${trans.transcriptText}, `); - } - o.alexaResponse = o.alexaResponse.substring(0, o.alexaResponse.length - 2).trim(); - } - if (options.filter) { - if (!o.description || !o.description.summary.length) continue; + const csrfPageUrl = `https://www.${this._options.amazonPage}/alexa-privacy/apd/activity?ref=activityHistory`; // disableGlobalNav=true&locale=de-DE + this.httpsGet(csrfPageUrl, (err, result) => { + if (err || !result) return callback && callback(err, result); - if (res.utteranceType === 'WAKE_WORD_ONLY') { - continue; - } + const regex = /meta name="csrf-token" content="([^"]+)"/g; + const csrfTokenRes = regex.exec(result); + if (csrfTokenRes && csrfTokenRes[1]) { + this.activityCsrfToken = csrfTokenRes[1]; + this.activityCsrfTokenExpiry = Date.now() + 2 * 60 * 60 * 1000; + this.activityCsrfTokenReferer = csrfPageUrl; - switch (o.description.summary) { - case 'stopp': - case 'alexa': - case 'echo': - case 'computer': - case 'amazon': - case 'ziggy': - case ',': - case '': - continue; - } - } - - if (o.description.summary || !options.filter) ret.push(o); - } - } - if (typeof callback === 'function') return callback (err, ret); - }, - { - headers: { - 'authority': 'www.amazon.de' + this._getCustomerHistoryRecords(options, callback); + } else { + return callback/*.length >= 2*/ && callback(new Error('CSRF Page has no token'), result); } - } - ); + }, { + handleAsText: true + }); } getAccount(includeActors, callback) { From 1e4d75ca77c7e1d0ba7f4e0662e87dcdb0dfa104 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 25 Jan 2024 09:19:35 +0100 Subject: [PATCH 328/356] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12a86982..b2b3cdad 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Thank you for that work. ## Changelog: ### __WORK IN PROGRESS__ -* (Apollon77) Adjust Activity Record query to newest Amazon adjustments +* (Apollon77) Adjust Activity Record query to newest Amazon changes ### 7.0.2 (2023-11-25) * (Apollon77) Adjust some texts From c103641a4805e6795b3b025c0dd819dc15fdcd28 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 25 Jan 2024 09:27:51 +0100 Subject: [PATCH 329/356] gha --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 352c90c2..8d928487 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - uses: actions/checkout@v4 @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - name: Checkout code From e2ae2da4de8b536311d86be5f1a8c7d6a75eb515 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 25 Jan 2024 09:28:41 +0100 Subject: [PATCH 330/356] chore: release v7.0.3 * (Apollon77) Adjust Activity Record query to newest Amazon changes --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2b3cdad..406d6498 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 7.0.3 (2024-01-25) * (Apollon77) Adjust Activity Record query to newest Amazon changes ### 7.0.2 (2023-11-25) diff --git a/package-lock.json b/package-lock.json index 2123260d..5db541c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "7.0.2", + "version": "7.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "7.0.2", + "version": "7.0.3", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.2", diff --git a/package.json b/package.json index 7b1b20e6..35771f97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "7.0.2", + "version": "7.0.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 13190bfeb88452c33c740d3daa89c0574f6b6cc6 Mon Sep 17 00:00:00 2001 From: Nebz <28622481+NebzHB@users.noreply.github.com> Date: Sat, 3 Feb 2024 09:12:51 +0100 Subject: [PATCH 331/356] fix missing amazonPage reference instead of amazon.de --- alexa-remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.js b/alexa-remote.js index 7d7e11f7..bec85285 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -949,7 +949,7 @@ class AlexaRemote extends EventEmitter { getAuthApiBearerToken(callback) { if (!this.alexaCookie) this.alexaCookie = require('alexa-cookie2'); const deviceAppName = (this._options.formerRegistrationData && this._options.formerRegistrationData.deviceAppName) || this.alexaCookie.getDeviceAppName(); // Use the App Name from last cookie response or use default one - this.httpsGet(true, 'https://api.amazon.de/auth/token', (err, res) => { + this.httpsGet(true, `https://api.${this._options.amazonPage}/auth/token`, (err, res) => { if (err) { this._options.logger && this._options.logger(`Alexa-Remote: Error getting auth token: ${err.message}`); callback(err); From 0e49fd55bf0c425f8396a120591b9542974ce8b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 02:17:08 +0000 Subject: [PATCH 332/356] chore(deps): bump softprops/action-gh-release from 1 to 2 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 8d928487..04582d7e 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -97,7 +97,7 @@ jobs: npm publish ${{ steps.extract_release.outputs.TAG }} - name: Create Github Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 8132e1c48ca97629f2e8bb174ce744d21e8cb2b2 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 16 Apr 2024 21:28:46 +0200 Subject: [PATCH 333/356] * (Apollon77) Adjust Activity Record query to Amazon changes --- README.md | 5 ++++ alexa-remote.js | 25 +++++++++++++----- package-lock.json | 66 +++++++++++++++++++++++------------------------ package.json | 2 +- 4 files changed, 58 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 406d6498..95e04a39 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,11 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Adjust Activity Record query to Amazon changes +* (NebzHB) fix missing amazonPage reference instead of amazon.de + ### 7.0.3 (2024-01-25) * (Apollon77) Adjust Activity Record query to newest Amazon changes diff --git a/alexa-remote.js b/alexa-remote.js index bec85285..efe4e076 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -10,7 +10,7 @@ const fsPath = require('path'); const EventEmitter = require('events'); -const officialUserAgent = 'AppleWebKit PitanguiBridge/2.2.556530.0-[HARDWARE=iPhone14_7][SOFTWARE=16.6][DEVICE=iPhone]'; +const officialUserAgent = 'AppleWebKit PitanguiBridge/2.2.595606.0-[HARDWARE=iPhone14_7][SOFTWARE=17.4.1][DEVICE=iPhone]'; function _00(val) { let s = val.toString(); @@ -651,13 +651,18 @@ class AlexaRemote extends EventEmitter { ( this.lastVolumes[payload.dopplerId.deviceSerialNumber].volumeSetting === payload.volumeSetting && this.lastVolumes[payload.dopplerId.deviceSerialNumber].isMuted === payload.isMuted + ) || + ( + this.lastEqualizer[payload.dopplerId.deviceSerialNumber] && + Math.abs(Date.now() - this.lastEqualizer[payload.dopplerId.deviceSerialNumber].updated) < 2000 ) ) { this.simulateActivity(payload.dopplerId.deviceSerialNumber, payload.destinationUserId); } this.lastVolumes[payload.dopplerId.deviceSerialNumber] = { volumeSetting: payload.volumeSetting, - isMuted: payload.isMuted + isMuted: payload.isMuted, + updated: Date.now() }; this.emit('ws-volume-change', { @@ -706,6 +711,10 @@ class AlexaRemote extends EventEmitter { this.lastEqualizer[payload.dopplerId.deviceSerialNumber].bass === payload.bass && this.lastEqualizer[payload.dopplerId.deviceSerialNumber].treble === payload.treble && this.lastEqualizer[payload.dopplerId.deviceSerialNumber].midrange === payload.midrange + ) || + ( + this.lastVolumes[payload.dopplerId.deviceSerialNumber] && + Math.abs(Date.now() - this.lastVolumes[payload.dopplerId.deviceSerialNumber].updated) < 2000 ) ) { this.simulateActivity(payload.dopplerId.deviceSerialNumber, payload.destinationUserId); @@ -713,7 +722,8 @@ class AlexaRemote extends EventEmitter { this.lastEqualizer[payload.dopplerId.deviceSerialNumber] = { bass: payload.bass, treble: payload.treble, - midrange: payload.midrange + midrange: payload.midrange, + updated: Date.now() }; this.emit('ws-equilizer-state-change', { @@ -1122,10 +1132,9 @@ class AlexaRemote extends EventEmitter { 'User-Agent' : `${officialUserAgent} ${this._options.apiUserAgentPostfix}`.trim(), 'Content-Type': 'application/json; charset=utf-8', 'Accept': 'application/json; charset=utf-8', + 'Accept-Language': this._options.acceptLanguage || 'de-DE', 'Referer': `https://alexa.${this._options.amazonPage}/spa/index.html`, 'Origin': `https://alexa.${this._options.amazonPage}`, - //'Content-Type': 'application/json', - //'Connection': 'keep-alive', 'csrf' : this.csrf, 'Cookie' : this.cookie, 'Accept-Encoding': 'gzip, deflate' @@ -1153,6 +1162,10 @@ class AlexaRemote extends EventEmitter { options.path = path; options.method = flags.method ? flags.method : flags.data ? 'POST' : 'GET'; + if ((options.method === 'GET' || options.method === 'DELETE') && !flags.data) { + delete options.headers['Content-Type']; + } + if (flags.headers) Object.keys(flags.headers).forEach(n => { options.headers [n] = flags.headers[n]; }); @@ -2129,7 +2142,7 @@ class AlexaRemote extends EventEmitter { return this._getCustomerHistoryRecords(options, callback); } - const csrfPageUrl = `https://www.${this._options.amazonPage}/alexa-privacy/apd/activity?ref=activityHistory`; // disableGlobalNav=true&locale=de-DE + const csrfPageUrl = `https://www.${this._options.amazonPage}/alexa-privacy/apd/activity?disableGlobalNav=true&ref=activityHistory`; // disableGlobalNav=true&locale=de-DE this.httpsGet(csrfPageUrl, (err, result) => { if (err || !result) return callback && callback(err, result); diff --git a/package-lock.json b/package-lock.json index 5db541c6..b7c4b85b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.7.0", "@alcalzone/release-script-plugin-license": "^3.7.0", - "eslint": "^8.56.0" + "eslint": "^8.57.0" }, "engines": { "node": ">=16.0.0" @@ -244,22 +244,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -280,9 +280,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -856,16 +856,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -2861,19 +2861,19 @@ } }, "@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" } }, @@ -2884,9 +2884,9 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "@nodelib/fs.scandir": { @@ -3325,16 +3325,16 @@ "dev": true }, "eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", diff --git a/package.json b/package.json index 35771f97..886341ae 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@alcalzone/release-script": "^3.7.0", "@alcalzone/release-script-plugin-license": "^3.7.0", - "eslint": "^8.56.0" + "eslint": "^8.57.0" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From 3e132dcabebaeb7ea262a366cb4af46ec2532574 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 16 Apr 2024 21:30:38 +0200 Subject: [PATCH 334/356] chore: release v7.0.4 * (Apollon77) Adjust Activity Record query to Amazon changes * (NebzHB) fix missing amazonPage reference instead of amazon.de --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 95e04a39..5215cc3a 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 7.0.4 (2024-04-16) * (Apollon77) Adjust Activity Record query to Amazon changes * (NebzHB) fix missing amazonPage reference instead of amazon.de diff --git a/package-lock.json b/package-lock.json index b7c4b85b..ec0fa443 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "7.0.3", + "version": "7.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "7.0.3", + "version": "7.0.4", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.2", diff --git a/package.json b/package.json index 886341ae..17b5573b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "7.0.3", + "version": "7.0.4", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 6205bde4858885c7c7cdcf1aed1f34ea96c98ae1 Mon Sep 17 00:00:00 2001 From: beothorn Date: Sun, 14 Jul 2024 13:49:18 +0200 Subject: [PATCH 335/356] Names is returning Serial and not string --- alexa-remote.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index dc6414b9..47cc656a 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -278,7 +278,7 @@ declare module "alexa-remote2" { cookieData?: string; baseUrl: string; friendlyNames: Record; - names: Record; + names: Record; lastAuthCheck: number | null; setCookie(_cookie: string): void; From 7d57121826305da3df2604b6b66bb722a886d128 Mon Sep 17 00:00:00 2001 From: Daniel <49846893+danielbrunt57@users.noreply.github.com> Date: Sat, 19 Oct 2024 04:35:47 -0700 Subject: [PATCH 336/356] Add additional Amazon domains for host connection lookup 'amazon.ca', 'amazon.com.mx': host: 'bob-dispatch-prod-na.amazon.com' 'amazon.com.in', 'amazon.co.nz': host: 'bob-dispatch-prod-fe.amazon.com' --- alexa-http2push.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/alexa-http2push.js b/alexa-http2push.js index 6de3252b..1535b29d 100755 --- a/alexa-http2push.js +++ b/alexa-http2push.js @@ -35,12 +35,20 @@ class AlexaHttp2Push extends EventEmitter { host = this._options.pushDispatchHost; } else if (this._options.amazonPage === 'amazon.com') { host = 'bob-dispatch-prod-na.amazon.com'; + } else if (this._options.amazonPage === 'amazon.ca') { + host = 'bob-dispatch-prod-na.amazon.com'; + } else if (this._options.amazonPage === 'amazon.com.mx') { + host = 'bob-dispatch-prod-na.amazon.com'; } else if (this._options.amazonPage === 'amazon.com.br') { host = 'bob-dispatch-prod-na.amazon.com'; } else if (this._options.amazonPage === 'amazon.co.jp') { host = 'bob-dispatch-prod-fe.amazon.com'; } else if (this._options.amazonPage === 'amazon.com.au') { host = 'bob-dispatch-prod-fe.amazon.com'; + } else if (this._options.amazonPage === 'amazon.com.in') { + host = 'bob-dispatch-prod-fe.amazon.com'; + } else if (this._options.amazonPage === 'amazon.co.nz') { + host = 'bob-dispatch-prod-fe.amazon.com'; } this._options.logger && this._options.logger(`Alexa-Remote HTTP2-PUSH: Use host ${host}`); From ee20f50ca71c2b0633c0efcb4f588080d7212e8c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 20 Oct 2024 17:32:52 +0200 Subject: [PATCH 337/356] update deps --- README.md | 4 + package-lock.json | 203 +++++++++++++++++++++++++--------------------- package.json | 8 +- 3 files changed, 120 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index 5215cc3a..f2bfb0db 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (danielbrunt57) Adds additional Amazon domains for HTTP/2 push connections + ### 7.0.4 (2024-04-16) * (Apollon77) Adjust Activity Record query to Amazon changes * (NebzHB) fix missing amazonPage reference instead of amazon.de diff --git a/package-lock.json b/package-lock.json index ec0fa443..8c1cd30f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,13 @@ "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "uuid": "^9.0.1", - "ws": "^8.16.0" + "uuid": "^10.0.0", + "ws": "^8.18.0" }, "devDependencies": { - "@alcalzone/release-script": "^3.7.0", + "@alcalzone/release-script": "^3.8.0", "@alcalzone/release-script-plugin-license": "^3.7.0", - "eslint": "^8.57.0" + "eslint": "^8.57.1" }, "engines": { "node": ">=16.0.0" @@ -35,10 +35,11 @@ } }, "node_modules/@alcalzone/pak": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.1.tgz", - "integrity": "sha512-h7XjOabYWFXWy4gv4KI1TZdzI/0oqe4bGZ2iyi7phldchCxf8+fgz3/ThGdQSd7oJMGJH+hmO1z/b9mb887bvg==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.2.tgz", + "integrity": "sha512-v+kM7HlfIVNLDlGBcbZvrG3yVK3rPLH5kIoGRJbCcoHwpUqQbfEMzXAy1ZrfP+zbI5phHw2PhgrXZr3z6nh7Ow==", "dev": true, + "license": "MIT", "dependencies": { "axios": "^1.6.2", "execa": "~5.0.1", @@ -52,6 +53,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.1.tgz", "integrity": "sha512-4hFTjFbFzQa3aCLobpbPJR/U+VoL1wdV5ozOWjeet0AWDeYr9UFGM1eUFWHX+VtOWFq4p0xXUXfW1YxUaP4fpw==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -71,16 +73,17 @@ } }, "node_modules/@alcalzone/release-script": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.7.0.tgz", - "integrity": "sha512-+aDCbmDLxySKxKEoG/qnwLThj1uZWU1vRkNFeCKtNdf6DLOAevzwMcNGl/6a+CTih4M5CBSoi20orYrjHqsmLg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.8.0.tgz", + "integrity": "sha512-9H3imn8o9n3Ekpkie9TMgPeJfgT6WmklCMtOZ1wuwvMw/obNA0Ao1ZZ8CJfHk1YNjiLGmWn0kQFEGTqz4DoD7w==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0", "@alcalzone/release-script-plugin-changelog": "3.7.0", "@alcalzone/release-script-plugin-exec": "3.7.0", - "@alcalzone/release-script-plugin-git": "3.7.0", - "@alcalzone/release-script-plugin-package": "3.7.0", + "@alcalzone/release-script-plugin-git": "3.8.0", + "@alcalzone/release-script-plugin-package": "3.7.3", "@alcalzone/release-script-plugin-version": "3.7.0", "alcalzone-shared": "^4.0.1", "axios": "^1.6.2", @@ -138,10 +141,11 @@ } }, "node_modules/@alcalzone/release-script-plugin-git": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.7.0.tgz", - "integrity": "sha512-4wA1XNnU7uyNnzXaLe4eBd1pfyk6VhVBuTzQ5EKraLNEXZ+JWWxeYMdcJGI6QdA1qAtld91gLRfLI1Ewye9ecQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.8.0.tgz", + "integrity": "sha512-rI9EqSmvMWaNZ5xxOUBZjD4WOv1Enl+/ZxhUoTROq+K/9RYYHQaAXilGWNvnz2DYr14Q+Yx/fs54GXgAVf0scg==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0", "fs-extra": "^10.1.0" @@ -165,10 +169,11 @@ } }, "node_modules/@alcalzone/release-script-plugin-package": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.0.tgz", - "integrity": "sha512-eZSzE+Hbt6otxleIGBSkXUwspKTlYdKrV8Bp9jDm0ZwSTZ/0jt6zPjL/HfCeX2hd5JtjGc/YEzuHuDVv1fHi8A==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.3.tgz", + "integrity": "sha512-5oKSwbvHs9jRhARJ04eQ7xqig3a7NmPJlhtBxAqUM8+0cjs2g/V1xTxM6o8aZ09uRSdq80YGVxJm871SyszAWQ==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/pak": "^0.10.1", "@alcalzone/release-script-core": "3.7.0", @@ -244,21 +249,24 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -283,7 +291,9 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "dev": true + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -472,15 +482,17 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dev": true, + "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -640,6 +652,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -765,6 +778,7 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -856,16 +870,18 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -1227,15 +1243,16 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -1246,10 +1263,11 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -2062,7 +2080,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/punycode": { "version": "2.3.1", @@ -2558,13 +2577,14 @@ } }, "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -2616,9 +2636,10 @@ "dev": true }, "node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -2698,9 +2719,9 @@ "dev": true }, "@alcalzone/pak": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.1.tgz", - "integrity": "sha512-h7XjOabYWFXWy4gv4KI1TZdzI/0oqe4bGZ2iyi7phldchCxf8+fgz3/ThGdQSd7oJMGJH+hmO1z/b9mb887bvg==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.2.tgz", + "integrity": "sha512-v+kM7HlfIVNLDlGBcbZvrG3yVK3rPLH5kIoGRJbCcoHwpUqQbfEMzXAy1ZrfP+zbI5phHw2PhgrXZr3z6nh7Ow==", "dev": true, "requires": { "axios": "^1.6.2", @@ -2730,16 +2751,16 @@ } }, "@alcalzone/release-script": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.7.0.tgz", - "integrity": "sha512-+aDCbmDLxySKxKEoG/qnwLThj1uZWU1vRkNFeCKtNdf6DLOAevzwMcNGl/6a+CTih4M5CBSoi20orYrjHqsmLg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.8.0.tgz", + "integrity": "sha512-9H3imn8o9n3Ekpkie9TMgPeJfgT6WmklCMtOZ1wuwvMw/obNA0Ao1ZZ8CJfHk1YNjiLGmWn0kQFEGTqz4DoD7w==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.7.0", "@alcalzone/release-script-plugin-changelog": "3.7.0", "@alcalzone/release-script-plugin-exec": "3.7.0", - "@alcalzone/release-script-plugin-git": "3.7.0", - "@alcalzone/release-script-plugin-package": "3.7.0", + "@alcalzone/release-script-plugin-git": "3.8.0", + "@alcalzone/release-script-plugin-package": "3.7.3", "@alcalzone/release-script-plugin-version": "3.7.0", "alcalzone-shared": "^4.0.1", "axios": "^1.6.2", @@ -2782,9 +2803,9 @@ } }, "@alcalzone/release-script-plugin-git": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.7.0.tgz", - "integrity": "sha512-4wA1XNnU7uyNnzXaLe4eBd1pfyk6VhVBuTzQ5EKraLNEXZ+JWWxeYMdcJGI6QdA1qAtld91gLRfLI1Ewye9ecQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.8.0.tgz", + "integrity": "sha512-rI9EqSmvMWaNZ5xxOUBZjD4WOv1Enl+/ZxhUoTROq+K/9RYYHQaAXilGWNvnz2DYr14Q+Yx/fs54GXgAVf0scg==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.7.0", @@ -2803,9 +2824,9 @@ } }, "@alcalzone/release-script-plugin-package": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.0.tgz", - "integrity": "sha512-eZSzE+Hbt6otxleIGBSkXUwspKTlYdKrV8Bp9jDm0ZwSTZ/0jt6zPjL/HfCeX2hd5JtjGc/YEzuHuDVv1fHi8A==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.3.tgz", + "integrity": "sha512-5oKSwbvHs9jRhARJ04eQ7xqig3a7NmPJlhtBxAqUM8+0cjs2g/V1xTxM6o8aZ09uRSdq80YGVxJm871SyszAWQ==", "dev": true, "requires": { "@alcalzone/pak": "^0.10.1", @@ -2861,18 +2882,18 @@ } }, "@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" } @@ -3036,12 +3057,12 @@ "dev": true }, "axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dev": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -3325,16 +3346,16 @@ "dev": true }, "eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -3617,14 +3638,14 @@ "dev": true }, "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==" }, "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -4577,9 +4598,9 @@ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==" }, "vary": { "version": "1.1.2", @@ -4613,9 +4634,9 @@ "dev": true }, "ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index 17b5573b..988405e3 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,14 @@ "alexa-cookie2": "^5.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.16.0", + "ws": "^8.18.0", "extend": "^3.0.2", - "uuid": "^9.0.1" + "uuid": "^10.0.0" }, "devDependencies": { - "@alcalzone/release-script": "^3.7.0", + "@alcalzone/release-script": "^3.8.0", "@alcalzone/release-script-plugin-license": "^3.7.0", - "eslint": "^8.57.0" + "eslint": "^8.57.1" }, "scripts": { "test": "node node_modules/mocha/bin/mocha", From ba8894def195d347defed8b4f9d003495783a506 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 20 Oct 2024 17:37:31 +0200 Subject: [PATCH 338/356] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f2bfb0db..90acfc4a 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ Thank you for that work. ### __WORK IN PROGRESS__ * (danielbrunt57) Adds additional Amazon domains for HTTP/2 push connections +* (beothorn) Fixes Typing information for "names" property ### 7.0.4 (2024-04-16) * (Apollon77) Adjust Activity Record query to Amazon changes From c5708e65d1654464fd2db1d3d846b95da60ce470 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 20 Oct 2024 17:37:38 +0200 Subject: [PATCH 339/356] chore: release v7.0.5 * (danielbrunt57) Adds additional Amazon domains for HTTP/2 push connections * (beothorn) Fixes Typing information for "names" property --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 90acfc4a..705fd4e6 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 7.0.5 (2024-10-20) * (danielbrunt57) Adds additional Amazon domains for HTTP/2 push connections * (beothorn) Fixes Typing information for "names" property diff --git a/package-lock.json b/package-lock.json index 8c1cd30f..3e0c25b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "7.0.4", + "version": "7.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "7.0.4", + "version": "7.0.5", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.2", diff --git a/package.json b/package.json index 988405e3..88cc726a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "7.0.4", + "version": "7.0.5", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 700ac7a2c6b43b0640999b50372b5061c77000f3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 13 Jul 2025 19:13:56 +0200 Subject: [PATCH 340/356] API adjustments --- alexa-remote.d.ts | 21 +- alexa-remote.js | 649 +++++++++++++++++++++++++++++++--------------- 2 files changed, 462 insertions(+), 208 deletions(-) diff --git a/alexa-remote.d.ts b/alexa-remote.d.ts index 47cc656a..8ed06b95 100644 --- a/alexa-remote.d.ts +++ b/alexa-remote.d.ts @@ -172,10 +172,10 @@ declare module "alexa-remote2" { }>; export type ListItemOptions = Partial<{ - startTime: string; - endTime: string; completed: string; listIds: string; + version: string; + value: string; }>; export type GetCustomerHistoryRecordsOptions = { @@ -359,15 +359,25 @@ declare module "alexa-remote2" { callback: CallbackWithErrorAndBody ): void; + /** @deprecated Use getListsV2 instead */ getLists(callback: CallbackWithErrorAndBody): void; + getListsV2(callback: CallbackWithErrorAndBody): void; + /** @deprecated Use getListV2 instead */ getList(listId: string, callback: CallbackWithErrorAndBody): void; + getListV2(listId: string, callback: CallbackWithErrorAndBody): void; + /** @deprecated Use getListItemsV2 instead */ getListItems( listId: string, options: ListItemOptions, callback: CallbackWithErrorAndBody ): void; + getListItemsV2( + listId: string, + options: ListItemOptions, + callback: CallbackWithErrorAndBody + ): void; addListItem( listId: string, @@ -377,14 +387,15 @@ declare module "alexa-remote2" { updateListItem( listId: string, - listItem: string, + listItemId: string, options: ListItemOptions, callback: CallbackWithErrorAndBody ): void; deleteListItem( listId: string, - listItem: string, + listItemId: string, + options: ListItemOptions, callback: CallbackWithErrorAndBody ): void; @@ -645,7 +656,9 @@ declare module "alexa-remote2" { getAllDeviceVolumes(callback: CallbackWithErrorAndBody): void; + /** @deprecated Use getSmarthomeDevicesV2 instead */ getSmarthomeDevices(callback: CallbackWithErrorAndBody): void; + getSmarthomeDevicesV2(callback: CallbackWithErrorAndBody): void; getSmarthomeGroups(callback: CallbackWithErrorAndBody): void; diff --git a/alexa-remote.js b/alexa-remote.js index efe4e076..658cf806 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -18,6 +18,90 @@ function _00(val) { return s; } +const SmartHomeEndpointsGraphQlQuery = `query Endpoints { + endpoints { + items { + endpointId + id + friendlyName + displayCategories { + primary { + value + } + } + legacyIdentifiers { + dmsIdentifier { + deviceType { + type + value { + text + } + } + deviceSerialNumber { + type + value { + text + } + } + } + } + legacyAppliance { + applianceId + applianceTypes + endpointTypeId + friendlyName + friendlyDescription + manufacturerName + connectedVia + modelName + entityId + actions + mergedApplianceIds + capabilities + applianceNetworkState + version + isEnabled + customerDefinedDeviceType + customerPreference + alexaDeviceIdentifierList + aliases + driverIdentity + additionalApplianceDetails + isConsentRequired + applianceKey + appliancePairs + deduplicatedPairs + entityPairs + deduplicatedAliasesByEntityId + relations + } + serialNumber { + value { + text + } + } + enablement + model { + value { + text + } + } + manufacturer { + value { + text + } + } + features { + name + operations { + name + } + } + } + } +} +`; + class AlexaRemote extends EventEmitter { @@ -1000,7 +1084,6 @@ class AlexaRemote extends EventEmitter { flags = flags || {}; flags.host = this.endpoints.alexaApiUrl.replace(/^https?:\/\//, ''); flags.headers = flags.headers || {}; - flags.host = this.endpoints.alexaApiUrl.replace(/^https?:\/\//, ''); flags.cleanHeader = true; flags.headers = flags.headers || {}; flags.headers.authorization = this.authApiBearerToken; @@ -1055,8 +1138,20 @@ class AlexaRemote extends EventEmitter { }); } - httpsGetCall(path, callback, flags = {}) { + // API Host call without Authorization header + httpsApiGet(path, callback, flags) { + if (!this.endpoints || !this.endpoints.alexaApiUrl) { + this._options.logger && this._options.logger(`Alexa-Remote: No endpoint set for alexaApiUrl: ${JSON.stringify(this.endpoints)}`); + return callback && callback(new Error(`No endpoint set for alexaApiUrl: ${JSON.stringify(this.endpoints)}`)); + } + flags = flags || {}; + if (!flags.host) { + flags.host = this.endpoints.alexaApiUrl.replace(/^https?:\/\//, ''); + } + return this.httpsGetCall(path,callback, flags); + } + httpsGetCall(path, callback, flags = {}) { const handleResponse = (err, res, body) => { if (!err && typeof res.statusCode === 'number' && res.statusCode === 401) { this._options.logger && this._options.logger('Alexa-Remote: Response: 401 Unauthorized'); @@ -1290,7 +1385,7 @@ class AlexaRemote extends EventEmitter { } getDevices(callback) { - this.httpsGet ('/api/devices-v2/device?cached=true&_=%t', callback); + this.httpsGet('/api/devices-v2/device?cached=true&_=%t', callback); } getCards(limit, beforeCreationTime, callback) { @@ -1303,90 +1398,230 @@ class AlexaRemote extends EventEmitter { beforeCreationTime = '%t'; } if (beforeCreationTime === undefined) beforeCreationTime = '%t'; - this.httpsGet (`/api/cards?limit=${limit}&beforeCreationTime=${beforeCreationTime}000&_=%t`, callback); + this.httpsGet(`/api/cards?limit=${limit}&beforeCreationTime=${beforeCreationTime}000&_=%t`, callback); } getUsersMe(callback) { - this.httpsGetCall('/api/users/me?platform=ios&version=2.2.556530.0', callback); + this.httpsGetCall('/api/users/me?platform=ios&version=2.2.651540.0', callback); } getHousehold(callback) { - this.httpsGetCall('/api/household', callback); + this.httpsGet('/api/household', callback); } getMedia(serialOrName, callback) { const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/media/state?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); + this.httpsGet(`/api/media/state?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); } getPlayerInfo(serialOrName, callback) { const dev = this.find(serialOrName); if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/np/player?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); + this.httpsGet(`/api/np/player?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&screenWidth=1392&_=%t`, callback); } + /** @deprecated Use getListsV2 instead */ getLists(callback) { - this.httpsGet ('/api/namedLists?_=%t', (err, res) => callback && callback(err, res && res.lists)); + this.getListsV2((err, lists) => { + if (err) { + this._options.logger && this._options.logger(`Alexa-Remote: Error getting lists: ${err.message}`); + return callback && callback(err); + } + const mappedList = lists.map(list => { + let count = null; + try { + count = JSON.parse(list.totalActiveItemsCount).count; + } catch (e) { + // Ignore + } + return { + id: Array.isArray(list.id) && list.id.length > 0 ? list.id[0] : list.listId, + listId: list.listId, + itemId: list.listId, + name: list.listName || list.listType, + createdDateTime: list.createAt, + updatedDateTime: list.updateAt, + totalActiveItemsCount: count, + ownerCustomerId: list.customerId, + }; + }); + callback && callback(null, mappedList); + }); + } + + getListsV2(callback) { + // request options + const request = { + 'method': 'POST', + 'data': JSON.stringify({ + listAttributesToAggregate:[ + /*{ type:'listCategories' }, + { type:'categoryOverride' }, + { type:'shareableInfo','marketplaceId':'A1PA6795UKMFR9','clientId':'AlexaApp' }, + { type:'sharedListOwnerInfo' }, + { type:'collaboratorInfo' },*/ + { type:'totalActiveItemsCount' } + ], + listOwnershipType: null + }) + }; + + this.httpsGet(`https://www.${this._options.amazonPage}/alexashoppinglists/api/v2/lists/fetch`, (err, res) => callback && callback(err, res && res.listInfoList), request); } + /** @deprecated Use getListV2 instead */ getList(listId, callback) { - this.httpsGet (`/api/namedLists/${listId}?_=%t`, callback); + this.getListV2(listId, (err, list) => { + if (err) { + this._options.logger && this._options.logger(`Alexa-Remote: Error getting lists: ${err.message}`); + return callback && callback(err); + } + let count = null; + try { + count = JSON.parse(list.totalActiveItemsCount).count; + } catch (e) { + // Ignore + } + const mappedList = { + id: Array.isArray(list.id) && list.id.length > 0 ? list.id[0] : list.listId, + listId: list.listId, + itemId: list.listId, + name: list.listName || list.listType, + createdDateTime: list.createAt, + updatedDateTime: list.updateAt, + totalActiveItemsCount: count, + ownerCustomerId: list.customerId, + }; + callback && callback(null, mappedList); + }); + } + + getListV2(listId, callback, limit) { + // request options + const request = { + 'method': 'POST', + 'data': JSON.stringify({ + listAttributesToAggregate: [ + /*{'type':'listCategories'}, + {'type':'shareableInfo','marketplaceId':'A1PA6795UKMFR9','clientId':'AlexaApp'}, + {'type':'keywordRecommendations','clientId':'AlexaApp','marketplaceId':'A1PA6795UKMFR9','locale':'de_DE'},*/ + {'type':'totalActiveItemsCount'}, + /*{'type':'categoryOverride'}*/ + ] + }) + }; + + this.httpsGet(`https://www.${this._options.amazonPage}/alexashoppinglists/api/v2/lists/${listId}/items/fetch?limit=${limit || 100}`, (err, res) => callback && callback(err, res && res.listInfo), request); } /** - * Get items from a list. + * Get items from a list. + * + * @param {String} listId List ID to retrieve items from + * @param {Object} options Options to pass to the request + * @param {number} options.limit Limit of items to retrieve + * @param {function} callback + * + * @deprecated Use getListItemsV2 instead + */ + getListItems(listId, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + + this.getListItemsV2(listId, options, (err, items) => { + if (err) { + this._options.logger && this._options.logger(`Alexa-Remote: Error getting list: ${err.message}`); + return callback && callback(err); + } + const mappedItems = items.map(item => ({ + id: item.itemId, + listId: item.listId, + value: item.itemName, + customerId: item.customerId, + completed: item.itemStatus === 'COMPLETE', + createdDateTime: item.createAt, + updatedDateTime: item.updateAt, + version: item.version, + note: item.note, + })); + callback && callback(null, mappedItems); + }); + } + + /** + * Get items from a list with v2 API. * * @param {String} listId List ID to retrieve items from - * @param {Object} [options] additional options to filter items - * @param {String} [options.startTime] filter items regarding start time - * @param {String} [options.endTime] filter items regarding end time - * @param {String} [options.completed] filter items regarding completion - * @param {String} [options.listIds] list IDs + * @param {Object} options Options to pass to the request + * @param {number} options.limit Limit of items to retrieve * @param {function} callback * */ - getListItems(listId, options, callback) { - // get function params + getListItemsV2(listId, options, callback) { if (typeof options === 'function') { callback = options; options = {}; } - // get params by options - let params = ''; - for (const option in options) { - params += `&${option}=${options[option]}`; + if (!listId) { + this._options.logger && this._options.logger('Alexa-Remote: Error getting list items: No listId provided'); + return callback && callback(new Error('No listId provided')); } + const limit = options.limit || 100; + + const request = { + 'method': 'POST', + 'data': JSON.stringify({ + itemAttributesToProject:['quantity',/*'speakerId','asinInfo',*/'note',/*'dealInfo'*/], + /*itemAttributesToAggregate:[ + {type:'categorization'},{type:'speakerInfo','marketplaceId':'A1PA6795UKMFR9'} + ],*/ + /*listAttributesToAggregate:[ + {type:'listCategories'}, + {type:'shareableInfo','marketplaceId':'A1PA6795UKMFR9','clientId':'AlexaApp'}, + {type:'keywordRecommendations','clientId':'AlexaApp','marketplaceId':'A1PA6795UKMFR9','locale':'de_DE'}, + {type:'totalActiveItemsCount'},{type:'categoryOverride'} + ]*/ + }) + }; + // send request - this.httpsGet (`/api/namedLists/${listId}/items?_=%t${params}`, (err, res) => callback && callback(err, res && res.list)); + this.httpsGet(`https://www.${this._options.amazonPage}/alexashoppinglists/api/v2/lists/${listId}/items/fetch?limit=${limit}`, (err, res) => callback && callback(err, res && res.itemInfoList), request); } addListItem(listId, options, callback) { // get function params if (typeof options === 'string') { - options = { 'value': options }; + options = { value: options }; } // request options const request = { 'method': 'POST', 'data': JSON.stringify({ - 'listId': listId, - 'createdDateTime': new Date().getTime(), - 'completed': false, - ...options + items : [{ + itemType:'KEYWORD', + itemName: options.value, + /*itemAttributesToCreate: [{ type : 'speakerId'}], + itemAttributesToAggregate : [ + { type:'categorization'}, + { type:'speakerInfo', marketplaceId: 'A1PA6795UKMFR9'} + ]*/ + }] }) }; // send request - this.httpsGet (`/api/namedLists/${listId}/item`, callback, request); + this.httpsGet(`https://www.${this._options.amazonPage}/alexashoppinglists/api/v2/lists/${listId}/items`, (err, res) => callback && callback(err, res && res.itemInfoList), request); } - updateListItem(listId, listItem, options, callback) { + updateListItem(listId, listItemId, options, callback) { // providing a version is mandatory if (typeof options !== 'object' || !options.version || !options.value) { const errors = []; @@ -1403,45 +1638,76 @@ class AlexaRemote extends EventEmitter { return false; } + const itemAttributesToUpdate = []; + const itemAttributesToRemove = []; + for (const key in options) { + switch (key) { + case 'value': + itemAttributesToUpdate.push({ type: 'itemName', value: options.value }); + break; + case 'note': + if (options.note === null || options.note === undefined) { + itemAttributesToRemove.push({ type: 'note' }); + break; + } + itemAttributesToUpdate.push({ type: 'note', value: options.note }); + break; + case 'completed': + itemAttributesToUpdate.push({ type: 'itemStatus', value: options.completed ? 'COMPLETE' : 'ACTIVE' }); + break; + case 'itemStatus': + if (options.completed !== undefined) { + break; // ignore, because itemStatus is handled by completed + } + itemAttributesToUpdate.push({ type: 'itemStatus', value: options.itemStatus }); + break; + case 'quantity': + if (options.quantity === null || options.quantity === undefined) { + itemAttributesToRemove.push({ type: 'quantity' }); + break; + } + itemAttributesToUpdate.push({ type: 'quantity', value: options.quantity }); + break; + } + } + // request options const request = { 'method': 'PUT', 'data': JSON.stringify({ - 'listId': listId, - 'id': listItem, - 'updatedDateTime': new Date().getTime(), - ...options + itemAttributesToUpdate, + itemAttributesToRemove, }) }; // send request - this.httpsGet (`/api/namedLists/${listId}/item/${listItem}`, callback, request); + this.httpsGet(`https://www.${this._options.amazonPage}/alexashoppinglists/api/v2/lists/${listId}/items/${listItemId}?version =${options.version}`, (err, res) => callback && callback(err, res && res.itemInfoList), request); } - deleteListItem(listId, listItem, callback) { - // data - const data = JSON.stringify({ - 'listId': listId, - 'id': listItem, - 'value': '' // must be provided, but value doesn't matter - }); + deleteListItem(listId, listItemId, options, callback) { + // providing a version is mandatory + if (typeof options !== 'object' || !options.version) { + const errors = []; + + if (!options.version && callback) { + errors.push('Providing the current version via options is mandatory!'); + } + + callback && callback(errors); + return false; + } // request options const request = { 'method': 'DELETE', - 'data': data, - 'headers': { - 'Content-Type': 'application/json', - 'Content-Length': data.length - } }; // send request - this.httpsGet (`/api/namedLists/${listId}/item/${listItem}`, callback, request); + this.httpsGet(`https://www.${this._options.amazonPage}/alexashoppinglists/api/v2/lists/${listId}/items/${listItemId}?version=${options.version}`, callback, request); } getWakeWords(callback) { - this.httpsGet (`/api/wake-word?_=%t`, callback); + this.httpsGet(`/api/wake-word?_=%t`, callback); } getReminders(cached, callback) { @@ -1453,7 +1719,7 @@ class AlexaRemote extends EventEmitter { cached = true; } if (cached === undefined) cached = true; - this.httpsGet (`/api/notifications?cached=${cached}&_=%t`, callback); + this.httpsGet(`/api/notifications?cached=${cached}&_=%t`, callback); } getNotificationSounds(serialOrName, alertType, callback) { @@ -1464,7 +1730,7 @@ class AlexaRemote extends EventEmitter { const device = this.find(serialOrName); if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/notification/sounds?deviceType=${device.deviceType}&deviceSerialNumber=${device.serialNumber}&softwareVersion=${device.softwareVersion}${alertType ? `&alertType=${alertType}` : ''}`, callback); + this.httpsGet(`/api/notification/sounds?deviceType=${device.deviceType}&deviceSerialNumber=${device.serialNumber}&softwareVersion=${device.softwareVersion}${alertType ? `&alertType=${alertType}` : ''}`, callback); } // alarm volume @@ -1472,14 +1738,14 @@ class AlexaRemote extends EventEmitter { const device = this.find(serialOrName); if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/device-notification-state/${device.deviceType}/${device.softwareVersion}/${device.serialNumber}`, callback); + this.httpsGet(`/api/device-notification-state/${device.deviceType}/${device.softwareVersion}/${device.serialNumber}`, callback); } setDeviceNotificationVolume(serialOrName, volumeLevel, callback) { const device = this.find(serialOrName); if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/device-notification-state/${device.deviceType}/${device.softwareVersion}/${device.serialNumber}`, callback , { + this.httpsGet(`/api/device-notification-state/${device.deviceType}/${device.softwareVersion}/${device.serialNumber}`, callback , { 'method': 'PUT', 'data': JSON.stringify({ volumeLevel @@ -1491,7 +1757,7 @@ class AlexaRemote extends EventEmitter { const device = this.find(serialOrName); if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/notification/default-sound`, callback, { + this.httpsGet(`/api/notification/default-sound`, callback, { 'method': 'PUT', 'data': JSON.stringify({ 'deviceType': device.deviceType, @@ -1506,7 +1772,7 @@ class AlexaRemote extends EventEmitter { const device = this.find(serialOrName); if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/notification/default-sound?deviceType=${device.deviceType}&deviceSerialNumber=${device.serialNumber}¬ificationType=${notificationType}`, callback); + this.httpsGet(`/api/notification/default-sound?deviceType=${device.deviceType}&deviceSerialNumber=${device.serialNumber}¬ificationType=${notificationType}`, callback); } getAscendingAlarmState(serialOrName, callback) { @@ -1515,7 +1781,7 @@ class AlexaRemote extends EventEmitter { serialOrName = undefined; } - this.httpsGet (`/api/ascending-alarm`, (err, res) => { + this.httpsGet(`/api/ascending-alarm`, (err, res) => { if (serialOrName) { const device = this.find(serialOrName); if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); @@ -1530,7 +1796,7 @@ class AlexaRemote extends EventEmitter { const device = this.find(serialOrName); if (!device) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/ascending-alarm/${device.serialNumber}`, callback, { + this.httpsGet(`/api/ascending-alarm/${device.serialNumber}`, callback, { 'method': 'PUT', 'data': JSON.stringify({ deviceSerialNumber: device.serialNumber, @@ -1568,7 +1834,7 @@ class AlexaRemote extends EventEmitter { } getWholeHomeAudioGroups(callback) { - this.httpsGet ('/api/wholeHomeAudio/v1/groups', (err, res) => callback && callback(err, res && res.groups)); + this.httpsGet('/api/wholeHomeAudio/v1/groups', (err, res) => callback && callback(err, res && res.groups)); } createNotificationObject(serialOrName, type, label, value, status, sound, recurring) { // type = Reminder, Alarm @@ -1766,14 +2032,14 @@ class AlexaRemote extends EventEmitter { method: 'POST', data: JSON.stringify(notification) }; - return this.httpsGetAuthApi (`/v1/alerts/alarms`, callback, flags); + return this.httpsGetAuthApi(`/v1/alerts/alarms`, callback, flags); } const flags = { data: JSON.stringify(notification), method: 'PUT' }; - this.httpsGet (`/api/notifications/null`, callback, flags); + this.httpsGet(`/api/notifications/null`, callback, flags); } changeNotification(notification, value, callback) { @@ -1813,7 +2079,7 @@ class AlexaRemote extends EventEmitter { method: 'PUT', data: JSON.stringify(notification) }; - this.httpsGet (`/api/notifications/${notification.id}`, function(err, res) { + this.httpsGet(`/api/notifications/${notification.id}`, function(err, res) { // {'Message':null} callback && callback(err, res); }, @@ -1850,7 +2116,7 @@ class AlexaRemote extends EventEmitter { data: JSON.stringify (notification), method: 'DELETE' }; - this.httpsGet (`/api/notifications/${notification.id}`, function(err, res) { + this.httpsGet(`/api/notifications/${notification.id}`, function(err, res) { // {'Message':null} callback && callback(err, res); }, @@ -1872,7 +2138,7 @@ class AlexaRemote extends EventEmitter { data: JSON.stringify (notification), method: 'PUT' }; - this.httpsGet (`/api/notifications/${notification.id}`, callback, flags); + this.httpsGet(`/api/notifications/${notification.id}`, callback, flags); } } @@ -1880,7 +2146,7 @@ class AlexaRemote extends EventEmitter { return this.getDeviceStatusList(callback); } getDeviceStatusList(callback) { - this.httpsGet (`/api/dnd/device-status-list?_=%t`, callback); + this.httpsGet(`/api/dnd/device-status-list?_=%t`, callback); } getBluetooth(cached, callback) { @@ -1889,11 +2155,11 @@ class AlexaRemote extends EventEmitter { cached = true; } if (cached === undefined) cached = true; - this.httpsGet (`/api/bluetooth?cached=${cached}`, callback); + this.httpsGet(`/api/bluetooth?cached=${cached}`, callback); } tuneinSearchRaw(query, callback) { - this.httpsGet (`/api/tunein/search?query=${query}&mediaOwnerCustomerId=${this.ownerCustomerId}&_=%t`, callback); + this.httpsGet(`/api/tunein/search?query=${query}&mediaOwnerCustomerId=${this.ownerCustomerId}&_=%t`, callback); } tuneinSearch(query, callback) { @@ -1919,10 +2185,10 @@ class AlexaRemote extends EventEmitter { data: JSON.stringify(tuneInJson), method: 'PUT' }; - this.httpsGet (`/api/entertainment/v1/player/queue?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, callback, flags); + this.httpsGet(`/api/entertainment/v1/player/queue?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, callback, flags); /* - this.httpsGet (`/api/tunein/queue-and-play + this.httpsGet(`/api/tunein/queue-and-play ?deviceSerialNumber=${dev.serialNumber} &deviceType=${dev.deviceType} &guideId=${guideId} @@ -1932,88 +2198,6 @@ class AlexaRemote extends EventEmitter { */ } - /** - * @deprecated - */ - getHistory(options, callback) { - return this.getActivities(options, callback); - } - /** - * @deprecated - */ - getActivities(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - this.httpsGet (`/api/activities` + - `?startTime=${options.startTime || ''}` + - `&size=${options.size || 1}` + - `&offset=${options.offset || 1}`, - (err, result) => { - if (err || !result) return callback/*.length >= 2*/ && callback(err, result); - - const ret = []; - if (result.activities) { - for (let r = 0; r < result.activities.length; r++) { - const res = result.activities[r]; - const o = { - data: res - }; - try { - o.description = JSON.parse(res.description); - } catch (e) { - if (res.description) { - o.description = {'summary': res.description}; - } else { - return; - } - } - if (!o.description) continue; - o.description.summary = (o.description.summary || '').trim(); - if (options.filter) { - switch (o.description.summary) { - case 'stopp': - case 'alexa': - case 'echo': - case 'computer': - case 'amazon': - case 'ziggy': - case ',': - case '': - continue; - } - } - for (let i = 0; i < res.sourceDeviceIds.length; i++) { - o.deviceSerialNumber = res.sourceDeviceIds[i].serialNumber; - if (!this.serialNumbers[o.deviceSerialNumber]) continue; - o.name = this.serialNumbers[o.deviceSerialNumber].accountName; - const dev = this.find(o.deviceSerialNumber); - const wakeWord = (dev && dev.wakeWord) ? dev.wakeWord : null; - if (wakeWord && o.description.summary.startsWith(wakeWord)) { - o.description.summary = o.description.summary.substr(wakeWord.length).trim(); - } else if (o.description.summary.startsWith('alexa')) { - o.description.summary = o.description.summary.substr(5).trim(); - } - o.deviceType = res.sourceDeviceIds[i].deviceType || null; - o.deviceAccountId = res.sourceDeviceIds[i].deviceAccountId || null; - - o.creationTimestamp = res.creationTimestamp || null; - o.activityStatus = res.activityStatus || null; // DISCARDED_NON_DEVICE_DIRECTED_INTENT, SUCCESS, FAIL, SYSTEM_ABANDONED - try { - o.domainAttributes = res.domainAttributes ? JSON.parse(res.domainAttributes) : null; - } catch (e) { - o.domainAttributes = res.domainAttributes || null; - } - if (o.description.summary || !options.filter) ret.push(o); - } - } - } - if (typeof callback === 'function') return callback (err, ret); - } - ); - } - _getCustomerHistoryRecords(options, callback) { let url = `https://www.${this._options.amazonPage}/alexa-privacy/apd/rvh/customer-history-records-v2` + `?startTime=${options.startTime || (Date.now() - 24 * 60 * 60 * 1000)}` + @@ -2167,7 +2351,7 @@ class AlexaRemote extends EventEmitter { callback = includeActors; includeActors = false; } - this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/accounts${includeActors ? '?includeActors=true' : ''}`, callback); + this.httpsGet(`https://alexa-comms-mobile-service.${this._options.amazonPage}/accounts${includeActors ? '?includeActors=true' : ''}`, callback); } getContacts(options, callback) { @@ -2184,7 +2368,7 @@ class AlexaRemote extends EventEmitter { if (options.dedupeMode === undefined) options.dedupeMode = 'RemoveCloudOnlyContactDuplicates'; if (options.homeGroupId === undefined) options.homeGroupId = ''; - this.httpsGet ( + this.httpsGet( `https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/contacts ?includePreferencesByLevel=${options.includePreferencesByLevel} &includeNonAlexaContacts=${options.includeNonAlexaContacts} @@ -2210,7 +2394,7 @@ class AlexaRemote extends EventEmitter { if (options.modifiedSinceDate === undefined) options.modifiedSinceDate = '1970-01-01T00:00:00.000Z'; if (options.includeUserName === undefined) options.includeUserName = true; - this.httpsGet ( + this.httpsGet( `https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations ?latest=${options.latest} &includeHomegroup=${options.includeHomegroup} @@ -2230,7 +2414,7 @@ class AlexaRemote extends EventEmitter { data: JSON.stringify({ bluetoothDeviceAddress: btAddress}), method: 'POST' }; - this.httpsGet (`/api/bluetooth/pair-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); + this.httpsGet(`/api/bluetooth/pair-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); } disconnectBluetooth(serialOrName, btAddress, callback) { @@ -2241,7 +2425,7 @@ class AlexaRemote extends EventEmitter { //data: JSON.stringify({ bluetoothDeviceAddress: btAddress}), method: 'POST' }; - this.httpsGet (`/api/bluetooth/disconnect-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); + this.httpsGet(`/api/bluetooth/disconnect-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); } setDoNotDisturb(serialOrName, enabled, callback) { @@ -2256,7 +2440,7 @@ class AlexaRemote extends EventEmitter { }), method: 'PUT' }; - this.httpsGet (`/api/dnd/status`, callback, flags); + this.httpsGet(`/api/dnd/status`, callback, flags); } find(serialOrName) { @@ -2283,7 +2467,7 @@ class AlexaRemote extends EventEmitter { }), method: 'PUT' }; - this.httpsGet (`/api/device-notification-state/${dev.deviceType}/${dev.softwareVersion}/${dev.serialNumber}`, callback, flags); + this.httpsGet(`/api/device-notification-state/${dev.deviceType}/${dev.softwareVersion}/${dev.serialNumber}`, callback, flags); } sendCommand(serialOrName, command, value, callback) { @@ -2326,7 +2510,7 @@ class AlexaRemote extends EventEmitter { return; } - this.httpsGet (`/api/np/command?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, + this.httpsGet(`/api/np/command?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, callback, { method: 'POST', @@ -2802,7 +2986,7 @@ class AlexaRemote extends EventEmitter { } reqObj.sequenceJson = reqObj.sequenceJson.replace(/"locale":"ALEXA_CURRENT_LOCALE"/g, `"locale":"de-DE"`); - this.httpsGet (`/api/behaviors/preview`, + this.httpsGet(`/api/behaviors/preview`, callback, { method: 'POST', @@ -2817,7 +3001,7 @@ class AlexaRemote extends EventEmitter { limit = 0; } limit = limit || 2000; - this.httpsGet (`/api/behaviors/v2/automations?limit=${limit}`, callback, { + this.httpsGet(`/api/behaviors/v2/automations?limit=${limit}`, callback, { timeout: 30000 }); } @@ -2857,15 +3041,15 @@ class AlexaRemote extends EventEmitter { }; // send request - this.httpsGet (`/api/routines/catalog/action/${catalogId}`, callback, request); + this.httpsGet(`/api/routines/catalog/action/${catalogId}`, callback, request); } getMusicProviders(callback) { - this.httpsGet ('/api/behaviors/entities?skillId=amzn1.ask.1p.music', + this.httpsGet('/api/behaviors/entities?skillId=amzn1.ask.1p.music', callback, { headers: { - 'Routines-Version': '3.0.128540' + 'Routines-Version': '3.0.264101' } } ); @@ -2890,7 +3074,7 @@ class AlexaRemote extends EventEmitter { 'operationPayload': JSON.stringify(operationPayload) }; - this.httpsGet (`/api/behaviors/operation/validate`, + this.httpsGet(`/api/behaviors/operation/validate`, (err, res) => { if (err) { return callback && callback(err, res); @@ -2933,7 +3117,7 @@ class AlexaRemote extends EventEmitter { 'operationPayload': JSON.stringify(operationPayload) }; - this.httpsGet (`/api/behaviors/operation/validate`, + this.httpsGet(`/api/behaviors/operation/validate`, (err, res) => { if (err) { return callback && callback(err, res); @@ -2983,7 +3167,7 @@ class AlexaRemote extends EventEmitter { 'operationPayload': JSON.stringify(operationPayload) }; - this.httpsGet (`/api/behaviors/operation/validate`, + this.httpsGet(`/api/behaviors/operation/validate`, (err, res) => { if (err) { return callback && callback(err, res); @@ -3052,7 +3236,7 @@ class AlexaRemote extends EventEmitter { const flags = { method: 'DELETE' }; - this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}?lastMessageId=${lastMessageId}`, callback, flags); + this.httpsGet(`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/conversations/${conversationId}?lastMessageId=${lastMessageId}`, callback, flags); } setReminder(serialOrName, timestamp, label, callback) { @@ -3061,7 +3245,7 @@ class AlexaRemote extends EventEmitter { } getHomeGroup(callback) { - this.httpsGet (`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/identities?includeUserName=true`, callback); + this.httpsGet(`https://alexa-comms-mobile-service.${this._options.amazonPage}/users/${this.commsId}/identities?includeUserName=true`, callback); } getDevicePreferences(serialOrName, callback) { @@ -3069,7 +3253,7 @@ class AlexaRemote extends EventEmitter { callback = serialOrName; serialOrName = null; } - this.httpsGet ('/api/device-preferences?cached=true', (err, res) => { + this.httpsGet('/api/device-preferences?cached=true', (err, res) => { if (serialOrName) { const device = this.find(serialOrName); if (!device) { @@ -3095,7 +3279,7 @@ class AlexaRemote extends EventEmitter { return callback && callback(new Error('Unknown Device or Serial number'), null); } - this.httpsGet (`/api/device-preferences/${device.serialNumber}`, callback, { + this.httpsGet(`/api/device-preferences/${device.serialNumber}`, callback, { method: 'PUT', data: JSON.stringify(preferences) }); @@ -3106,38 +3290,95 @@ class AlexaRemote extends EventEmitter { if (!dev) { return callback && callback(new Error('Unknown Device or Serial number'), null); } - this.httpsGet (`/api/device-wifi-details?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, callback); + this.httpsGet(`/api/device-wifi-details?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}`, callback); } getAllDeviceVolumes(callback) { - this.httpsGet ('/api/devices/deviceType/dsn/audio/v1/allDeviceVolumes', callback); + this.httpsGet('/api/devices/deviceType/dsn/audio/v1/allDeviceVolumes', callback); } + /** @deprecated Use getSmarthomeDevicesV2 instead */ getSmarthomeDevices(callback) { - this.httpsGet ('/api/phoenix?includeRelationships=true', function (err, res) { - if (err || !res || !res.networkDetail) return callback(err, res); - try { - res = JSON.parse(res.networkDetail); - } catch(e) { - return callback('invalid JSON'); + this.getSmarthomeDevicesV2((err, devices) => { + if (err) { + return callback && callback(err); } - if (!res.locationDetails) return callback('locationDetails not found'); - callback (err, res.locationDetails); - }, { - timeout: 30000 + const mappedResults = devices.map(device => ({ + ...device, + ...device.legacyAppliance, + ...device.legacyIdentifiers, + legacyAppliance: undefined, + legacyIdentifiers: undefined, + })); + const amazonBridgeDetails = {}; + mappedResults.forEach(device => { + const id = device.applianceId; + if (!id) { + this._options.logger && this._options.logger(`Ignoring device without applianceId: ${JSON.stringify(device)}`); + return; + } + if ( + device && + device.dmsIdentifier && + device.dmsIdentifier.deviceType && + device.dmsIdentifier.deviceType.value && + ( + device.dmsIdentifier.deviceType.value.text === 'A2IVLV5VM2W81' || + device.dmsIdentifier.deviceType.value.text === 'A2TF17PFR55MTB' + ) + ) { + return; // Ignore Alexa App devices + } + + amazonBridgeDetails[`LambdaBridge_${id}`] = amazonBridgeDetails[`LambdaBridge_${id}`] || { + applianceDetails: { + applianceDetails: {} + } + }; + amazonBridgeDetails[`LambdaBridge_${id}`].applianceDetails.applianceDetails[id] = device; + }); + const result = { + locationDetails: { + Default_Location: { + locationId: 'Default_Location', + amazonBridgeDetails: { + amazonBridgeDetails + } + } + } + }; + callback && callback(null, result); }); } + getSmarthomeDevicesV2(callback) { + const request = { + method: 'POST', + data: JSON.stringify({ query: SmartHomeEndpointsGraphQlQuery}), + timeout: 30000 + }; + + this.httpsGet('/nexus/v1/graphql', function (err, res) { + if (!err && (!res.data || !res.data.endpoints || !Array.isArray(res.data.endpoints.items))) { + err = new Error('Invalid response from server'); + } + if (err) { + return callback && callback(err, res); + } + callback && callback (null, res.data.endpoints.items); + }, request); + } + getSmarthomeGroups(callback) { - this.httpsGet ('/api/phoenix/group?_=%t', callback); + this.httpsGet('/api/phoenix/group?_=%t', callback); } getSmarthomeEntities(callback) { - this.httpsGet ('/api/behaviors/entities?skillId=amzn1.ask.1p.smarthome', + this.httpsGet('/api/behaviors/entities?skillId=amzn1.ask.1p.smarthome', callback, { headers: { - 'Routines-Version': '3.0.128540' + 'Routines-Version': '3.0.264101' }, timeout: 30000 } @@ -3145,11 +3386,11 @@ class AlexaRemote extends EventEmitter { } getFireTVEntities(callback) { - this.httpsGet ('/api/behaviors/entities?skillId=amzn1.ask.1p.routines.firetv', + this.httpsGet('/api/behaviors/entities?skillId=amzn1.ask.1p.routines.firetv', callback, { headers: { - 'Routines-Version': '3.0.128540' + 'Routines-Version': '3.0.264101' }, timeout: 30000 } @@ -3157,11 +3398,11 @@ class AlexaRemote extends EventEmitter { } getSmarthomeBehaviourActionDefinitions(callback) { - this.httpsGet ('/api/behaviors/actionDefinitions?skillId=amzn1.ask.1p.smarthome', + this.httpsGet('/api/behaviors/actionDefinitions?skillId=amzn1.ask.1p.smarthome', callback, { headers: { - 'Routines-Version': '3.0.128540' + 'Routines-Version': '3.0.264101' }, timeout: 30000 } @@ -3169,11 +3410,11 @@ class AlexaRemote extends EventEmitter { } getRoutineSoundList(callback) { - this.httpsGet ('/api/behaviors/entities?skillId=amzn1.ask.1p.sound', + this.httpsGet('/api/behaviors/entities?skillId=amzn1.ask.1p.sound', callback, { headers: { - 'Routines-Version': '3.0.128540' + 'Routines-Version': '3.0.264101' }, timeout: 30000 } @@ -3191,7 +3432,7 @@ class AlexaRemote extends EventEmitter { deviceType: dev.deviceType, //deviceOwnerCustomerId: oo.deviceOwnerCustomerId }; - this.httpsGet (`/api/devices-v2/device/${dev.serialNumber}`, + this.httpsGet(`/api/devices-v2/device/${dev.serialNumber}`, callback, { method: 'PUT', @@ -3205,7 +3446,7 @@ class AlexaRemote extends EventEmitter { method: 'DELETE' //data: JSON.stringify (o), }; - this.httpsGet (`/api/phoenix/appliance/${smarthomeDevice}`, callback, flags); + this.httpsGet(`/api/phoenix/appliance/${smarthomeDevice}`, callback, flags); } setEnablementForSmarthomeDevice(smarthomeDevice, enabled, callback) { @@ -3216,7 +3457,7 @@ class AlexaRemote extends EventEmitter { 'enabled': !!enabled }), }; - this.httpsGet (`/api/phoenix/v2/appliance/${smarthomeDevice}/enablement`, callback, flags); + this.httpsGet(`/api/phoenix/v2/appliance/${smarthomeDevice}/enablement`, callback, flags); } deleteSmarthomeGroup(smarthomeGroup, callback) { @@ -3224,7 +3465,7 @@ class AlexaRemote extends EventEmitter { method: 'DELETE' //data: JSON.stringify (o), }; - this.httpsGet (`/api/phoenix/group/${smarthomeGroup}`, callback, flags); + this.httpsGet(`/api/phoenix/group/${smarthomeGroup}`, callback, flags); } deleteAllSmarthomeDevices(callback) { @@ -3232,7 +3473,7 @@ class AlexaRemote extends EventEmitter { method: 'DELETE' //data: JSON.stringify (o), }; - this.httpsGet (`/api/phoenix`, callback, flags); + this.httpsGet(`/api/phoenix`, callback, flags); } discoverSmarthomeDevice(callback) { @@ -3240,7 +3481,7 @@ class AlexaRemote extends EventEmitter { method: 'POST' //data: JSON.stringify (o), }; - this.httpsGet ('/api/phoenix/discovery', callback, flags); + this.httpsGet('/api/phoenix/discovery', callback, flags); } querySmarthomeDevices(toQuery, entityType, maxTimeout, callback) { @@ -3276,7 +3517,7 @@ class AlexaRemote extends EventEmitter { }; - this.httpsGet (`/api/phoenix/state`, callback, flags); + this.httpsGet(`/api/phoenix/state`, callback, flags); /* { 'stateRequests': [ @@ -3323,7 +3564,7 @@ class AlexaRemote extends EventEmitter { 'controlRequests': reqArr }) }; - this.httpsGet (`/api/phoenix/state`, callback, flags); + this.httpsGet(`/api/phoenix/state`, callback, flags); /* { 'controlRequests': [ @@ -3363,7 +3604,7 @@ class AlexaRemote extends EventEmitter { bluetoothDeviceClass: 'OTHER' }) }; - this.httpsGet (`/api/bluetooth/unpair-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); + this.httpsGet(`/api/bluetooth/unpair-sink/${dev.deviceType}/${dev.serialNumber}`, callback, flags); } deleteDevice(serialOrName, callback) { @@ -3376,7 +3617,7 @@ class AlexaRemote extends EventEmitter { deviceType: dev.deviceType }) }; - this.httpsGet (`/api/devices/device/${dev.serialNumber}?deviceType=${dev.deviceType}`, callback, flags); + this.httpsGet(`/api/devices/device/${dev.serialNumber}?deviceType=${dev.deviceType}`, callback, flags); } getDeviceSettings(serialOrName, settingName, callback) { @@ -3548,7 +3789,7 @@ class AlexaRemote extends EventEmitter { treble }) }; - this.httpsGet (`/api/equalizer/${dev.serialNumber}/${dev.deviceType}`, callback, flags); + this.httpsGet(`/api/equalizer/${dev.serialNumber}/${dev.deviceType}`, callback, flags); } /** @@ -3585,7 +3826,7 @@ class AlexaRemote extends EventEmitter { deviceId: dev.serialNumber }) }; - this.httpsGet (`/api/auxcontroller/${dev.deviceType}/${dev.serialNumber}/ports/${port}/setDirection`, callback, flags); + this.httpsGet(`/api/auxcontroller/${dev.deviceType}/${dev.serialNumber}/ports/${port}/setDirection`, callback, flags); } getPlayerQueue(serialOrName, size, callback) { @@ -3597,7 +3838,7 @@ class AlexaRemote extends EventEmitter { if (!dev) return callback && callback(new Error('Unknown Device or Serial number'), null); - this.httpsGet (`/api/np/queue?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&size=${size}&_=%t`, callback); + this.httpsGet(`/api/np/queue?deviceSerialNumber=${dev.serialNumber}&deviceType=${dev.deviceType}&size=${size}&_=%t`, callback); } } From d69f5ea4cd3f757c38d2db9d58c515dd7669b865 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 13 Jul 2025 19:14:04 +0200 Subject: [PATCH 341/356] dep update --- package-lock.json | 874 ++++++++++++++++++++++++++++++++-------------- package.json | 4 +- 2 files changed, 619 insertions(+), 259 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3e0c25b9..cc7044cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,12 @@ "version": "7.0.5", "license": "MIT", "dependencies": { - "alexa-cookie2": "^5.0.2", + "alexa-cookie2": "^5.0.3", "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", "uuid": "^10.0.0", - "ws": "^8.18.0" + "ws": "^8.18.3" }, "devDependencies": { "@alcalzone/release-script": "^3.8.0", @@ -331,17 +331,22 @@ } }, "node_modules/@types/http-proxy": { - "version": "1.17.9", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", - "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", + "version": "1.17.16", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", + "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", - "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" + "version": "24.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.13.tgz", + "integrity": "sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.8.0" + } }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", @@ -353,6 +358,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -411,13 +417,14 @@ } }, "node_modules/alexa-cookie2": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.2.tgz", - "integrity": "sha512-FELHbhJ0DR5JA3o/c0utTv26V+Uo39UX+GIVHnZiy/RogthHFvBPwO9ir3sVXYOT+0FnpxVg4jKHzF1CCTkcJQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.3.tgz", + "integrity": "sha512-z9G32J0+mDgtR/8+3lF49h+yKU5mlX1NwDPR1A67UjX1TjHhK8m552uI/0E4TpL9/6c3VbmNWmbkKRm8imSsRg==", + "license": "MIT", "dependencies": { "cookie": "^0.6.0", - "express": "^4.18.2", - "http-proxy-middleware": "^2.0.6", + "express": "^4.21.2", + "http-proxy-middleware": "^2.0.9", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.1" @@ -476,7 +483,8 @@ "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", @@ -504,20 +512,21 @@ "dev": true }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", + "qs": "6.13.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -530,6 +539,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -537,7 +547,8 @@ "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -550,11 +561,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -577,17 +589,35 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/call-bind": { + "node_modules/call-bind-apply-helpers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -684,6 +714,7 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -708,20 +739,23 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -729,7 +763,8 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" }, "node_modules/core-util-is": { "version": "1.0.3", @@ -787,6 +822,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -795,6 +831,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -812,10 +849,25 @@ "node": ">=6.0.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -824,9 +876,10 @@ "dev": true }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -843,6 +896,36 @@ "node": ">=8.6" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -855,7 +938,8 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "4.0.0", @@ -1017,6 +1101,7 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1024,7 +1109,8 @@ "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" }, "node_modules/execa": { "version": "5.1.1", @@ -1050,36 +1136,37 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -1088,12 +1175,17 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -1101,7 +1193,8 @@ "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/express/node_modules/safe-buffer": { "version": "5.2.1", @@ -1120,7 +1213,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/extend": { "version": "3.0.2", @@ -1167,9 +1261,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1178,12 +1273,13 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -1198,6 +1294,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -1205,7 +1302,8 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/find-up": { "version": "5.0.0", @@ -1281,6 +1379,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1289,6 +1388,7 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1314,9 +1414,13 @@ "dev": true }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/get-caller-file": { "version": "2.0.5", @@ -1328,19 +1432,42 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -1412,6 +1539,18 @@ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -1424,17 +1563,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1444,10 +1572,11 @@ "node": ">=8" } }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1455,21 +1584,23 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -1485,6 +1616,7 @@ "version": "1.18.1", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "license": "MIT", "dependencies": { "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", @@ -1495,9 +1627,10 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz", + "integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==", + "license": "MIT", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -1544,6 +1677,7 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -1604,6 +1738,7 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -1640,6 +1775,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -1657,6 +1793,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "license": "MIT", "engines": { "node": ">=10" }, @@ -1769,18 +1906,32 @@ "node": ">=10" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", @@ -1792,16 +1943,18 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -1812,6 +1965,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -1875,6 +2029,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1892,9 +2047,13 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1903,6 +2062,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -1997,6 +2157,7 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2029,9 +2190,10 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" }, "node_modules/picocolors": { "version": "1.0.0", @@ -2043,6 +2205,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -2068,6 +2231,7 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -2093,11 +2257,12 @@ } }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -2139,14 +2304,16 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -2183,7 +2350,8 @@ "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" }, "node_modules/resolve-from": { "version": "4.0.0", @@ -2250,7 +2418,8 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/semver": { "version": "7.5.4", @@ -2268,9 +2437,10 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -2294,6 +2464,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -2301,22 +2472,34 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" @@ -2325,7 +2508,8 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -2349,13 +2533,72 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2390,6 +2633,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2481,6 +2725,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -2492,6 +2737,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", "engines": { "node": ">=0.6" } @@ -2524,6 +2770,7 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -2537,6 +2784,12 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "node_modules/undici-types": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "license": "MIT" + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -2550,6 +2803,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2572,6 +2826,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -2593,6 +2848,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2636,9 +2892,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -2937,17 +3193,20 @@ } }, "@types/http-proxy": { - "version": "1.17.9", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", - "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", + "version": "1.17.16", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", + "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", "requires": { "@types/node": "*" } }, "@types/node": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", - "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" + "version": "24.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.13.tgz", + "integrity": "sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==", + "requires": { + "undici-types": "~7.8.0" + } }, "@ungap/structured-clone": { "version": "1.2.0", @@ -2999,13 +3258,13 @@ } }, "alexa-cookie2": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.2.tgz", - "integrity": "sha512-FELHbhJ0DR5JA3o/c0utTv26V+Uo39UX+GIVHnZiy/RogthHFvBPwO9ir3sVXYOT+0FnpxVg4jKHzF1CCTkcJQ==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/alexa-cookie2/-/alexa-cookie2-5.0.3.tgz", + "integrity": "sha512-z9G32J0+mDgtR/8+3lF49h+yKU5mlX1NwDPR1A67UjX1TjHhK8m552uI/0E4TpL9/6c3VbmNWmbkKRm8imSsRg==", "requires": { "cookie": "^0.6.0", - "express": "^4.18.2", - "http-proxy-middleware": "^2.0.6", + "express": "^4.21.2", + "http-proxy-middleware": "^2.0.9", "http-proxy-response-rewrite": "^0.0.1", "https": "^1.0.0", "querystring": "^0.2.1" @@ -3074,20 +3333,20 @@ "dev": true }, "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "requires": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", + "qs": "6.13.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -3118,11 +3377,11 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "buffer-from": { @@ -3140,13 +3399,22 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" }, - "call-bind": { + "call-bind-apply-helpers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } + }, + "call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "requires": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" } }, "callsites": { @@ -3238,9 +3506,9 @@ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" }, "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==" }, "cookie-signature": { "version": "1.0.6", @@ -3303,6 +3571,16 @@ "esutils": "^2.0.2" } }, + "dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3315,9 +3593,9 @@ "dev": true }, "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==" }, "enquirer": { "version": "2.3.6", @@ -3328,6 +3606,24 @@ "ansi-colors": "^4.1.1" } }, + "es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, + "es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "requires": { + "es-errors": "^1.3.0" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3476,36 +3772,36 @@ } }, "express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -3575,20 +3871,20 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { "to-regex-range": "^5.0.1" } }, "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -3681,9 +3977,9 @@ "dev": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "get-caller-file": { "version": "2.0.5", @@ -3692,14 +3988,29 @@ "dev": true }, "get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + } + }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" } }, "get-stream": { @@ -3752,6 +4063,11 @@ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, + "gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" + }, "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -3764,29 +4080,24 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" - }, "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } }, "http-errors": { "version": "2.0.0", @@ -3811,9 +4122,9 @@ } }, "http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz", + "integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==", "requires": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -4009,15 +4320,20 @@ "yallist": "^4.0.0" } }, + "math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" }, "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==" }, "merge-stream": { "version": "2.0.0", @@ -4031,11 +4347,11 @@ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, @@ -4099,9 +4415,9 @@ } }, "object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==" }, "on-finished": { "version": "2.4.1", @@ -4194,9 +4510,9 @@ "dev": true }, "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, "picocolors": { "version": "1.0.0", @@ -4242,11 +4558,11 @@ "dev": true }, "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "requires": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" } }, "querystring": { @@ -4266,9 +4582,9 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "requires": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -4351,9 +4667,9 @@ } }, "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "requires": { "debug": "2.6.9", "depd": "2.0.0", @@ -4385,6 +4701,11 @@ } } }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4393,14 +4714,14 @@ } }, "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "requires": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" } }, "setprototypeof": { @@ -4424,13 +4745,47 @@ "dev": true }, "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "requires": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + } + }, + "side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + } + }, + "side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "requires": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + } + }, + "side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "requires": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" } }, "signal-exit": { @@ -4567,6 +4922,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "undici-types": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==" + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -4634,9 +4994,9 @@ "dev": true }, "ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index 88cc726a..b52d0b46 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,10 @@ "layla.amazon.de" ], "dependencies": { - "alexa-cookie2": "^5.0.2", + "alexa-cookie2": "^5.0.3", "https": "^1.0.0", "querystring": "^0.2.1", - "ws": "^8.18.0", + "ws": "^8.18.3", "extend": "^3.0.2", "uuid": "^10.0.0" }, From 47e82b21156c05b36f1afab0d119fe0e5e387488 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 13 Jul 2025 19:14:17 +0200 Subject: [PATCH 342/356] other changes, changelog, gha --- .github/workflows/test-and-release.yml | 4 ++-- LICENSE | 2 +- README.md | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 04582d7e..68d25f9e 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -30,7 +30,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [22.x] steps: - uses: actions/checkout@v4 @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [22.x] steps: - name: Checkout code diff --git a/LICENSE b/LICENSE index cdd8dafa..a44a48c1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018-2024 Apollon77 +Copyright (c) 2018-2025 Apollon77 Copyright (c) 2015-2017 soef Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/README.md b/README.md index 705fd4e6..22400c28 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,27 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* IMPORTANT: This version updated "list" and "Smarthome" APIs to the latest Amazon changes. SOme of these are breaking! Please see changelog below for details! +* (Apollon77) Added new methods as "V2" to represent the new Amazon API. The delivered data have a different structure and some values are not available anymore. + * getListsV2 + * getListV2 + * getListItemsV2 + * getSmarthomeDevicesV2 +* (Apollon77) The following methods got deprecated and try to deliver a comparable response as before by internally using the new APIs. This mapping is done on best effort and might not be 100%! + * getLists + * getList + * getListItems + * getSmarthomeDevices +* (Apollon77) deleteListItem got a new options parameter added because the version of the list to delete is required now. An Error is returned if the version is not provided. +* (Apollon77) The following methods were updated to use the new APIs in the background, so no V2 method was added: + * addListItem + * updateListItem +* (Apollon77) The following former deprecated methods were removed + * getHistory + * getActivities + ### 7.0.5 (2024-10-20) * (danielbrunt57) Adds additional Amazon domains for HTTP/2 push connections * (beothorn) Fixes Typing information for "names" property From a25434e1997907f304b7bb6e203ea68e868e6067 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 13 Jul 2025 19:17:22 +0200 Subject: [PATCH 343/356] chore: release v8.0.0 * IMPORTANT: This version updated "list" and "Smarthome" APIs to the latest Amazon changes. SOme of these are breaking! Please see changelog below for details! * (Apollon77) Added new methods as "V2" to represent the new Amazon API. The delivered data have a different structure and some values are not available anymore. * getListsV2 * getListV2 * getListItemsV2 * getSmarthomeDevicesV2 * (Apollon77) The following methods got deprecated and try to deliver a comparable response as before by internally using the new APIs. This mapping is done on best effort and might not be 100%! * getLists * getList * getListItems * getSmarthomeDevices * (Apollon77) deleteListItem got a new options parameter added because the version of the list to delete is required now. An Error is returned if the version is not provided. * (Apollon77) The following methods were updated to use the new APIs in the background, so no V2 method was added: * addListItem * updateListItem * (Apollon77) The following former deprecated methods were removed * getHistory * getActivities --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 22400c28..eb3aae8c 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 8.0.0 (2025-07-13) * IMPORTANT: This version updated "list" and "Smarthome" APIs to the latest Amazon changes. SOme of these are breaking! Please see changelog below for details! * (Apollon77) Added new methods as "V2" to represent the new Amazon API. The delivered data have a different structure and some values are not available anymore. * getListsV2 diff --git a/package-lock.json b/package-lock.json index cc7044cc..babf9098 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "7.0.5", + "version": "8.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "7.0.5", + "version": "8.0.0", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.3", diff --git a/package.json b/package.json index b52d0b46..37b83da1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "7.0.5", + "version": "8.0.0", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 97581493361a9abd1433eb940ddcaef7789cc11b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Jul 2025 17:17:56 +0000 Subject: [PATCH 344/356] chore(deps): bump uuid from 10.0.0 to 11.0.3 Bumps [uuid](https://github.com/uuidjs/uuid) from 10.0.0 to 11.0.3. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v10.0.0...v11.0.3) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 17 ++++++++--------- package.json | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index babf9098..7277b8d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "extend": "^3.0.2", "https": "^1.0.0", "querystring": "^0.2.1", - "uuid": "^10.0.0", + "uuid": "^11.1.0", "ws": "^8.18.3" }, "devDependencies": { @@ -2832,16 +2832,15 @@ } }, "node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], - "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/vary": { @@ -4958,9 +4957,9 @@ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==" + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==" }, "vary": { "version": "1.1.2", diff --git a/package.json b/package.json index 37b83da1..38168bfc 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "querystring": "^0.2.1", "ws": "^8.18.3", "extend": "^3.0.2", - "uuid": "^10.0.0" + "uuid": "^11.1.0" }, "devDependencies": { "@alcalzone/release-script": "^3.8.0", From 4046988a5fa21c1de598c2e5faea97784d612d10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Jul 2025 17:18:22 +0000 Subject: [PATCH 345/356] chore(deps-dev): bump axios from 1.7.7 to 1.10.0 Bumps [axios](https://github.com/axios/axios) from 1.7.7 to 1.10.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.7.7...v1.10.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.10.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index babf9098..b4e6247a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -494,11 +494,10 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", + "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", "dev": true, - "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -3316,9 +3315,9 @@ "dev": true }, "axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", + "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", "dev": true, "requires": { "follow-redirects": "^1.15.6", From 70e171a76a107ebe0c5b8597b15fb2fee9aa674c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 14 Jul 2025 20:30:35 +0200 Subject: [PATCH 346/356] Fix List updates in some cases. Disable removing details for now --- README.md | 4 ++++ alexa-remote.js | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eb3aae8c..b1651293 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix List updates in some cases. Disable removing details for now + ### 8.0.0 (2025-07-13) * IMPORTANT: This version updated "list" and "Smarthome" APIs to the latest Amazon changes. SOme of these are breaking! Please see changelog below for details! * (Apollon77) Added new methods as "V2" to represent the new Amazon API. The delivered data have a different structure and some values are not available anymore. diff --git a/alexa-remote.js b/alexa-remote.js index 658cf806..3f77cdba 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1646,10 +1646,10 @@ class AlexaRemote extends EventEmitter { itemAttributesToUpdate.push({ type: 'itemName', value: options.value }); break; case 'note': - if (options.note === null || options.note === undefined) { + /*if (options.note === null || options.note === undefined) { itemAttributesToRemove.push({ type: 'note' }); break; - } + }*/ itemAttributesToUpdate.push({ type: 'note', value: options.note }); break; case 'completed': @@ -1662,10 +1662,10 @@ class AlexaRemote extends EventEmitter { itemAttributesToUpdate.push({ type: 'itemStatus', value: options.itemStatus }); break; case 'quantity': - if (options.quantity === null || options.quantity === undefined) { + /*if (options.quantity === null || options.quantity === undefined) { itemAttributesToRemove.push({ type: 'quantity' }); break; - } + }*/ itemAttributesToUpdate.push({ type: 'quantity', value: options.quantity }); break; } From 457329c12d14557201c1a04d719ec3a073ad5768 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 14 Jul 2025 20:30:47 +0200 Subject: [PATCH 347/356] chore: release v8.0.1 * (Apollon77) Fix List updates in some cases. Disable removing details for now --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b1651293..1018b5d2 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 8.0.1 (2025-07-14) * (Apollon77) Fix List updates in some cases. Disable removing details for now ### 8.0.0 (2025-07-13) diff --git a/package-lock.json b/package-lock.json index ec43dd01..7ebe582e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "8.0.0", + "version": "8.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "8.0.0", + "version": "8.0.1", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.3", diff --git a/package.json b/package.json index 38168bfc..f0dd0d5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "8.0.0", + "version": "8.0.1", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From cb7fc55694e83b2b9bf3dfeb4dcfff306f9223df Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 14 Jul 2025 23:44:06 +0200 Subject: [PATCH 348/356] Fix List updates in some cases. Disable removing details for now --- README.md | 4 ++++ alexa-remote.js | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1018b5d2..11b595a1 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (Apollon77) Fix List updates in some cases. Disable removing details for now + ### 8.0.1 (2025-07-14) * (Apollon77) Fix List updates in some cases. Disable removing details for now diff --git a/alexa-remote.js b/alexa-remote.js index 3f77cdba..5d2d7f91 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -1646,10 +1646,10 @@ class AlexaRemote extends EventEmitter { itemAttributesToUpdate.push({ type: 'itemName', value: options.value }); break; case 'note': - /*if (options.note === null || options.note === undefined) { - itemAttributesToRemove.push({ type: 'note' }); + if (options.note === null || options.note === undefined) { + //itemAttributesToRemove.push({ type: 'note' }); break; - }*/ + } itemAttributesToUpdate.push({ type: 'note', value: options.note }); break; case 'completed': @@ -1662,10 +1662,10 @@ class AlexaRemote extends EventEmitter { itemAttributesToUpdate.push({ type: 'itemStatus', value: options.itemStatus }); break; case 'quantity': - /*if (options.quantity === null || options.quantity === undefined) { - itemAttributesToRemove.push({ type: 'quantity' }); + if (options.quantity === null || options.quantity === undefined) { + //itemAttributesToRemove.push({ type: 'quantity' }); break; - }*/ + } itemAttributesToUpdate.push({ type: 'quantity', value: options.quantity }); break; } From c1d86322a99e9aafd50e9a116f8760f9c466d973 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 14 Jul 2025 23:44:12 +0200 Subject: [PATCH 349/356] chore: release v8.0.2 * (Apollon77) Fix List updates in some cases. Disable removing details for now --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 11b595a1..4928cd7c 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 8.0.2 (2025-07-14) * (Apollon77) Fix List updates in some cases. Disable removing details for now ### 8.0.1 (2025-07-14) diff --git a/package-lock.json b/package-lock.json index 7ebe582e..d4c86648 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "8.0.1", + "version": "8.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "8.0.1", + "version": "8.0.2", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.3", diff --git a/package.json b/package.json index f0dd0d5a..f02a1a2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "8.0.1", + "version": "8.0.2", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From bd21d99786a89235a5901064568af3cbe86d916d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 05:06:29 +0000 Subject: [PATCH 350/356] chore(deps): bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-automerge.yml | 2 +- .github/workflows/test-and-release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index dfddd2c7..b172f56d 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Check if PR should be auto-merged uses: ahmadnassri/action-dependabot-auto-merge@v2 diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 68d25f9e..6a346b10 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -33,7 +33,7 @@ jobs: node-version: [22.x] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: @@ -61,7 +61,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 From e0323da6665ce3ebaaef01f636df4527a31e06c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Nov 2025 03:00:50 +0000 Subject: [PATCH 351/356] chore(deps): bump actions/setup-node from 4 to 6 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 68d25f9e..aae10751 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} @@ -64,7 +64,7 @@ jobs: uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} From f79905f94896a18d2f3d3214eb34672589e2a303 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 6 Nov 2025 10:15:12 +0100 Subject: [PATCH 352/356] Adjusts Authentication check to recent Amazon changes --- .github/workflows/test-and-release.yml | 7 +- README.md | 4 + alexa-remote.js | 31 +- package-lock.json | 394 +++++++++++++------------ package.json | 4 +- 5 files changed, 240 insertions(+), 200 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 68d25f9e..3fae554d 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -21,6 +21,10 @@ concurrency: group: ${{ github.ref }} cancel-in-progress: true +permissions: + id-token: write # Required for OIDC + contents: read + jobs: # Performs quick checks before the expensive test runs check-and-lint: @@ -92,8 +96,7 @@ jobs: # run: npm run build - name: Publish package to npm run: | - npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} - npm whoami + pm install -g npm@latest npm publish ${{ steps.extract_release.outputs.TAG }} - name: Create Github Release diff --git a/README.md b/README.md index 4928cd7c..c3b887a2 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,10 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: + +### __WORK IN PROGRESS__ +* (@Apollon77) Adjusts Authentication check to recent Amazon changes + ### 8.0.2 (2025-07-14) * (Apollon77) Fix List updates in some cases. Disable removing details for now diff --git a/alexa-remote.js b/alexa-remote.js index 5d2d7f91..9328bea6 100755 --- a/alexa-remote.js +++ b/alexa-remote.js @@ -115,7 +115,6 @@ class AlexaRemote extends EventEmitter { this.cookie = null; this.csrf = null; this.cookieData = null; - this.authenticationDetails = null; this.ownerCustomerId = null; this.endpoints = null; @@ -322,10 +321,6 @@ class AlexaRemote extends EventEmitter { return this; } - getAuthenticationDetails() { - return this.authenticationDetails; - } - initNotifications(callback) { if (!this._options.notifications) return callback && callback(); this.getNotifications((err, res) => { @@ -1110,8 +1105,8 @@ class AlexaRemote extends EventEmitter { path = noCheck; noCheck = false; } - // bypass check because set or last check done before less then 10 mins - if (noCheck || (new Date().getTime() - this.lastAuthCheck) < 600000) { + // bypass check because set or last check done before less than 30 mins + if (noCheck || (new Date().getTime() - this.lastAuthCheck) < 1800000) { this._options.logger && this._options.logger(`Alexa-Remote: No authentication check needed (time elapsed ${new Date().getTime() - this.lastAuthCheck})`); return this.httpsGetCall(path, callback, flags); } @@ -1364,13 +1359,12 @@ class AlexaRemote extends EventEmitter { checkAuthentication(callback) { // If we don't have a cookie assigned, we can't be authenticated if (this.cookie && this.csrf) { - this.httpsGetCall('/api/bootstrap?version=0', (err, res) => { - if (res && res.authentication && res.authentication.authenticated !== undefined) { - this.authenticationDetails = res.authentication; - this.ownerCustomerId = res.authentication.customerId; - return callback(res.authentication.authenticated, err); + this.httpsGetCall('/api/customer-status', (err, res) => { + if (!err && res) { + //this.ownerCustomerId = res.authentication.customerId; + return callback(true, null); } - if (err && !err.message.includes('no body')) { + if (err && !err.message.includes('401')) { return callback(null, err); } callback(false, err); @@ -2159,7 +2153,16 @@ class AlexaRemote extends EventEmitter { } tuneinSearchRaw(query, callback) { - this.httpsGet(`/api/tunein/search?query=${query}&mediaOwnerCustomerId=${this.ownerCustomerId}&_=%t`, callback); + if (!this.ownerCustomerId) { + this.getUsersMe((err, res) => { + if (err || !res || !res.id) return callback && callback(err, null); + + this.ownerCustomerId = res.id; + this.tuneinSearchRaw(query, callback); + }); + } else { + this.httpsGet(`/api/tunein/search?query=${query}&mediaOwnerCustomerId=${this.ownerCustomerId}&_=%t`, callback); + } } tuneinSearch(query, callback) { diff --git a/package-lock.json b/package-lock.json index d4c86648..dd793e96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,8 +17,8 @@ "ws": "^8.18.3" }, "devDependencies": { - "@alcalzone/release-script": "^3.8.0", - "@alcalzone/release-script-plugin-license": "^3.7.0", + "@alcalzone/release-script": "^5.0.0", + "@alcalzone/release-script-plugin-license": "^4.0.0", "eslint": "^8.57.1" }, "engines": { @@ -35,9 +35,9 @@ } }, "node_modules/@alcalzone/pak": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.2.tgz", - "integrity": "sha512-v+kM7HlfIVNLDlGBcbZvrG3yVK3rPLH5kIoGRJbCcoHwpUqQbfEMzXAy1ZrfP+zbI5phHw2PhgrXZr3z6nh7Ow==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.11.0.tgz", + "integrity": "sha512-S6s2Xug8VJ04Xgam7kV+dUydVB2gJmTem+Kr7oxneeXndWddgoQxphQNI9WqgpsifTkonC9wiAbj3qkMFlNeAA==", "dev": true, "license": "MIT", "dependencies": { @@ -73,24 +73,24 @@ } }, "node_modules/@alcalzone/release-script": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.8.0.tgz", - "integrity": "sha512-9H3imn8o9n3Ekpkie9TMgPeJfgT6WmklCMtOZ1wuwvMw/obNA0Ao1ZZ8CJfHk1YNjiLGmWn0kQFEGTqz4DoD7w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-5.0.0.tgz", + "integrity": "sha512-BKkD5wQBg/EF5lhAGkF9mgWFLLP+59RBoEVyvFOB1IRKOQOmwo8OYe7M0Q23yMCOpjzY9RU1CC2ESff7Mq/w8w==", "dev": true, "license": "MIT", "dependencies": { - "@alcalzone/release-script-core": "3.7.0", - "@alcalzone/release-script-plugin-changelog": "3.7.0", - "@alcalzone/release-script-plugin-exec": "3.7.0", - "@alcalzone/release-script-plugin-git": "3.8.0", - "@alcalzone/release-script-plugin-package": "3.7.3", - "@alcalzone/release-script-plugin-version": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/release-script-core": "4.0.0", + "@alcalzone/release-script-plugin-changelog": "4.0.0", + "@alcalzone/release-script-plugin-exec": "4.0.0", + "@alcalzone/release-script-plugin-git": "5.0.0", + "@alcalzone/release-script-plugin-package": "4.0.0", + "@alcalzone/release-script-plugin-version": "4.0.0", + "alcalzone-shared": "^5.0.0", "axios": "^1.6.2", "enquirer": "^2.3.6", "fs-extra": "^10.1.0", "picocolors": "1.0.0", - "semver": "^7.5.2", + "semver": "^7.7.2", "source-map-support": "^0.5.21", "yargs": "^17.4.1" }, @@ -98,107 +98,112 @@ "release-script": "bin/release.js" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@alcalzone/release-script-core": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.7.0.tgz", - "integrity": "sha512-4np4dBziwX/aNRhS/gpK8bwa0wpLe7oomzJ7YTUXf5bUtV/UTpN2a9tm5Bp7ElnisKj6N3AqHl4lVXRo4L9hYg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-4.0.0.tgz", + "integrity": "sha512-vwBhNzsUBpGDCVrL0fAkOkdsxCaGOC43UOgTbB4U27noBgz+J9rscc53DiafKniSyfK6+NgWzHcjwY1vtyvaEQ==", "dev": true, + "license": "MIT", "dependencies": { "execa": "^5.1.1" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@alcalzone/release-script-plugin-changelog": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.7.0.tgz", - "integrity": "sha512-AlLOIjIPP42uBmvcdYkfijYDzolyY6JmfbTmdxQDBLyrgYXnuUr2GaKxbpeWSbvcAuUhNvHCAyI6LI90X3OTEg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-4.0.0.tgz", + "integrity": "sha512-jFC8TCTWhFr0dkgFkKRKuEqCTvNqqpTAullbXbOK33oOyBHvsk8M6ma8fOFx3caH1WLQCWwmzt+nr7+Pwx3AqQ==", "dev": true, + "license": "MIT", "dependencies": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0", "fs-extra": "^10.1.0" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@alcalzone/release-script-plugin-exec": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.7.0.tgz", - "integrity": "sha512-ZhlKGhxa71mLyYB1/ojzik2RKcSAeIjuwKzlWRd6oUvKoZPe7eAjLYneXx5viQC6tvDJE4dvN1NlkFGWsSlZYA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-4.0.0.tgz", + "integrity": "sha512-STEQrbI91p+ZklKrSQq9obJ/OWMNC8U9GGYyy0Z36gMkfBTWYPu6B9aF+dMCBRdHvvacrvvMaux/uirt9EH3tQ==", "dev": true, + "license": "MIT", "dependencies": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1" + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@alcalzone/release-script-plugin-git": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.8.0.tgz", - "integrity": "sha512-rI9EqSmvMWaNZ5xxOUBZjD4WOv1Enl+/ZxhUoTROq+K/9RYYHQaAXilGWNvnz2DYr14Q+Yx/fs54GXgAVf0scg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-5.0.0.tgz", + "integrity": "sha512-OigoFIHQsZm6koYvFycnOolvGTjqh4XaL2P4E9IGSL8imIvuZz4FZ0X4bg3lV5wRY9AUYo1ui4lGfvcgorD+lw==", "dev": true, "license": "MIT", "dependencies": { - "@alcalzone/release-script-core": "3.7.0", + "@alcalzone/release-script-core": "4.0.0", "fs-extra": "^10.1.0" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@alcalzone/release-script-plugin-license": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.7.0.tgz", - "integrity": "sha512-HLnKHr3pc6NJJ7zAa8S/SdC305oEurnkRa9XNP5F6rgrixsxUiynBVh0tpPsVsOTdndm7fNIBRfR66IGnw0cag==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-4.0.0.tgz", + "integrity": "sha512-j9akvL9pvPE+KZdQmjF7/zQv2GoFESBSwrxnlIAaFVxuP0ApdnhnmRAMEsyJsLAFT5kpGpHVnjJ8K5dPKEvL+A==", "dev": true, + "license": "MIT", "dependencies": { - "@alcalzone/release-script-core": "3.7.0", + "@alcalzone/release-script-core": "4.0.0", "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@alcalzone/release-script-plugin-package": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.3.tgz", - "integrity": "sha512-5oKSwbvHs9jRhARJ04eQ7xqig3a7NmPJlhtBxAqUM8+0cjs2g/V1xTxM6o8aZ09uRSdq80YGVxJm871SyszAWQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-4.0.0.tgz", + "integrity": "sha512-Abxl9Ix/UtAvQTW3dzxHvl7L1ONigxV924KH6HIeqsOe/m2geeKTekbMxz76+EkBDusckKHWUq9pQWKOPv2ZNQ==", "dev": true, "license": "MIT", "dependencies": { - "@alcalzone/pak": "^0.10.1", - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/pak": "^0.11.0", + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0", "fs-extra": "^10.1.0", - "semver": "^7.5.2" + "semver": "^7.7.2" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@alcalzone/release-script-plugin-version": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.7.0.tgz", - "integrity": "sha512-030NGQeB+mglVz/58cx0WO4QiFChaSd/pz35mnOrUc9PbKWRpzisTVOt4IhCV/++YiAVibJO31NMNzvipPdx4Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-4.0.0.tgz", + "integrity": "sha512-ZbgGum7M1X0paDFYtcrlZRptPXy4SPqMDAZU6JgU/JSmifBSvuwEJpF42vt5POICrz3FkEmNUUdp9pZ44gYFXQ==", "dev": true, + "license": "MIT", "dependencies": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0", "fs-extra": "^10.1.0", - "semver": "^7.5.2", + "semver": "^7.7.2", "tiny-glob": "^0.2.9" }, "engines": { - "node": ">=12.20" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -405,15 +410,13 @@ } }, "node_modules/alcalzone-shared": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.8.tgz", - "integrity": "sha512-Rr0efCjNL9lw7miDvU8exL87Y42ehsLU2jUGNQUphhnlvxnTMrHeApWgoOSGZvsE2PhxC3KO7Z+VpQ/IbuV3aA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-5.0.0.tgz", + "integrity": "sha512-X73hgVWcrIKUUB6jZgHj5flRbTft8AAoJ2MqRKEcAX1whW3OeGkxsQ6ol4nd4/rKxd1eoCRXUGW3cIhXrXU4Sg==", "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, + "license": "MIT", "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/alexa-cookie2": { @@ -494,13 +497,14 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", - "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "dev": true, + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -925,6 +929,22 @@ "node": ">= 0.4" } }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1116,6 +1136,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -1360,14 +1381,16 @@ } }, "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -1472,6 +1495,7 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1583,6 +1607,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -1668,6 +1708,7 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } @@ -1805,6 +1846,7 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -1893,18 +1935,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/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==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -1936,7 +1966,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/methods": { "version": "1.1.2", @@ -1996,6 +2027,7 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2038,6 +2070,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -2083,6 +2116,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -2421,13 +2455,11 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2607,7 +2639,8 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/source-map": { "version": "0.6.1", @@ -2676,6 +2709,7 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2919,12 +2953,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "17.5.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", @@ -2973,9 +3001,9 @@ "dev": true }, "@alcalzone/pak": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.2.tgz", - "integrity": "sha512-v+kM7HlfIVNLDlGBcbZvrG3yVK3rPLH5kIoGRJbCcoHwpUqQbfEMzXAy1ZrfP+zbI5phHw2PhgrXZr3z6nh7Ow==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.11.0.tgz", + "integrity": "sha512-S6s2Xug8VJ04Xgam7kV+dUydVB2gJmTem+Kr7oxneeXndWddgoQxphQNI9WqgpsifTkonC9wiAbj3qkMFlNeAA==", "dev": true, "requires": { "axios": "^1.6.2", @@ -3005,101 +3033,101 @@ } }, "@alcalzone/release-script": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-3.8.0.tgz", - "integrity": "sha512-9H3imn8o9n3Ekpkie9TMgPeJfgT6WmklCMtOZ1wuwvMw/obNA0Ao1ZZ8CJfHk1YNjiLGmWn0kQFEGTqz4DoD7w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-5.0.0.tgz", + "integrity": "sha512-BKkD5wQBg/EF5lhAGkF9mgWFLLP+59RBoEVyvFOB1IRKOQOmwo8OYe7M0Q23yMCOpjzY9RU1CC2ESff7Mq/w8w==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.7.0", - "@alcalzone/release-script-plugin-changelog": "3.7.0", - "@alcalzone/release-script-plugin-exec": "3.7.0", - "@alcalzone/release-script-plugin-git": "3.8.0", - "@alcalzone/release-script-plugin-package": "3.7.3", - "@alcalzone/release-script-plugin-version": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/release-script-core": "4.0.0", + "@alcalzone/release-script-plugin-changelog": "4.0.0", + "@alcalzone/release-script-plugin-exec": "4.0.0", + "@alcalzone/release-script-plugin-git": "5.0.0", + "@alcalzone/release-script-plugin-package": "4.0.0", + "@alcalzone/release-script-plugin-version": "4.0.0", + "alcalzone-shared": "^5.0.0", "axios": "^1.6.2", "enquirer": "^2.3.6", "fs-extra": "^10.1.0", "picocolors": "1.0.0", - "semver": "^7.5.2", + "semver": "^7.7.2", "source-map-support": "^0.5.21", "yargs": "^17.4.1" } }, "@alcalzone/release-script-core": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.7.0.tgz", - "integrity": "sha512-4np4dBziwX/aNRhS/gpK8bwa0wpLe7oomzJ7YTUXf5bUtV/UTpN2a9tm5Bp7ElnisKj6N3AqHl4lVXRo4L9hYg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-4.0.0.tgz", + "integrity": "sha512-vwBhNzsUBpGDCVrL0fAkOkdsxCaGOC43UOgTbB4U27noBgz+J9rscc53DiafKniSyfK6+NgWzHcjwY1vtyvaEQ==", "dev": true, "requires": { "execa": "^5.1.1" } }, "@alcalzone/release-script-plugin-changelog": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.7.0.tgz", - "integrity": "sha512-AlLOIjIPP42uBmvcdYkfijYDzolyY6JmfbTmdxQDBLyrgYXnuUr2GaKxbpeWSbvcAuUhNvHCAyI6LI90X3OTEg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-4.0.0.tgz", + "integrity": "sha512-jFC8TCTWhFr0dkgFkKRKuEqCTvNqqpTAullbXbOK33oOyBHvsk8M6ma8fOFx3caH1WLQCWwmzt+nr7+Pwx3AqQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0", "fs-extra": "^10.1.0" } }, "@alcalzone/release-script-plugin-exec": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.7.0.tgz", - "integrity": "sha512-ZhlKGhxa71mLyYB1/ojzik2RKcSAeIjuwKzlWRd6oUvKoZPe7eAjLYneXx5viQC6tvDJE4dvN1NlkFGWsSlZYA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-4.0.0.tgz", + "integrity": "sha512-STEQrbI91p+ZklKrSQq9obJ/OWMNC8U9GGYyy0Z36gMkfBTWYPu6B9aF+dMCBRdHvvacrvvMaux/uirt9EH3tQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1" + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0" } }, "@alcalzone/release-script-plugin-git": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-3.8.0.tgz", - "integrity": "sha512-rI9EqSmvMWaNZ5xxOUBZjD4WOv1Enl+/ZxhUoTROq+K/9RYYHQaAXilGWNvnz2DYr14Q+Yx/fs54GXgAVf0scg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-5.0.0.tgz", + "integrity": "sha512-OigoFIHQsZm6koYvFycnOolvGTjqh4XaL2P4E9IGSL8imIvuZz4FZ0X4bg3lV5wRY9AUYo1ui4lGfvcgorD+lw==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.7.0", + "@alcalzone/release-script-core": "4.0.0", "fs-extra": "^10.1.0" } }, "@alcalzone/release-script-plugin-license": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.7.0.tgz", - "integrity": "sha512-HLnKHr3pc6NJJ7zAa8S/SdC305oEurnkRa9XNP5F6rgrixsxUiynBVh0tpPsVsOTdndm7fNIBRfR66IGnw0cag==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-4.0.0.tgz", + "integrity": "sha512-j9akvL9pvPE+KZdQmjF7/zQv2GoFESBSwrxnlIAaFVxuP0ApdnhnmRAMEsyJsLAFT5kpGpHVnjJ8K5dPKEvL+A==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.7.0", + "@alcalzone/release-script-core": "4.0.0", "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9" } }, "@alcalzone/release-script-plugin-package": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-3.7.3.tgz", - "integrity": "sha512-5oKSwbvHs9jRhARJ04eQ7xqig3a7NmPJlhtBxAqUM8+0cjs2g/V1xTxM6o8aZ09uRSdq80YGVxJm871SyszAWQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-4.0.0.tgz", + "integrity": "sha512-Abxl9Ix/UtAvQTW3dzxHvl7L1ONigxV924KH6HIeqsOe/m2geeKTekbMxz76+EkBDusckKHWUq9pQWKOPv2ZNQ==", "dev": true, "requires": { - "@alcalzone/pak": "^0.10.1", - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/pak": "^0.11.0", + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0", "fs-extra": "^10.1.0", - "semver": "^7.5.2" + "semver": "^7.7.2" } }, "@alcalzone/release-script-plugin-version": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-3.7.0.tgz", - "integrity": "sha512-030NGQeB+mglVz/58cx0WO4QiFChaSd/pz35mnOrUc9PbKWRpzisTVOt4IhCV/++YiAVibJO31NMNzvipPdx4Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-4.0.0.tgz", + "integrity": "sha512-ZbgGum7M1X0paDFYtcrlZRptPXy4SPqMDAZU6JgU/JSmifBSvuwEJpF42vt5POICrz3FkEmNUUdp9pZ44gYFXQ==", "dev": true, "requires": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", + "@alcalzone/release-script-core": "4.0.0", + "alcalzone-shared": "^5.0.0", "fs-extra": "^10.1.0", - "semver": "^7.5.2", + "semver": "^7.7.2", "tiny-glob": "^0.2.9" } }, @@ -3247,13 +3275,10 @@ } }, "alcalzone-shared": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.8.tgz", - "integrity": "sha512-Rr0efCjNL9lw7miDvU8exL87Y42ehsLU2jUGNQUphhnlvxnTMrHeApWgoOSGZvsE2PhxC3KO7Z+VpQ/IbuV3aA==", - "dev": true, - "requires": { - "debug": "^4.3.4" - } + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-5.0.0.tgz", + "integrity": "sha512-X73hgVWcrIKUUB6jZgHj5flRbTft8AAoJ2MqRKEcAX1whW3OeGkxsQ6ol4nd4/rKxd1eoCRXUGW3cIhXrXU4Sg==", + "dev": true }, "alexa-cookie2": { "version": "5.0.3", @@ -3314,13 +3339,13 @@ "dev": true }, "axios": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", - "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "dev": true, "requires": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -3622,6 +3647,18 @@ "es-errors": "^1.3.0" } }, + "es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "requires": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3937,13 +3974,15 @@ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==" }, "form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, @@ -4089,6 +4128,15 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.3" + } + }, "hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -4309,15 +4357,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "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==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -4656,13 +4695,10 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true }, "send": { "version": "0.19.0", @@ -5003,12 +5039,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { "version": "17.5.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", diff --git a/package.json b/package.json index f02a1a2e..69d6ee75 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "uuid": "^11.1.0" }, "devDependencies": { - "@alcalzone/release-script": "^3.8.0", - "@alcalzone/release-script-plugin-license": "^3.7.0", + "@alcalzone/release-script": "^5.0.0", + "@alcalzone/release-script-plugin-license": "^4.0.0", "eslint": "^8.57.1" }, "scripts": { From 3cc077419aec49081eac487a1f1f90e0c116afbc Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 6 Nov 2025 10:20:05 +0100 Subject: [PATCH 353/356] chore: release v8.0.3 * (@Apollon77) Adjusts Authentication check to recent Amazon changes --- README.md | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c3b887a2..1c8adedd 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: - -### __WORK IN PROGRESS__ +### 8.0.3 (2025-11-06) * (@Apollon77) Adjusts Authentication check to recent Amazon changes ### 8.0.2 (2025-07-14) diff --git a/package-lock.json b/package-lock.json index dd793e96..913e6d1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "8.0.2", + "version": "8.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "8.0.2", + "version": "8.0.3", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.3", diff --git a/package.json b/package.json index 69d6ee75..ad4e618e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "8.0.2", + "version": "8.0.3", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From bb5d3e428799a42754c6a74a59c8a4d6f327676c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 6 Nov 2025 10:23:18 +0100 Subject: [PATCH 354/356] fix deploy --- .github/workflows/test-and-release.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 21ebbf35..74378530 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -96,7 +96,7 @@ jobs: # run: npm run build - name: Publish package to npm run: | - pm install -g npm@latest + npm install -g npm@latest npm publish ${{ steps.extract_release.outputs.TAG }} - name: Create Github Release diff --git a/README.md b/README.md index 1c8adedd..1c23c484 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: -### 8.0.3 (2025-11-06) +### __WORK IN PROGRESS__ * (@Apollon77) Adjusts Authentication check to recent Amazon changes ### 8.0.2 (2025-07-14) From b44c0a933d11abc1d0741e05786c83d51e68bfd2 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 6 Nov 2025 10:23:26 +0100 Subject: [PATCH 355/356] chore: release v8.0.4 * (@Apollon77) Adjusts Authentication check to recent Amazon changes --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1c23c484..d1355507 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Thank you for that work. * docu docu docu (sorry ... will come) ## Changelog: -### __WORK IN PROGRESS__ +### 8.0.4 (2025-11-06) * (@Apollon77) Adjusts Authentication check to recent Amazon changes ### 8.0.2 (2025-07-14) diff --git a/package-lock.json b/package-lock.json index 913e6d1a..61af611a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alexa-remote2", - "version": "8.0.3", + "version": "8.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alexa-remote2", - "version": "8.0.3", + "version": "8.0.4", "license": "MIT", "dependencies": { "alexa-cookie2": "^5.0.3", diff --git a/package.json b/package.json index ad4e618e..b71e9fa0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alexa-remote2", - "version": "8.0.3", + "version": "8.0.4", "description": "Remote Control for amazon echo devices", "author": { "name": "Apollon77", From 1e1fd1fdd9b66b44e0c7528e50f90e388231d87f Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 6 Nov 2025 10:38:56 +0100 Subject: [PATCH 356/356] fix perms --- .github/workflows/test-and-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 74378530..4e2c2713 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -23,7 +23,8 @@ concurrency: permissions: id-token: write # Required for OIDC - contents: read + contents: write + pull-requests: read jobs: # Performs quick checks before the expensive test runs