From 8ccac4814fe121556bd0e0693834f4a8f432c6c9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 26 Nov 2019 09:25:46 +0100 Subject: [PATCH 001/729] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b3ac4aa..4fdf2ca3 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ 1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); - 2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); + 2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); 3MAINTENANCE_INTERVAL_DISTANCE_TO_INSPECTION", 2, "0x0203010003"); 4MAINTENANCE_INTERVAL_TIME_TO_INSPECTION", 3, "0x0203010004"); 5WARNING_OIL_CHANGE", 4, "0x0203010005"); @@ -204,4 +204,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. \ No newline at end of file + SOFTWARE. From 4f9a4091de31c6a113dfe3d240ff9f099814edf7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 26 Nov 2019 09:27:25 +0100 Subject: [PATCH 002/729] rm --- README.md | 487 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 281 insertions(+), 206 deletions(-) diff --git a/README.md b/README.md index 4fdf2ca3..07c2a8cb 100644 --- a/README.md +++ b/README.md @@ -1,207 +1,282 @@ ![Logo](admin/vw-connect.png) - # ioBroker.vw-connect - - [![NPM version](http://img.shields.io/npm/v/iobroker.vw-connect.svg)](https://www.npmjs.com/package/iobroker.vw-connect) - [![Downloads](https://img.shields.io/npm/dm/iobroker.vw-connect.svg)](https://www.npmjs.com/package/iobroker.vw-connect) - [![Dependency Status](https://img.shields.io/david/ta2k/iobroker.vw-connect.svg)](https://david-dm.org/ta2k/iobroker.vw-connect) - [![Known Vulnerabilities](https://snyk.io/test/github/ta2k/ioBroker.vw-connect/badge.svg)](https://snyk.io/test/github/ta2k/ioBroker.vw-connect) - - [![NPM](https://nodei.co/npm/iobroker.vw-connect.png?downloads=true)](https://nodei.co/npm/iobroker.vw-connect/) - - **Tests:**: [![Travis-CI](http://img.shields.io/travis/ta2k/ioBroker.vw-connect/master.svg)](https://travis-ci.org/ta2k/ioBroker.vw-connect) - - ## vw-connect adapter for ioBroker - - Adapter for VW We Connect and Skoda Connect - - ## Usage - Use the state under remote control to control your car remotly. - - ## Status fields Explanation - - - '0x0101010002.0x0101010002': //distanceCovered - - '0x0204FFFFFF.0x02040C0001': //adBlueInspectionData_km - - '0x0203FFFFFF.0x0203010001': //oilInspectionData_km - - '0x0203FFFFFF.0x0203010002': //oilInspectionData_days - - '0x0203FFFFFF.0x0203010003': //serviceInspectionData_km - - '0x0203FFFFFF.0x0203010004': //serviceInspectionData_days - - '0x030101FFFF.0x0301010001': //status_parking_light_off - - '0x030103FFFF.0x0301030001': //parking brake - - '0x030103FFFF.0x0301030007': //fuel type - - '0x030103FFFF.0x030103000A': //fuel level - - '0x030103FFFF.0x0301030006': //fuel range - - '0x030103FFFF.0x0301030009': //secondary_typ - erst ab Modelljahr 2018 - - '0x030103FFFF.0x0301030002': //soc_ok - - '0x030103FFFF.0x0301030008': //secondary_range - erst ab Modelljahr 2018 - - '0x030103FFFF.0x0301030005': //hybrid_range - erst ab Modelljahr 2018 - - 1 = open 2 = Locked 3 = Closed - //door1 - front/left - - '0x030104FFFF.0x0301040001': - //door2 - rear/left - - '0x030104FFFF.0x0301040004': - //door3 - front/right - - '0x030104FFFF.0x0301040007': - //door4 - rear/right - - '0x030104FFFF.0x030104000A': - //door5 - rear - - '0x030104FFFF.0x030104000D': - //door6 - hood - - '0x030104FFFF.0x0301040010': - //window1 - front/left - - '0x030105FFFF.0x0301050001': - //window2 - rear/left - - '0x030105FFFF.0x0301050003': - //window3 - front/right - - '0x030105FFFF.0x0301050005': - //window4 - rear/right - - '0x030105FFFF.0x0301050007': - //window4 - roof window - - '0x030105FFFF.0x030105000B': - - - 1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); - 2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); - 3MAINTENANCE_INTERVAL_DISTANCE_TO_INSPECTION", 2, "0x0203010003"); - 4MAINTENANCE_INTERVAL_TIME_TO_INSPECTION", 3, "0x0203010004"); - 5WARNING_OIL_CHANGE", 4, "0x0203010005"); - 6MAINTENANCE_INTERVAL_ALARM_INSPECTION", 5, "0x0203010006"); - 7MAINTENANCE_INTERVAL_MONTHLY_MILEAGE", 6, "0x0203010007"); - 8MAINTENANCE_INTERVAL_AD_BLUE_RANGE", 7, "0x02040C0001"); - 9OIL_LEVEL_AMOUNT_IN_LITERS", 8, "0x0204040001"); - 10OIL_LEVEL_MINIMUM_WARNING", 9, "0x0204040002"); - 11OIL_LEVEL_DIPSTICK_PERCENTAGE", 10, "0x0204040003"); - 12LIGHT_STATUS", 11, "0x0301010001"); - 13TOTAL_RANGE", 12, "0x0301030005"); - 14FUEL_LEVEL_IN_PERCENTAGE", 13, "0x030103000A"); - 15CNG_LEVEL_IN_PERCENTAGE", 14, "0x030103000D"); - 16LOCK_STATE_LEFT_FRONT_DOOR", 15, "0x0301040001"); - 17OPEN_STATE_LEFT_FRONT_DOOR", 16, "0x0301040002"); - 18SAFETY_STATE_LEFT_FRONT_DOOR", 17, "0x0301040003"); - 19LOCK_STATE_LEFT_REAR_DOOR", 18, "0x0301040004"); - 20OPEN_STATE_LEFT_REAR_DOOR", 19, "0x0301040005"); - 21SAFETY_STATE_LEFT_REAR_DOOR", 20, "0x0301040006"); - 22LOCK_STATE_RIGHT_FRONT_DOOR", 21, "0x0301040007"); - 23OPEN_STATE_RIGHT_FRONT_DOOR", 22, "0x0301040008"); - 24SAFETY_STATE_RIGHT_FRONT_DOOR", 23, "0x0301040009"); - 25LOCK_STATE_RIGHT_REAR_DOOR", 24, "0x030104000A"); - 26OPEN_STATE_RIGHT_REAR_DOOR", 25, "0x030104000B"); - 27SAFETY_STATE_RIGHT_REAR_DOOR", 26, "0x030104000C"); - 28LOCK_STATE_TRUNK_LID", 27, "0x030104000D"); - 29OPEN_STATE_TRUNK_LID", 28, "0x030104000E"); - 30SAFETY_STATE_TRUNK_LID", 29, "0x030104000F"); - 31LOCK_STATE_HOOD", 30, "0x0301040010"); - 32OPEN_STATE_HOOD", 31, "0x0301040011"); - 33SAFETY_STATE_HOOD", 32, "0x0301040012"); - 34STATE_LEFT_FRONT_WINDOW", 33, "0x0301050001"); - 35POSITION_LEFT_FRONT_WINDOW", 34, "0x0301050002"); - 36STATE_LEFT_REAR_WINDOW", 35, "0x0301050003"); - 37POSITION_LEFT_REAR_WINDOW", 36, "0x0301050004"); - 38STATE_RIGHT_FRONT_WINDOW", 37, "0x0301050005"); - 39POSITION_RIGHT_FRONT_WINDOW", 38, "0x0301050006"); - 40STATE_RIGHT_REAR_WINDOW", 39, "0x0301050007"); - 41POSITION_RIGHT_REAR_WINDOW", 40, "0x0301050008"); - 42STATE_CONVERTIBLE_TOP", 41, "0x0301050009"); - 43POSITION_CONVERTIBLE_TOP", 42, "0x030105000A"); - 44STATE_SUN_ROOF_MOTOR_COVER", 43, "0x030105000B"); - 45POSITION_SUN_ROOF_MOTOR_COVER", 44, "0x030105000C"); - 46STATE_SUN_ROOF_REAR_MOTOR_COVER_3", 45, "0x030105000D"); - 47POSITION_SUN_ROOF_REAR_MOTOR_COVER_3", 46, "0x030105000E"); - 48STATE_SERVICE_FLAP", 47, "0x030105000F"); - 49POSITION_SERVICE_FLAP", 48, "0x0301050010"); - 50STATE_SPOILER", 49, "0x0301050011"); - 51POSITION_SPOILER", 50, "0x0301050012"); - 52UTC_TIME_STATUS", 51, "0x0101010001"); - 53KILOMETER_STATUS", 52, "0x0101010002"); - 54PRIMARY_RANGE", 53, "0x0301030006"); - 55PRIMARY_DRIVE", 54, "0x0301030007"); - 56SECONDARY_RANGE", 55, "0x0301030008"); - 57SECONDARY_DRIVE", 56, "0x0301030009"); - 58STATE_OF_CHARGE", 57, "0x0301030002"); - 59TEMPERATURE_OUTSIDE", 58, "0x0301020001"); - 60PARKING_BRAKE", 59, "0x0301030001"); - 61TYRE_PRESSURE_LEFT_FRONT_CURRENT_VALUE", 60, "0x0301060001"); - 62TYRE_PRESSURE_LEFT_FRONT_DESIRED_VALUE", 61, "0x0301060002"); - 63TYRE_PRESSURE_LEFT_REAR_CURRENT_VALUE", 62, "0x0301060003"); - 64TYRE_PRESSURE_LEFT_REAR_DESIRED_VALUE", 63, "0x0301060004"); - 65TYRE_PRESSURE_RIGHT_FRONT_CURRENT_VALUE", 64, "0x0301060005"); - 66TYRE_PRESSURE_RIGHT_FRONT_DESIRED_VALUE", 65, "0x0301060006"); - 67TYRE_PRESSURE_RIGHT_REAR_CURRENT_VALUE", 66, "0x0301060007"); - 68TYRE_PRESSURE_RIGHT_REAR_DESIRED_VALUE", 67, "0x0301060008"); - 69TYRE_PRESSURE_SPARE_TYRE_CURRENT_VALUE", 68, "0x0301060009"); - 70TYRE_PRESSURE_SPARE_TYRE_DESIRED_VALUE", 69, "0x030106000A"); - 71TYRE_PRESSURE_LEFT_FRONT_TYRE_DIFFERENCE", 70, "0x030106000B"); - 72TYRE_PRESSURE_LEFT_REAR_TYRE_DIFFERENCE", 71, "0x030106000C"); - 73TYRE_PRESSURE_RIGHT_FRONT_TYRE_DIFFERENCE", 72, "0x030106000D"); - 74TYRE_PRESSURE_RIGHT_REAR_TYRE_DIFFERENCE", 73, "0x030106000E"); - 75TYRE_PRESSURE_SPARE_TYRE_DIFFERENCE", 74, "0x030106000F"); - - ## Changelog - - ### 0.0.6 - * add audi - - ### 0.0.5 - * add honk and flash, fix address format - - ### 0.0.4 - * add Skoda support - - ### 0.0.3 - * (ta2k) add more information - * (ta2k) add remote controls - - ### 0.0.2 - * (ta2k) add car status capturing - - ### 0.0.1 - * (ta2k) initial release - - ## License - MIT License - - Copyright (c) 2019 ta2k - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. +# ioBroker.vw-connect + +[![NPM version](http://img.shields.io/npm/v/iobroker.vw-connect.svg)](https://www.npmjs.com/package/iobroker.vw-connect) +[![Downloads](https://img.shields.io/npm/dm/iobroker.vw-connect.svg)](https://www.npmjs.com/package/iobroker.vw-connect) +[![Dependency Status](https://img.shields.io/david/ta2k/iobroker.vw-connect.svg)](https://david-dm.org/ta2k/iobroker.vw-connect) +[![Known Vulnerabilities](https://snyk.io/test/github/ta2k/ioBroker.vw-connect/badge.svg)](https://snyk.io/test/github/ta2k/ioBroker.vw-connect) + +[![NPM](https://nodei.co/npm/iobroker.vw-connect.png?downloads=true)](https://nodei.co/npm/iobroker.vw-connect/) + +**Tests:**: [![Travis-CI](http://img.shields.io/travis/ta2k/ioBroker.vw-connect/master.svg)](https://travis-ci.org/ta2k/ioBroker.vw-connect) + +## vw-connect adapter for ioBroker + +Adapter for VW We Connect and Skoda Connect + +## Usage +Use the state under remote control to control your car remotly. + +## Status fields Explanation + + +'0x0101010002.0x0101010002': //distanceCovered + +'0x0204FFFFFF.0x02040C0001': //adBlueInspectionData_km + +'0x0203FFFFFF.0x0203010001': //oilInspectionData_km + +'0x0203FFFFFF.0x0203010002': //oilInspectionData_days + +'0x0203FFFFFF.0x0203010003': //serviceInspectionData_km + +'0x0203FFFFFF.0x0203010004': //serviceInspectionData_days + +'0x030101FFFF.0x0301010001': //status_parking_light_off + +'0x030103FFFF.0x0301030001': //parking brake + +'0x030103FFFF.0x0301030007': //fuel type + +'0x030103FFFF.0x030103000A': //fuel level + +'0x030103FFFF.0x0301030006': //fuel range + +'0x030103FFFF.0x0301030009': //secondary_typ - erst ab Modelljahr 2018 + +'0x030103FFFF.0x0301030002': //soc_ok + +'0x030103FFFF.0x0301030008': //secondary_range - erst ab Modelljahr 2018 + +'0x030103FFFF.0x0301030005': //hybrid_range - erst ab Modelljahr 2018 + +1 = open 2 = Locked 3 = Closed +//door1 - front/left + +'0x030104FFFF.0x0301040001': +//door2 - rear/left + +'0x030104FFFF.0x0301040004': +//door3 - front/right + +'0x030104FFFF.0x0301040007': +//door4 - rear/right + +'0x030104FFFF.0x030104000A': +//door5 - rear + +'0x030104FFFF.0x030104000D': +//door6 - hood + +'0x030104FFFF.0x0301040010': +//window1 - front/left + +'0x030105FFFF.0x0301050001': +//window2 - rear/left + +'0x030105FFFF.0x0301050003': +//window3 - front/right + +'0x030105FFFF.0x0301050005': +//window4 - rear/right + +'0x030105FFFF.0x0301050007': +//window4 - roof window + +'0x030105FFFF.0x030105000B': + + + +1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); + +2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); + +3MAINTENANCE_INTERVAL_DISTANCE_TO_INSPECTION", 2, "0x0203010003"); + +4MAINTENANCE_INTERVAL_TIME_TO_INSPECTION", 3, "0x0203010004"); + +5WARNING_OIL_CHANGE", 4, "0x0203010005"); + +6MAINTENANCE_INTERVAL_ALARM_INSPECTION", 5, "0x0203010006"); + +7MAINTENANCE_INTERVAL_MONTHLY_MILEAGE", 6, "0x0203010007"); + +8MAINTENANCE_INTERVAL_AD_BLUE_RANGE", 7, "0x02040C0001"); + +9OIL_LEVEL_AMOUNT_IN_LITERS", 8, "0x0204040001"); + +10OIL_LEVEL_MINIMUM_WARNING", 9, "0x0204040002"); + +11OIL_LEVEL_DIPSTICK_PERCENTAGE", 10, "0x0204040003"); + +12LIGHT_STATUS", 11, "0x0301010001"); + +13TOTAL_RANGE", 12, "0x0301030005"); + +14FUEL_LEVEL_IN_PERCENTAGE", 13, "0x030103000A"); + +15CNG_LEVEL_IN_PERCENTAGE", 14, "0x030103000D"); + +16LOCK_STATE_LEFT_FRONT_DOOR", 15, "0x0301040001"); + +17OPEN_STATE_LEFT_FRONT_DOOR", 16, "0x0301040002"); + +18SAFETY_STATE_LEFT_FRONT_DOOR", 17, "0x0301040003"); + +19LOCK_STATE_LEFT_REAR_DOOR", 18, "0x0301040004"); + +20OPEN_STATE_LEFT_REAR_DOOR", 19, "0x0301040005"); + +21SAFETY_STATE_LEFT_REAR_DOOR", 20, "0x0301040006"); + +22LOCK_STATE_RIGHT_FRONT_DOOR", 21, "0x0301040007"); + +23OPEN_STATE_RIGHT_FRONT_DOOR", 22, "0x0301040008"); + +24SAFETY_STATE_RIGHT_FRONT_DOOR", 23, "0x0301040009"); + +25LOCK_STATE_RIGHT_REAR_DOOR", 24, "0x030104000A"); + +26OPEN_STATE_RIGHT_REAR_DOOR", 25, "0x030104000B"); + +27SAFETY_STATE_RIGHT_REAR_DOOR", 26, "0x030104000C"); + +28LOCK_STATE_TRUNK_LID", 27, "0x030104000D"); + +29OPEN_STATE_TRUNK_LID", 28, "0x030104000E"); + +30SAFETY_STATE_TRUNK_LID", 29, "0x030104000F"); + +31LOCK_STATE_HOOD", 30, "0x0301040010"); + +32OPEN_STATE_HOOD", 31, "0x0301040011"); + +33SAFETY_STATE_HOOD", 32, "0x0301040012"); + +34STATE_LEFT_FRONT_WINDOW", 33, "0x0301050001"); + +35POSITION_LEFT_FRONT_WINDOW", 34, "0x0301050002"); + +36STATE_LEFT_REAR_WINDOW", 35, "0x0301050003"); + +37POSITION_LEFT_REAR_WINDOW", 36, "0x0301050004"); + +38STATE_RIGHT_FRONT_WINDOW", 37, "0x0301050005"); + +39POSITION_RIGHT_FRONT_WINDOW", 38, "0x0301050006"); + +40STATE_RIGHT_REAR_WINDOW", 39, "0x0301050007"); + +41POSITION_RIGHT_REAR_WINDOW", 40, "0x0301050008"); + +42STATE_CONVERTIBLE_TOP", 41, "0x0301050009"); + +43POSITION_CONVERTIBLE_TOP", 42, "0x030105000A"); + +44STATE_SUN_ROOF_MOTOR_COVER", 43, "0x030105000B"); + +45POSITION_SUN_ROOF_MOTOR_COVER", 44, "0x030105000C"); + +46STATE_SUN_ROOF_REAR_MOTOR_COVER_3", 45, "0x030105000D"); + +47POSITION_SUN_ROOF_REAR_MOTOR_COVER_3", 46, "0x030105000E"); + +48STATE_SERVICE_FLAP", 47, "0x030105000F"); + +49POSITION_SERVICE_FLAP", 48, "0x0301050010"); + +50STATE_SPOILER", 49, "0x0301050011"); + +51POSITION_SPOILER", 50, "0x0301050012"); + +52UTC_TIME_STATUS", 51, "0x0101010001"); + +53KILOMETER_STATUS", 52, "0x0101010002"); + +54PRIMARY_RANGE", 53, "0x0301030006"); + +55PRIMARY_DRIVE", 54, "0x0301030007"); + +56SECONDARY_RANGE", 55, "0x0301030008"); + +57SECONDARY_DRIVE", 56, "0x0301030009"); + +58STATE_OF_CHARGE", 57, "0x0301030002"); + +59TEMPERATURE_OUTSIDE", 58, "0x0301020001"); + +60PARKING_BRAKE", 59, "0x0301030001"); + +61TYRE_PRESSURE_LEFT_FRONT_CURRENT_VALUE", 60, "0x0301060001"); + +62TYRE_PRESSURE_LEFT_FRONT_DESIRED_VALUE", 61, "0x0301060002"); + +63TYRE_PRESSURE_LEFT_REAR_CURRENT_VALUE", 62, "0x0301060003"); + +64TYRE_PRESSURE_LEFT_REAR_DESIRED_VALUE", 63, "0x0301060004"); + +65TYRE_PRESSURE_RIGHT_FRONT_CURRENT_VALUE", 64, "0x0301060005"); + +66TYRE_PRESSURE_RIGHT_FRONT_DESIRED_VALUE", 65, "0x0301060006"); + +67TYRE_PRESSURE_RIGHT_REAR_CURRENT_VALUE", 66, "0x0301060007"); + +68TYRE_PRESSURE_RIGHT_REAR_DESIRED_VALUE", 67, "0x0301060008"); + +69TYRE_PRESSURE_SPARE_TYRE_CURRENT_VALUE", 68, "0x0301060009"); + +70TYRE_PRESSURE_SPARE_TYRE_DESIRED_VALUE", 69, "0x030106000A"); + +71TYRE_PRESSURE_LEFT_FRONT_TYRE_DIFFERENCE", 70, "0x030106000B"); + +72TYRE_PRESSURE_LEFT_REAR_TYRE_DIFFERENCE", 71, "0x030106000C"); + +73TYRE_PRESSURE_RIGHT_FRONT_TYRE_DIFFERENCE", 72, "0x030106000D"); + +74TYRE_PRESSURE_RIGHT_REAR_TYRE_DIFFERENCE", 73, "0x030106000E"); + +75TYRE_PRESSURE_SPARE_TYRE_DIFFERENCE", 74, "0x030106000F"); + +## Changelog + +### 0.0.6 +* add audi + +### 0.0.5 +* add honk and flash, fix address format + +### 0.0.4 +* add Skoda support + +### 0.0.3 +* (ta2k) add more information +* (ta2k) add remote controls + +### 0.0.2 +* (ta2k) add car status capturing + +### 0.0.1 +* (ta2k) initial release + +## License +MIT License + +Copyright (c) 2019 ta2k + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file From 876d8cc883a9664f52b7142395a3b0f3e6830a5c Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 26 Nov 2019 09:32:10 +0100 Subject: [PATCH 003/729] 0.0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0436854c..d230fc2c 100644 --- a/package.json +++ b/package.json @@ -60,5 +60,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.5" + "version": "0.0.6" } From 3e5a919d9025c93fcbab17061a13a2fba9f32d42 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 28 Nov 2019 21:48:40 +0100 Subject: [PATCH 004/729] readme --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 07c2a8cb..c28c1239 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ ![Logo](admin/vw-connect.png) + # ioBroker.vw-connect [![NPM version](http://img.shields.io/npm/v/iobroker.vw-connect.svg)](https://www.npmjs.com/package/iobroker.vw-connect) @@ -12,13 +13,13 @@ ## vw-connect adapter for ioBroker -Adapter for VW We Connect and Skoda Connect +Adapter for VW We Connect, myAudi and Skoda Connect ## Usage -Use the state under remote control to control your car remotly. -## Status fields Explanation +Use the state under remote control to control your car remotly. +## Status fields Explanation '0x0101010002.0x0101010002': //distanceCovered @@ -85,8 +86,6 @@ Use the state under remote control to control your car remotly. '0x030105FFFF.0x030105000B': - - 1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); 2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); @@ -240,25 +239,32 @@ Use the state under remote control to control your car remotly. ## Changelog ### 0.0.6 + * add audi ### 0.0.5 + * add honk and flash, fix address format ### 0.0.4 + * add Skoda support ### 0.0.3 + * (ta2k) add more information * (ta2k) add remote controls ### 0.0.2 + * (ta2k) add car status capturing ### 0.0.1 + * (ta2k) initial release ## License + MIT License Copyright (c) 2019 ta2k @@ -279,4 +285,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. From d3820e60d4f716da330d5a6c58d3f2387a5b837f Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 29 Nov 2019 21:25:23 +0100 Subject: [PATCH 005/729] improve position and status updates --- main.js | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index 45ce6bc9..fb63220a 100644 --- a/main.js +++ b/main.js @@ -134,21 +134,25 @@ class VwWeconnect extends utils.Adapter { this.vinArray.forEach(vin => { this.getVehicleData(vin); this.getVehicleRights(vin); - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(()=>{ - this.log.debug("error while getting " + state.url) + this.requestStatusUpdate(vin).then(()=> { + this.statesArray.forEach(state => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(()=>{ + this.log.debug("error while getting " + state.url) + }); }); - }); + }) }); this.updateInterval = setInterval(() => { this.vinArray.forEach(vin => { - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(()=>{ - this.log.debug("error while getting " + state.url) + this.requestStatusUpdate(vin).then(()=> { + this.statesArray.forEach(state => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(()=>{ + this.log.debug("error while getting " + state.url) + }); }); - }); + }) }); }, this.config.interval * 60 * 1000); @@ -915,6 +919,44 @@ class VwWeconnect extends utils.Adapter { }); }); } + + requestStatusUpdate(vin) { + return new Promise((resolve, reject) => { + + const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + request.post({ + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" + + }, + followAllRedirects: true, + gzip: true, + json: true + }, (err, resp, body) => { + if (err) { + this.log.error(err); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)) + resolve(); + + } catch (error) { + this.log.error(error); + reject(); + } + }); + }); + } + getVehicleStatus(vin, url, path, element, element2) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); @@ -963,6 +1005,30 @@ class VwWeconnect extends utils.Adapter { // }); const adapter = this; + + if (path === "position"){ + this.setObjectNotExists(vin + ".position.isMoving", { + type: "state", + common: { + name: "is car moving", + role: "indicator", + type: "boolean", + write: false, + read: true + }, + native: {} + }); + + if(resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); + }else { + this.setState(vin + ".position.isMoving", false, true); + } + if ( body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + } + let result = body; if (result === "") { resolve(); From 7c5b68078afec647d3f3f14e8ca471134e32670e Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 30 Nov 2019 18:50:19 +0100 Subject: [PATCH 006/729] fix moving body error --- main.js | 54 +++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/main.js b/main.js index fb63220a..f507afdb 100644 --- a/main.js +++ b/main.js @@ -480,8 +480,7 @@ class VwWeconnect extends utils.Adapter { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; - } - if (this.config.type==="audi") { + } else if (this.config.type==="audi") { url= 'https://id.audi.com/v1/token'; body =""; form ={ client_id: this.clientId, @@ -503,6 +502,7 @@ class VwWeconnect extends utils.Adapter { }, body: body, form: form, + gzip: true, followAllRedirects: true }, (err, resp, body) => { if (err) { @@ -512,6 +512,7 @@ class VwWeconnect extends utils.Adapter { return; } try { + this.log.debug(body); const tokens = JSON.parse(body); if (isVw) { @@ -985,8 +986,33 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); + if (path === "position"){ + this.setObjectNotExists(vin + ".position.isMoving", { + type: "state", + common: { + name: "is car moving", + role: "indicator", + type: "boolean", + write: false, + read: true + }, + native: {} + }); + + if(resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); + resolve(); + return; + }else { + this.setState(vin + ".position.isMoving", false, true); + } + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + } + if (body === undefined || body === "" || body.error) { - if (body.error && body.error.description.indexOf("Token expired") !== -1) { + if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { this.log.error("Error response try to refresh token " + path); this.refreshToken(true); } else { @@ -1006,28 +1032,6 @@ class VwWeconnect extends utils.Adapter { const adapter = this; - if (path === "position"){ - this.setObjectNotExists(vin + ".position.isMoving", { - type: "state", - common: { - name: "is car moving", - role: "indicator", - type: "boolean", - write: false, - read: true - }, - native: {} - }); - - if(resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - }else { - this.setState(vin + ".position.isMoving", false, true); - } - if ( body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } - } let result = body; if (result === "") { From e171f9d87ac9400f06c74f06aae8c30a90787c58 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 30 Nov 2019 22:12:33 +0100 Subject: [PATCH 007/729] fix refresh token --- main.js | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/main.js b/main.js index f507afdb..853e6e42 100644 --- a/main.js +++ b/main.js @@ -425,11 +425,9 @@ class VwWeconnect extends utils.Adapter { this.config.rtoken = tokens.refresh_token; this.refreshTokenInterval = setInterval(() => { this.refreshToken().catch(() => { - setTimeout(() => { - this.refreshToken(); - }, 5 * 60 * 1000); + }); - }, 0.9 *60 * 60 * 1000); // 0.9hours + }, 0.9 * 60 * 60 * 1000); // 0.9hours request.post({ url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", headers: { @@ -457,9 +455,7 @@ class VwWeconnect extends utils.Adapter { this.config.vwrtoken = tokens.refresh_token; this.vwrefreshTokenInterval = setInterval(() => { this.refreshToken(true).catch(() => { - setTimeout(() => { - this.refreshToken(true); - }, 5 * 60 * 1000); + }); }, 0.9 * 60 * 60 * 1000); //0.9hours resolve(); @@ -475,7 +471,7 @@ class VwWeconnect extends utils.Adapter { let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; let rtoken = this.config.rtoken; let body = "refresh_token=" + rtoken; - let form= {}; + let form= ""; if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; @@ -514,14 +510,27 @@ class VwWeconnect extends utils.Adapter { try { this.log.debug(body); const tokens = JSON.parse(body); + if (tokens.error) { + this.log.error(body); + setTimeout(() => { + this.refreshToken(isVw); + }, 5 * 60 * 1000); + reject(); + return; + } if (isVw) { this.config.vwatoken = tokens.access_token; - this.config.vwrtoken = tokens.refresh_token; + if(tokens.refresh_token) { + this.config.vwrtoken = tokens.refresh_token; + } } else { this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; + if(tokens.refresh_token) { + this.config.rtoken = tokens.refresh_token; + + } } resolve(); @@ -673,7 +682,7 @@ class VwWeconnect extends utils.Adapter { reject(); return; } - this.log.debug(body); + this.log.debug(JSON.stringify(body)); const vehicles = body.userVehicles.vehicle; vehicles.forEach(vehicle => { this.vinArray.push(vehicle); @@ -802,7 +811,7 @@ class VwWeconnect extends utils.Adapter { } try { - this.log.debug(body); + this.log.debug(JSON.stringify(body)); const adapter = this; let result = body.vehicleData; if (this.config.type ==="audi") { From e5efb7325395a9d38db700f3aa08523c5de63c98 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Dec 2019 20:16:17 +0100 Subject: [PATCH 008/729] add position check --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 853e6e42..a8f388ff 100644 --- a/main.js +++ b/main.js @@ -1348,8 +1348,11 @@ class VwWeconnect extends utils.Adapter { json: true, followAllRedirects: true }, (err, resp, body) => { - if (err) { + if (err || resp.statusCode >= 400 || !body) { + this.log.error(body) + this.log.error(resp.statusCode) this.log.error(err); + return; } if (body.display_name) { try { From a356a7952402bfabadfda89e441b85c2fc75906c Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Dec 2019 20:17:39 +0100 Subject: [PATCH 009/729] add no display name --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index a8f388ff..be347e42 100644 --- a/main.js +++ b/main.js @@ -196,8 +196,9 @@ class VwWeconnect extends utils.Adapter { "upgrade-insecure-requests": 1 }, jar: this.jar, - form: form, + form: form, followAllRedirects: true + }, (err, resp, body) => { if (err) { this.log.error(err); @@ -1390,6 +1391,8 @@ class VwWeconnect extends utils.Adapter { } catch (error) { this.log.error(error); } + } else { + this.log.error(body) } }); From 8b7e4e169203d81390ec121bd93568b25558cb3c Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 4 Dec 2019 15:07:19 +0100 Subject: [PATCH 010/729] add error log --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index be347e42..3b18344d 100644 --- a/main.js +++ b/main.js @@ -536,9 +536,10 @@ class VwWeconnect extends utils.Adapter { resolve(); } catch (error) { - this.log.error("Failing to parse refresh token. Restart instance for relogin."); + this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); this.log.error(error); this.log.error(body); + this.log.error(resp.statusCode); this.log.error(error.stack); this.restart(); reject(); @@ -1024,6 +1025,7 @@ class VwWeconnect extends utils.Adapter { if (body === undefined || body === "" || body.error) { if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { this.log.error("Error response try to refresh token " + path); + this.log.error(JSON.stringify(body)); this.refreshToken(true); } else { this.log.debug("Not able to get " + path); From 2c5fedf7c0b0c796b2e0bde57f552186ec5a151b Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 4 Dec 2019 23:13:43 +0100 Subject: [PATCH 011/729] add go functionality --- admin/index_m.html | 1 + main.js | 457 ++++++++++++++++++++++++++++----------------- 2 files changed, 287 insertions(+), 171 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index c11686e7..90c89cf5 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -84,6 +84,7 @@ + diff --git a/main.js b/main.js index 3b18344d..e685ae1e 100644 --- a/main.js +++ b/main.js @@ -24,7 +24,7 @@ class VwWeconnect extends utils.Adapter { */ constructor(options) { super({ - ...options, + ...options, name: "vw-connect", }); this.on("ready", this.onReady.bind(this)); @@ -77,6 +77,11 @@ class VwWeconnect extends utils.Adapter { path: "charger", element: "charger" + }, { + url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", + path: "remoteStandheizung", + element: "statusResponse" + }, { url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", path: "history" @@ -125,30 +130,48 @@ class VwWeconnect extends utils.Adapter { this.xappversion = "3.14.0"; this.xappname = "myAudi"; } + if (this.config.type === "go") { + this.type = ""; + this.country = ""; + this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid%20profile%20address%20email%20phone"; + this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } this.login().then(() => { this.log.debug("Login successful"); this.setState("info.connection", true, true); this.getPersonalData().then(() => { this.getVehicles().then(() => { + if (this.config.type !== "go") { this.vinArray.forEach(vin => { this.getVehicleData(vin); this.getVehicleRights(vin); - this.requestStatusUpdate(vin).then(()=> { + this.requestStatusUpdate(vin).then(() => { this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(()=>{ + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { this.log.debug("error while getting " + state.url) }); }); }) }); + } this.updateInterval = setInterval(() => { + if (this.config.type !== "go") { + this.getVehicles(); + return; + } this.vinArray.forEach(vin => { - this.requestStatusUpdate(vin).then(()=> { + this.requestStatusUpdate(vin).then(() => { this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(()=>{ + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { this.log.debug("error while getting " + state.url) }); }); @@ -169,23 +192,25 @@ class VwWeconnect extends utils.Adapter { const [code_verifier, codeChallenge] = this.getCodeChallenge(); let method = "GET" - let form ={}; + let form = {}; let url = "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + this.clientId + "&scope=" + this.scope + "&response_type=" + this.responseType + "&redirect_uri=" + this.redirect + "&nonce=" + nonce + "&state=" + state; - if (this.config.type === "vw") { + if (this.config.type === "vw" || this.config.type === "go") { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; } if (this.config.type === "audi") { - url="https://id.audi.com/v1/token"; - method="POST"; - form= { client_id: this.clientId, - scope: this.scope, - response_type: this.responseType, - grant_type: 'password', - username: this.config.user, - password: this.config.password } + url = "https://id.audi.com/v1/token"; + method = "POST"; + form = { + client_id: this.clientId, + scope: this.scope, + response_type: this.responseType, + grant_type: 'password', + username: this.config.user, + password: this.config.password + } } request({ - method:method, + method: method, url: url, headers: { "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", @@ -196,7 +221,7 @@ class VwWeconnect extends utils.Adapter { "upgrade-insecure-requests": 1 }, jar: this.jar, - form: form, + form: form, followAllRedirects: true }, (err, resp, body) => { @@ -209,7 +234,7 @@ class VwWeconnect extends utils.Adapter { try { if (this.config.type === "audi") { const tokens = JSON.parse(body) - this.getVWToken(tokens,tokens.id_token,reject,resolve); + this.getVWToken(tokens, tokens.id_token, reject, resolve); return; } @@ -364,14 +389,20 @@ class VwWeconnect extends utils.Adapter { return url.replace("/$vin/", "/" + vin + "/").replace("/$type/", "/" + this.type + "/").replace("/$country/", "/" + this.country + "/").replace("/$tripType", "/" + this.config.tripType); } getTokens(getRequest, code_verifier, reject, resolve) { - const hashArray = getRequest.uri.hash.split("&"); + let hash = ""; + if (getRequest.uri.hash) { + hash = getRequest.uri.hash; + } else { + hash = getRequest.uri.query; + } + const hashArray = hash.split("&"); let state; let jwtauth_code; let jwtaccess_token; let jwtid_token; hashArray.forEach(hash => { const harray = hash.split("="); - if (harray[0] === "#state") { + if (harray[0] === "#state" || harray[0] === "state") { state = harray[1]; } if (harray[0] === "code") { @@ -389,13 +420,18 @@ class VwWeconnect extends utils.Adapter { // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; if (this.config.type === "vw") { body += "&code_verifier=" + code_verifier; } else { body += "&brand=" + this.config.type; } + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token" + body = "code=" + jwtauth_code + "&client_id=" + this.clientId + "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + code_verifier + } request.post({ - url: "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode", + url: url, headers: { // "user-agent": "okhttp/3.7.0", "X-App-version": this.xappversion, @@ -413,6 +449,7 @@ class VwWeconnect extends utils.Adapter { } try { const tokens = JSON.parse(body); + this.getVWToken(tokens, jwtid_token, reject, resolve); } catch (error) { this.log.error(error); @@ -426,9 +463,13 @@ class VwWeconnect extends utils.Adapter { this.config.rtoken = tokens.refresh_token; this.refreshTokenInterval = setInterval(() => { this.refreshToken().catch(() => { - + }); }, 0.9 * 60 * 60 * 1000); // 0.9hours + if (this.config.type === "go") { + resolve(); + return + } request.post({ url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", headers: { @@ -456,7 +497,7 @@ class VwWeconnect extends utils.Adapter { this.config.vwrtoken = tokens.refresh_token; this.vwrefreshTokenInterval = setInterval(() => { this.refreshToken(true).catch(() => { - + }); }, 0.9 * 60 * 60 * 1000); //0.9hours resolve(); @@ -472,18 +513,29 @@ class VwWeconnect extends utils.Adapter { let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; let rtoken = this.config.rtoken; let body = "refresh_token=" + rtoken; - let form= ""; + let form = ""; if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; - } else if (this.config.type==="audi") { - url= 'https://id.audi.com/v1/token'; - body =""; - form ={ client_id: this.clientId, - grant_type: 'refresh_token', - response_type: 'token id_token', - refresh_token: rtoken } + } else if (this.config.type === "audi") { + url = 'https://id.audi.com/v1/token'; + body = ""; + form = { + client_id: this.clientId, + grant_type: 'refresh_token', + response_type: 'token id_token', + refresh_token: rtoken + } + } else if (this.config.type === "go") { + url = 'https://dmp.apps.emea.vwapps.io/mobility-platform/token'; + body = ""; + form = { + scope: 'openid+profile+address+email+phone', + client_id: this.clientId, + grant_type: 'refresh_token', + refresh_token: rtoken + } } return new Promise((resolve, reject) => { this.log.debug("refreshToken"); @@ -497,7 +549,7 @@ class VwWeconnect extends utils.Adapter { "X-Client-Id": this.xclientId, "accept": "application/json" }, - body: body, + body: body, form: form, gzip: true, followAllRedirects: true @@ -522,13 +574,13 @@ class VwWeconnect extends utils.Adapter { if (isVw) { this.config.vwatoken = tokens.access_token; - if(tokens.refresh_token) { + if (tokens.refresh_token) { this.config.vwrtoken = tokens.refresh_token; } } else { this.config.atoken = tokens.access_token; - if(tokens.refresh_token) { + if (tokens.refresh_token) { this.config.rtoken = tokens.refresh_token; } @@ -550,7 +602,7 @@ class VwWeconnect extends utils.Adapter { getPersonalData() { return new Promise((resolve, reject) => { - if (this.config.type ==="audi") { + if (this.config.type === "audi" || this.config.type === "go") { resolve(); return; } @@ -659,130 +711,194 @@ class VwWeconnect extends utils.Adapter { getVehicles() { return new Promise((resolve, reject) => { - const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); - request.get({ - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json" - }, - followAllRedirects: true, - gzip: true, - json: true, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - } - try { - if (body.errorCode) { - this.log.error(JSON.stringify(body)); + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); + let headers = { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json" + } + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + headers = { + 'user-agent': 'okhttp/3.9.1', + 'authorization': 'Bearer ' + this.config.atoken, + 'accept-language': 'de-DE', + 'dmp-api-version': 'v2.0', + 'dmp-client-info': 'Android/7.0/VW Connect/App/2.9.4', + 'accept': 'application/json;charset=UTF-8' + }; + } + request.get({ + url: url, + headers: headers, + followAllRedirects: true, + gzip: true, + json: true, + }, (err, resp, body) => { + if (err) { + this.log.error(err); reject(); - return; } - this.log.debug(JSON.stringify(body)); - const vehicles = body.userVehicles.vehicle; - vehicles.forEach(vehicle => { - this.vinArray.push(vehicle); - this.setObjectNotExists(vehicle, { - type: "device", - common: { - name: vehicle.title, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.batterycharge", { - type: "state", - common: { - name: "Start Battery Charge", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisation", { - type: "state", - common: { - name: "Start Climatisation", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { - type: "state", - common: { - name: "Temperature in °C", - type: "boolean", - role: "number", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.windowheating", { - type: "state", - common: { - name: "Start Windowheating", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.honk", { - type: "state", - common: { - name: "Start Honk", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.flash", { - type: "state", - common: { - name: "Start Flash", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); + try { + if (body.errorCode) { + this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + if (this.config.type === "go") { + body.forEach(element => { + const vin = element.vehicle.vin; + this.setObjectNotExists(element.vehicle.vin, { + type: "device", + common: { + name: element.licencePlate, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + const adapter = this; + let result = body.vehicleData; + + traverse(element).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + } + }); - }); - resolve(); + }) + resolve(); + return; + } + const vehicles = body.userVehicles.vehicle; + vehicles.forEach(vehicle => { + this.vinArray.push(vehicle); + this.setObjectNotExists(vehicle, { + type: "device", + common: { + name: vehicle.title, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.batterycharge", { + type: "state", + common: { + name: "Start Battery Charge", + type: "boolean", + role: "button", + write: true, + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.climatisation", { + type: "state", + common: { + name: "Start Climatisation", + type: "boolean", + role: "button", + write: true, + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { + type: "state", + common: { + name: "Temperature in °C", + type: "boolean", + role: "number", + write: true, + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.windowheating", { + type: "state", + common: { + name: "Start Windowheating", + type: "boolean", + role: "button", + write: true, + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.honk", { + type: "state", + common: { + name: "Start Honk", + type: "boolean", + role: "button", + write: true, + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.flash", { + type: "state", + common: { + name: "Start Flash", + type: "boolean", + role: "button", + write: true, + }, + native: {} + }); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - this.log.error("Not able to find vehicle, did you choose the correct type?.") - reject(); - } + }); + resolve(); + + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + this.log.error("Not able to find vehicle, did you choose the correct type?.") + reject(); + } + }); }); - }); } getVehicleData(vin) { return new Promise((resolve, reject) => { + if (this.config.type === "go") { + resolve(); + return; + } let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); if (this.config.type !== "vw") { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); @@ -816,7 +932,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); const adapter = this; let result = body.vehicleData; - if (this.config.type ==="audi") { + if (this.config.type === "audi") { result = body.vehicles[this.vinArray.indexOf(vin)] } traverse(result).forEach(function (value) { @@ -859,7 +975,10 @@ class VwWeconnect extends utils.Adapter { getVehicleRights(vin) { return new Promise((resolve, reject) => { - + if (this.config.type === "go" || !this.config.rights) { + resolve(); + return; + } let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; if (this.config.type === "vw") { url += "/users/" + this.config.identifier @@ -887,10 +1006,6 @@ class VwWeconnect extends utils.Adapter { } try { - if (!this.config.rights) { - resolve(); - return; - } const adapter = this; traverse(body.operationList).forEach(function (value) { if (this.path.length > 0 && this.isLeaf) { @@ -934,7 +1049,7 @@ class VwWeconnect extends utils.Adapter { requestStatusUpdate(vin) { return new Promise((resolve, reject) => { - + const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); request.post({ url: url, @@ -997,7 +1112,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); - if (path === "position"){ + if (path === "position") { this.setObjectNotExists(vin + ".position.isMoving", { type: "state", common: { @@ -1009,15 +1124,15 @@ class VwWeconnect extends utils.Adapter { }, native: {} }); - - if(resp.statusCode === 204) { + + if (resp.statusCode === 204) { this.setState(vin + ".position.isMoving", true, true); resolve(); return; - }else { + } else { this.setState(vin + ".position.isMoving", false, true); } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; } } @@ -1099,7 +1214,7 @@ class VwWeconnect extends utils.Adapter { native: {} }); adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); - } else if ((path === "status" || path ==="tripdata" ) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { const modPath = this.path; this.path.forEach((pathElement, pathIndex) => { if (!isNaN(parseInt(pathElement))) { @@ -1113,11 +1228,11 @@ class VwWeconnect extends utils.Adapter { } }); - if (this.node.field && this.node.field[this.node.field.length -1].textId) { + if (this.node.field && this.node.field[this.node.field.length - 1].textId) { adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { type: "state", common: { - name: this.node.field[this.node.field.length -1].textId, + name: this.node.field[this.node.field.length - 1].textId, role: "indicator", type: "mixed", write: false, @@ -1151,7 +1266,7 @@ class VwWeconnect extends utils.Adapter { native: {} }); } - + } }); @@ -1316,7 +1431,7 @@ class VwWeconnect extends utils.Adapter { const posId = idArray.join("."); const longitude = await this.getStateAsync(posId + ".longitude"); const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":'+latitude.val+',"longitude":'+longitude.val+'}}}'; + body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + '}}}'; contentType = 'application/json; charset=UTF-8'; this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); } @@ -1330,7 +1445,7 @@ class VwWeconnect extends utils.Adapter { const posId = idArray.join("."); const longitude = await this.getStateAsync(posId + ".longitude"); const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":'+latitude.val+',"longitude":'+longitude.val+'}}}'; + body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + '}}}'; contentType = 'application/json; charset=UTF-8'; this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); } @@ -1359,9 +1474,9 @@ class VwWeconnect extends utils.Adapter { } if (body.display_name) { try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", "+ body.address.postcode+ " "+ city + ", " + body.address.country; + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; this.setObjectNotExists(vin + ".position.address.displayName", { type: "state", common: { From d9b92bdc82587048a4574aada62f533624e91d46 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 4 Dec 2019 23:18:33 +0100 Subject: [PATCH 012/729] typo --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index e685ae1e..551ce1c8 100644 --- a/main.js +++ b/main.js @@ -164,7 +164,7 @@ class VwWeconnect extends utils.Adapter { } this.updateInterval = setInterval(() => { - if (this.config.type !== "go") { + if (this.config.type === "go") { this.getVehicles(); return; } From ec5a572db662beb06d4b414c8256700704f7c542 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 5 Dec 2019 19:10:04 +0100 Subject: [PATCH 013/729] 0.0.7 --- README.md | 8 +- admin/index_m.html | 7 +- io-package.json | 9 +- main.js | 504 ++++++++++++++++++++++++++++++--------------- package.json | 8 +- 5 files changed, 359 insertions(+), 177 deletions(-) diff --git a/README.md b/README.md index c28c1239..d32890d7 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@ ## vw-connect adapter for ioBroker -Adapter for VW We Connect, myAudi and Skoda Connect +Adapter for VW We Connect, myAudi, Skoda Connect and We Connect Go ## Usage -Use the state under remote control to control your car remotly. +Use the state under remote control to control your car remotely. ## Status fields Explanation @@ -238,6 +238,10 @@ Use the state under remote control to control your car remotly. ## Changelog +### 0.0.7 + +* add we connect go and remote standheizung and lock/unlock + ### 0.0.6 * add audi diff --git a/admin/index_m.html b/admin/index_m.html index 90c89cf5..a5115c8c 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -95,7 +95,12 @@ - +
+
+ + +
+
+ +
+
- +
diff --git a/io-package.json b/io-package.json index b096ed76..58e0e4b1 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.7", + "version": "0.0.8", "news": { + "0.0.8": { + "en": "increase default interval" + }, "0.0.7": { "en": "add we connect go and remote standheizung and lock/unlock" }, @@ -102,7 +105,7 @@ "pin": "", "identifier": "", "interval": 15, - "forceinterval": 60, + "forceinterval": 360, "type": "vw", "reversePos": false, "rights": false, @@ -132,4 +135,4 @@ "native": {} } ] -} +} \ No newline at end of file diff --git a/main.js b/main.js index 909e4f1e..f7118996 100644 --- a/main.js +++ b/main.js @@ -179,6 +179,7 @@ class VwWeconnect extends utils.Adapter { }); }, this.config.interval * 60 * 1000); + if (this.config.forceinterval > 0) { this.fupdateInterval = setInterval(() => { if (this.config.type === "go") { this.getVehicles(); @@ -188,7 +189,7 @@ class VwWeconnect extends utils.Adapter { this.requestStatusUpdate(vin); }); }, this.config.forceinterval * 60 * 1000); - + } }); }); diff --git a/package.json b/package.json index bb1426bd..136d2f40 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.7", + "version": "0.0.8", "engines": { "node": ">=10.0.0" } From 34ca416836e9ab90b6ff79482daa2343e0bab070 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 21 Jan 2020 10:16:17 +0100 Subject: [PATCH 041/729] fix review issues #3 --- iob_npm.done | 1 - main.js | 3506 +++++++++++++++++++++++++------------------------- 2 files changed, 1775 insertions(+), 1732 deletions(-) delete mode 100644 iob_npm.done diff --git a/iob_npm.done b/iob_npm.done deleted file mode 100644 index 0519ecba..00000000 --- a/iob_npm.done +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/main.js b/main.js index f7118996..ea553c5f 100644 --- a/main.js +++ b/main.js @@ -8,1746 +8,1790 @@ // you need to create an adapter const utils = require("@iobroker/adapter-core"); - const request = require("request"); const crypto = require("crypto"); const { Crypto } = require("@peculiar/webcrypto"); const uuidv4 = require("uuid/v4"); const traverse = require("traverse"); const jsdom = require("jsdom"); -const { - JSDOM -} = jsdom; +const { JSDOM } = jsdom; class VwWeconnect extends utils.Adapter { - - /** - * @param {Partial} [options={}] - */ - constructor(options) { - super({ - ...options, - name: "vw-connect", - }); - this.on("ready", this.onReady.bind(this)); - // this.on("objectChange", this.onObjectChange.bind(this)); - this.on("stateChange", this.onStateChange.bind(this)); - // this.on("message", this.onMessage.bind(this)); - this.on("unload", this.onUnload.bind(this)); - - - this.jar = request.jar(); - - this.refreshTokenInterval = null; - this.vwrefreshTokenInterval = null; - this.updateInterval = null; - this.fupdateInterval = null; - - this.vinArray = []; - - this.statesArray = [{ - url: "https://msg.volkswagen.de/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", - path: "timer", - element: "timer" - }, { - url: "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", - path: "climater", - element: "climater" - - }, { - url: "https://msg.volkswagen.de/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", - path: "position", - element: "storedPositionResponse", - element2: "position" - - }, { - url: "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", - path: "tripdata", - element: "tripDataList" - }, { - url: "https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", - path: "status", - element: "StoredVehicleDataResponse", - element2: "vehicleData" - - }, { - url: "https://msg.volkswagen.de/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", - path: "destinations", - element: "destinations" - - }, { - url: "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", - path: "charger", - element: "charger" - - }, { - url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", - path: "remoteStandheizung", - element: "statusResponse" - - }, { - url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", - path: "history" - }]; - } - - /** - * Is called when databases are connected and adapter received configuration. - */ - async onReady() { - // Initialize your adapter here - - this.setState("info.connection", false, true); - // Reset the connection indicator during startup - this.type = "VW"; - this.country = "DE"; - this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; - this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; - this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; - this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; - this.xrequest = "de.volkswagen.carnet.eu.eremote"; - this.responseType = "id_token%20token%20code"; - this.xappversion = "5.1.2"; - this.xappname = "eRemote"; - if (this.config.type === "skoda") { - this.type = "Skoda"; - this.country = "CZ"; - this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; - this.xclientId = "28cd30c6-dee7-4529-a0e6-b1e07ff90b79"; - this.scope = "openid%20profile%20phone%20address%20cars%20email%20birthdate%20badge%20dealers%20driversLicense%20mbb"; - this.redirect = "skodaconnect%3A%2F%2Foidc.login%2F"; - this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; - this.xappversion = "3.1.6"; - this.xappname = "cz.skodaauto.connect"; - } - if (this.config.type === "audi") { - this.type = "Audi"; - this.country = "DE"; - this.clientId = 'mmiconnect_android'; - this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; - this.scope = 'openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write'; - this.redirect = ""; - this.xrequest = ""; - this.responseType = 'token id_token'; - this.xappversion = "3.14.0"; - this.xappname = "myAudi"; - } - if (this.config.type === "go") { - this.type = ""; - this.country = ""; - this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid%20profile%20address%20email%20phone"; - this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; - this.xrequest = ""; - this.responseType = "code"; - this.xappversion = ""; - this.xappname = ""; - } - this.login().then(() => { - this.log.debug("Login successful"); - this.setState("info.connection", true, true); - this.getPersonalData().then(() => { - this.getVehicles().then(() => { - - if (this.config.type !== "go") { - this.vinArray.forEach(vin => { - this.getVehicleData(vin); - this.getVehicleRights(vin); - this.requestStatusUpdate(vin).then(() => { - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url) - }); - }); - }) - - }); - } - - this.updateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach(vin => { - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - - }); - }, this.config.interval * 60 * 1000); - if (this.config.forceinterval > 0) { - this.fupdateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach(vin => { - this.requestStatusUpdate(vin); - }); - }, this.config.forceinterval * 60 * 1000); - } - }); - - }); - }); - this.subscribeStates("*"); - } - login() { - return new Promise((resolve, reject) => { - const nonce = this.getNonce(); - const state = uuidv4(); - const [code_verifier, codeChallenge] = this.getCodeChallenge(); - - let method = "GET" - let form = {}; - let url = "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + this.clientId + "&scope=" + this.scope + "&response_type=" + this.responseType + "&redirect_uri=" + this.redirect + "&nonce=" + nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "go") { - url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; - } - if (this.config.type === "audi") { - url = "https://id.audi.com/v1/token"; - method = "POST"; - form = { - client_id: this.clientId, - scope: this.scope, - response_type: this.responseType, - grant_type: 'password', - username: this.config.user, - password: this.config.password - } - } - request({ - method: method, - url: url, - headers: { - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - "upgrade-insecure-requests": 1 - }, - jar: this.jar, - form: form, - followAllRedirects: true - - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - } - - - try { - if (this.config.type === "audi") { - const tokens = JSON.parse(body) - this.getVWToken(tokens, tokens.id_token, reject, resolve); - return; - } - - const dom = new JSDOM(body); - const form = {}; - const formLogin = dom.window.document.querySelector("#emailPasswordForm"); - if (formLogin) { - this.log.debug("parseEmailForm"); - for (const formElement of dom.window.document.querySelector("#emailPasswordForm").children) { - if (formElement.type === "hidden") { - form[formElement.name] = formElement.value; - } - } - form["email"] = this.config.user; - } else { - this.log.error("No Login Form found"); - this.log.debug(body); - reject(); - } - request.post({ - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - form: form, - jar: this.jar, - followAllRedirects: true - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - } - try { - const dom = new JSDOM(body); - const form = {}; - const formLogin = dom.window.document.querySelector("#credentialsForm"); - if (formLogin) { - this.log.debug("parsePasswordForm"); - for (const formElement of dom.window.document.querySelector("#credentialsForm").children) { - if (formElement.type === "hidden") { - form[formElement.name] = formElement.value; - } - } - form["password"] = this.config.password; - } else { - this.log.error("No Login Form found"); - this.log.debug(body); - reject(); - } - request.post({ - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - form: form, - jar: this.jar, - followAllRedirects: false, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - } - - try { - this.log.debug(JSON.stringify(body)); - this.log.debug(JSON.stringify(resp.headers)); - this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; - let getRequest = request.get({ - url: resp.headers.location, - headers: { - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - jar: this.jar, - followAllRedirects: true, - }, (err, resp, body) => { - - if (err) { - this.getTokens(getRequest, code_verifier, reject, resolve); - } else { - this.log.debug("No Token received visiting url and accept the permissions."); - const dom = new JSDOM(body); - let form = ""; - for (const formElement of dom.window.document.querySelectorAll("input")) { - if (formElement.type === "hidden") { - form += formElement.name + "=" + formElement.value + "&"; - } - } - getRequest = request.post({ - url: getRequest.uri.href, - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - "referer": getRequest.uri.href - }, - form: form, - jar: this.jar, - followAllRedirects: true, - }, (err, resp, body) => { - if (err) { - this.getTokens(getRequest, code_verifier, reject, resolve); - - } else { - this.log.error("No Token received."); - try { - this.log.debug(body); - } catch (error) { - this.log.error(error); - reject(); - } - } - - }); - } - }); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - }); - } catch (error) { - this.log.error(error); - reject(); - } - }); - } catch (error) { - this.log.error(error); - reject(); - } - }); - }); - } - - replaceVarInUrl(url, vin) { - return url.replace("/$vin/", "/" + vin + "/").replace("/$type/", "/" + this.type + "/").replace("/$country/", "/" + this.country + "/").replace("/$tripType", "/" + this.config.tripType); - } - getTokens(getRequest, code_verifier, reject, resolve) { - let hash = ""; - if (getRequest.uri.hash) { - hash = getRequest.uri.hash; - } else { - hash = getRequest.uri.query; - } - const hashArray = hash.split("&"); - let state; - let jwtauth_code; - let jwtaccess_token; - let jwtid_token; - hashArray.forEach(hash => { - const harray = hash.split("="); - if (harray[0] === "#state" || harray[0] === "state") { - state = harray[1]; - } - if (harray[0] === "code") { - jwtauth_code = harray[1]; - } - if (harray[0] === "access_token") { - jwtaccess_token = harray[1]; - } - if (harray[0] === "id_token") { - jwtid_token = harray[1]; - } - }); - // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); - // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); - // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); - // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); - let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; - if (this.config.type === "vw") { - body += "&code_verifier=" + code_verifier; - } else { - body += "&brand=" + this.config.type; - } - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token" - body = "code=" + jwtauth_code + "&client_id=" + this.clientId + "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + code_verifier - } - request.post({ - url: url, - headers: { - // "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "content-type": "application/x-www-form-urlencoded", - "x-app-name": this.xappname, - accept: "application/json" - }, - body: body, - jar: this.jar, - followAllRedirects: false, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - } - try { - const tokens = JSON.parse(body); - - this.getVWToken(tokens, jwtid_token, reject, resolve); - } catch (error) { - this.log.error(error); - reject(); - } - }); - } - - getVWToken(tokens, jwtid_token, reject, resolve) { - this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; - this.refreshTokenInterval = setInterval(() => { - this.refreshToken().catch(() => { - - }); - }, 0.9 * 60 * 60 * 1000); // 0.9hours - if (this.config.type === "go") { - resolve(); - return - } - request.post({ - url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Client-Id": this.xclientId, - Host: "mbboauth-1d.prd.ece.vwg-connect.com", - }, - form: { - grant_type: "id_token", - token: jwtid_token, - scope: "sc2:fal" - }, - jar: this.jar, - followAllRedirects: true, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - } - try { - const tokens = JSON.parse(body); - this.config.vwatoken = tokens.access_token; - this.config.vwrtoken = tokens.refresh_token; - this.vwrefreshTokenInterval = setInterval(() => { - this.refreshToken(true).catch(() => { - - }); - }, 0.9 * 60 * 60 * 1000); //0.9hours - resolve(); - } - catch (error) { - this.log.error(error); - reject(); - } - }); - } - - refreshToken(isVw) { - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; - let rtoken = this.config.rtoken; - let body = "refresh_token=" + rtoken; - let form = ""; - if (isVw) { - url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; - rtoken = this.config.vwrtoken; - body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; - } else if (this.config.type === "audi") { - url = 'https://id.audi.com/v1/token'; - body = ""; - form = { - client_id: this.clientId, - grant_type: 'refresh_token', - response_type: 'token id_token', - refresh_token: rtoken - } - } else if (this.config.type === "go") { - url = 'https://dmp.apps.emea.vwapps.io/mobility-platform/token'; - body = ""; - form = { - scope: 'openid+profile+address+email+phone', - client_id: this.clientId, - grant_type: 'refresh_token', - refresh_token: rtoken - } - } - return new Promise((resolve, reject) => { - this.log.debug("refreshToken"); - request.post({ - url: url, - headers: { - "user-agent": "okhttp/3.7.0", - "content-type": "application/x-www-form-urlencoded", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - "X-Client-Id": this.xclientId, - "accept": "application/json" - }, - body: body, - form: form, - gzip: true, - followAllRedirects: true - }, (err, resp, body) => { - if (err) { - this.log.error("Failing to refresh token."); - this.log.error(err); - reject(); - return; - } - try { - this.log.debug(body); - const tokens = JSON.parse(body); - if (tokens.error) { - this.log.error(body); - setTimeout(() => { - this.refreshToken(isVw); - }, 5 * 60 * 1000); - reject(); - return; - } - if (isVw) { - - this.config.vwatoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.vwrtoken = tokens.refresh_token; - } - - } else { - this.config.atoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.rtoken = tokens.refresh_token; - - } - } - resolve(); - - } catch (error) { - this.log.error( - "Failing to parse refresh token. The instance will do restart and try a relogin." - ); - this.log.error(error); - this.log.error(body); - this.log.error(resp.statusCode); - - this.log.error(error.stack); - this.restart(); - reject(); - } - }); - }); - } - - getPersonalData() { - return new Promise((resolve, reject) => { - if (this.config.type === "audi" || this.config.type === "go") { - resolve(); - return; - } - this.log.debug("getData"); - request.get({ - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io" - }, - followAllRedirects: true - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(body); - const data = JSON.parse(body); - this.config.identifier = data.businessIdentifierValue; - Object.keys(data).forEach(key => { - this.setObjectNotExists("personal." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState("personal." + key, data[key], true); - }); - - resolve(); - - } catch (error) { - this.log.error(error); - reject(); - } - }); - }); - } - - getCarData() { - return new Promise((resolve, reject) => { - this.log.debug("getData"); - request.get({ - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io" - }, - followAllRedirects: true - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(body); - const data = JSON.parse(body); - Object.keys(data).forEach(key => { - this.setObjectNotExists("car." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState("car." + key, data[key], true); - }); - - resolve(); - - } catch (error) { - this.log.error(error); - reject(); - } - }); - }); - } - - getVehicles() { - return new Promise((resolve, reject) => { - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); - let headers = { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json" - } - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; - headers = { - 'user-agent': 'okhttp/3.9.1', - 'authorization': 'Bearer ' + this.config.atoken, - 'accept-language': 'de-DE', - 'dmp-api-version': 'v2.0', - 'dmp-client-info': 'Android/7.0/VW Connect/App/2.9.4', - 'accept': 'application/json;charset=UTF-8' - }; - } - request.get({ - url: url, - headers: headers, - followAllRedirects: true, - gzip: true, - json: true, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - } - try { - if (body.errorCode) { - this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - if (this.config.type === "go") { - body.forEach(element => { - const vin = element.vehicle.vin; - this.setObjectNotExists(element.vehicle.vin, { - type: "device", - common: { - name: element.licencePlate, - role: "indicator", - type: "mixed", - write: false, - - - read: true - }, - native: {} - }); - const adapter = this; - - let result = body.vehicleData; - - traverse(element).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); - } - }); - - }) - resolve(); - return; - } - - const vehicles = body.userVehicles.vehicle; - vehicles.forEach(vehicle => { - this.vinArray.push(vehicle); - this.setObjectNotExists(vehicle, { - type: "device", - common: { - name: vehicle.title, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.batterycharge", { - type: "state", - common: { - name: "Start Battery Charge", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisation", { - type: "state", - common: { - name: "Start Climatisation", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { - type: "state", - common: { - name: "Temperature in °C", - type: "boolean", - role: "number", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.windowheating", { - type: "state", - common: { - name: "Start Windowheating", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.honk", { - type: "state", - common: { - name: "Start Honk", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.flash", { - type: "state", - common: { - name: "Start Flash", - type: "boolean", - role: "button", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.standheizung", { - type: "state", - common: { - name: "Standheizung aktiviert", - type: "boolean", - role: "switch", - write: true, - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.lock", { - type: "state", - common: { - name: "Verriegeln (true) / Entriegeln (false)", - type: "boolean", - role: "switch", - write: true, - }, - native: {} - }); - - }); - resolve(); - - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - this.log.error("Not able to find vehicle, did you choose the correct type?.") - reject(); - } - }); - }); - } - - getVehicleData(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go") { - resolve(); - return; - } - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw") { - url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); - } - let atoken = this.config.vwatoken; - if (this.config.type === "audi") { - url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; - atoken = this.config.atoken; - } - request.get({ - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Market": "de_DE", - Authorization: "Bearer " + atoken, - Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" - }, - followAllRedirects: true, - gzip: true, - json: true, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - - this.log.debug(JSON.stringify(body)); - const adapter = this; - let result = body.vehicleData; - if (this.config.type === "audi") { - result = body.vehicles[this.vinArray.indexOf(vin)] - } - traverse(result).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); - } - }); - - resolve(); - - } catch (error) { - this.log.error(error); - reject(); - } - }); - }); - } - - getVehicleRights(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go" || !this.config.rights) { - resolve(); - return; - } - let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; - if (this.config.type === "vw") { - url += "/users/" + this.config.identifier - } - request.get({ - url: url, - qs: { - scope: "All" - }, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" - }, - followAllRedirects: true, - gzip: true, - json: true, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - - const adapter = this; - traverse(body.operationList).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - if (modPath[modPath.length - 1] !== "$") { - adapter.setObjectNotExists(vin + ".rights." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); - } - } - }); - - resolve(); - - } catch (error) { - this.log.error(error); - reject(); - } - }); - }); - } - - requestStatusUpdate(vin) { - return new Promise((resolve, reject) => { - - const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); - request.post({ - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" - - }, - followAllRedirects: true, - gzip: true, - json: true - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)) - resolve(); - - } catch (error) { - this.log.error(error); - reject(); - } - }); - }); - } - - getVehicleStatus(vin, url, path, element, element2) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); - request.get({ - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" - - }, - followAllRedirects: true, - gzip: true, - json: true - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - - this.log.debug(JSON.stringify(body)); - - if (path === "position") { - this.setObjectNotExists(vin + ".position.isMoving", { - type: "state", - common: { - name: "is car moving", - role: "indicator", - type: "boolean", - write: false, - read: true - }, - native: {} - }); - - if (resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - resolve(); - return; - } else { - this.setState(vin + ".position.isMoving", false, true); - } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } - } - - if (body === undefined || body === "" || body.error) { - if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { - this.log.error("Error response try to refresh token " + path); - this.log.error(JSON.stringify(body)); - this.refreshToken(true); - } else { - this.log.debug("Not able to get " + path); - } - this.log.debug(body); - reject(); - return; - } - // const parser = new xml2js.Parser({ - // explicitArray: false, - // explicitRoot: false, - // mergeAttrs: true, - // tagNameProcessors: [xml2js.processors.stripPrefix], - // attrNameProcessors: [xml2js.processors.stripPrefix] - // }); - - const adapter = this; - - - let result = body; - if (result === "") { - resolve(); - return; - } - if (result) { - if (element) { - result = result[element]; - } - if (element2) { - result = result[element2]; - } - if (path === "tripdata") { - adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { - type: "state", - common: { - name: "numberOfLastTrip", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); - } - - - traverse(result).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); - } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - - modPath.splice(parentIndex + 1, 1); - } - }); - - if (this.node.field && this.node.field[this.node.field.length - 1].textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.field[this.node.field.length - 1].textId, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } - if (this.node.textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.textId, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } else if (this.node.timestamp) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.timestamp, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } - - - } - }); - resolve(); - } else { - this.log.error("Cannot find vehicle data " + path); - this.log.error(body); - reject(); - } - - - - - - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - }); - }); - } - - setVehicleStatus(vin, url, body, contentType, secToken) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); - this.log.debug(body); - this.log.debug(contentType); - let headers = { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - "Content-Type": contentType, - Accept: "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*" - } - if (secToken) { - headers["x-mbbSecToken"] = secToken; - } - - request.post({ - url: url, - headers: headers, - body: body, - followAllRedirects: true, - gzip: true, - }, (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - this.log.debug(body); - if (body.indexOf("") !== -1) { - this.log.error("Error response try to refresh token " + url); - this.log.error(body); - this.refreshToken(true); - reject(); - return; - } - this.log.info(body); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - }); - }); - } - requestSecToken(vin, service) { - return new Promise((resolve, reject) => { - request.get({ - url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - accept: "application/json" - }, - followAllRedirects: true, - json: true, - gzip: true - }, async (err, resp, body) => { - if (err) { - this.log.error(err); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - if (body.securityPinAuthInfo) { - const secToken = body.securityPinAuthInfo.securityToken - const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge - const securPin = await this.generateSecurPin(challenge); - const rBody = { - "securityPinAuthentication": { - "securityPin": { - "challenge": challenge, - "securityPinHash": securPin - }, - "securityToken": secToken - } - } - request.post({ - url: 'https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed', - headers: { - "user-agent": "okhttp/3.7.0", - 'Content-Type': 'application/json', - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - "Accept": "application/json" - }, - body: rBody, - gzip: true, - json: true, - followAllRedirects: true - }, (err, resp, body) => { - if (err) { - this.log.error("Failing to get sec token."); - this.log.error(err); - reject(); - return; - } - try { - this.log.debug(body); - if (body.securityToken) { - resolve(body.securityToken) - } else { - this.log.error("No Security token found"); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (error) { - this.log.error(error); - reject(); - } - }); - } else { - this.log.error("No Security information found"); - this.log.error(JSON.stringify(body)); - reject(); - } - - } catch (error) { - this.log.error(error); - reject(); - } - }); - - }) - - } - generateSecurPin(challenge) { - return new Promise((resolve, reject) => { - if (!this.config.pin) { - this.log.error("Please Enter your S-Pin in the Instance Options") - reject(); - return; - } - const pin = this.toByteArray(this.config.pin); - - const byteChallenge = this.toByteArray(challenge); - var webcrypto = new Crypto(); - var concat = new Int8Array(pin.concat(byteChallenge)); - const digest = webcrypto.subtle.digest("SHA-512", concat).then(digest => { - var utf8Array = new Int8Array(digest); - resolve(this.toHexString(utf8Array)); - }); - }); - } - getCodeChallenge() { - let hash = ""; - let result = ""; - while (hash === "" || hash.indexOf("+") !== -1 || hash.indexOf("/") !== -1 || hash.indexOf("=") !== -1 || result.indexOf("+") !== -1 || result.indexOf("/") !== -1) { - const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - result = ""; - for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; - result = Buffer.from(result).toString("base64"); - result = result.replace(/=/g, ""); - hash = crypto.createHash("sha256").update(result).digest("base64"); - hash = hash.slice(0, hash.length - 1); - - } - return [result, hash]; - } - getNonce() { - const timestamp = Date.now(); - let hash = crypto.createHash("sha256").update(timestamp.toString()).digest("base64"); - hash = hash.slice(0, hash.length - 1); - return hash; - } - toHexString(byteArray) { - return Array.prototype.map - .call(byteArray, function (byte) { - return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); - }) - .join(""); - }; - - toByteArray(hexString) { - var result = []; - for (var i = 0; i < hexString.length; i += 2) { - result.push(parseInt(hexString.substr(i, 2), 16)); - } - return result; - }; - /** - * Is called when adapter shuts down - callback has to be called under any circumstances! - * @param {() => void} callback - */ - onUnload(callback) { - try { - this.log.info("cleaned everything up..."); - clearInterval(this.refreshTokenInterval); - clearInterval(this.vwrefreshTokenInterval); - clearInterval(this.updateInterval); - clearInterval(this.fupdateInterval); - callback(); - } catch (e) { - callback(); - } - } - - /** - * Is called if a subscribed state changes - * @param {string} id - * @param {ioBroker.State | null | undefined} state - */ - async onStateChange(id, state) { - if (state) { - - if (!state.ack) { - const vin = id.split(".")[2]; - let body = ""; - let contentType = ""; - if (id.indexOf("remote") !== -1) { - const action = id.split(".")[4]; - if (action === "batterycharge") { - body = '\n\n start\n'; - if (state.val === false) { - body = '\n\n stop\n'; - } - contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType); - } - - if (action === "climatisation") { - body = '\n\n startClimatisation\n'; - if (state.val === false) { - body = '\n\n stopClimatisation\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } - - if (action === "climatisationTemperature") { - let temp = 2950; - if (state.val && !isNaN(state.val)) { - temp = (parseFloat(state.val) + 273, 6) * 10; - } - body = '\n\n setSettings ' + temp + " false electric \n"; - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } - - if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; - if (state.val === false) { - body = '\n\n stopWindowHeating\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } - if (action === "flash") { - //HONK_AND_FLASH - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate") - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + '}}}'; - contentType = 'application/json; charset=UTF-8'; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); - } - - if (action === "honk") { - // - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate") - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + '}}}'; - contentType = 'application/json; charset=UTF-8'; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); - } - if (action === "standheizung") { - body = '\n\n \n true\n \n'; - if (state.val === false) { - body = '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken); - } - if (action === "lock") { - body = '\n\n lock\n'; - let lockAction = "LOCK"; - if (state.val === false) { - body = '\n\n unlock\n'; - lockAction = "UNLOCK"; - } - contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken); - } - - } - } else { - if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - - const vin = id.split(".")[2]; - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); - - this.setObjectNotExists(vin + ".position.latitudeConv", { - type: "state", - common: { - name: "latitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); - this.setObjectNotExists(vin + ".position.longitudeConv", { - type: "state", - common: { - name: "longitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - if (!this.config.reversePos) { - return; - } - request.get({ - url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", - - headers: { - "User-Agent": "ioBroker/vw-connect" - }, - json: true, - followAllRedirects: true - }, (err, resp, body) => { - if (err || resp.statusCode >= 400 || !body) { - this.log.error(body) - this.log.error(resp.statusCode) - this.log.error(err); - return; - } - if (body.display_name) { - try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - this.setObjectNotExists(vin + ".position.address.displayName", { - type: "state", - common: { - name: "displayName", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach(key => { - this.setObjectNotExists(vin + ".position.address." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.address." + key, body.address[key], true); - - }); - - } catch (error) { - this.log.error(error); - } - } else { - this.log.error(body) - } - - }); - - } - } - - } else { - // The state was deleted - // this.log.info(`state ${id} deleted`); - } - } - - + /** + * @param {Partial} [options={}] + */ + constructor(options) { + super({ + ...options, + name: "vw-connect" + }); + this.on("ready", this.onReady.bind(this)); + // this.on("objectChange", this.onObjectChange.bind(this)); + this.on("stateChange", this.onStateChange.bind(this)); + // this.on("message", this.onMessage.bind(this)); + this.on("unload", this.onUnload.bind(this)); + + this.jar = request.jar(); + + this.refreshTokenInterval = null; + this.vwrefreshTokenInterval = null; + this.updateInterval = null; + this.fupdateInterval = null; + + this.vinArray = []; + + this.statesArray = [ + { + url: "https://msg.volkswagen.de/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", + path: "timer", + element: "timer" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", + path: "climater", + element: "climater" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", + path: "position", + element: "storedPositionResponse", + element2: "position" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", + path: "tripdata", + element: "tripDataList" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", + path: "status", + element: "StoredVehicleDataResponse", + element2: "vehicleData" + }, + { + url: "https://msg.volkswagen.de/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", + path: "destinations", + element: "destinations" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", + path: "charger", + element: "charger" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", + path: "remoteStandheizung", + element: "statusResponse" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", + path: "history" + } + ]; + } + + /** + * Is called when databases are connected and adapter received configuration. + */ + async onReady() { + // Initialize your adapter here + + this.setState("info.connection", false, true); + // Reset the connection indicator during startup + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; + this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; + this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; + this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; + this.xrequest = "de.volkswagen.carnet.eu.eremote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.1.2"; + this.xappname = "eRemote"; + if (this.config.type === "skoda") { + this.type = "Skoda"; + this.country = "CZ"; + this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; + this.xclientId = "28cd30c6-dee7-4529-a0e6-b1e07ff90b79"; + this.scope = "openid%20profile%20phone%20address%20cars%20email%20birthdate%20badge%20dealers%20driversLicense%20mbb"; + this.redirect = "skodaconnect%3A%2F%2Foidc.login%2F"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "3.1.6"; + this.xappname = "cz.skodaauto.connect"; + } + if (this.config.type === "audi") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "mmiconnect_android"; + this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; + this.scope = "openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write"; + this.redirect = ""; + this.xrequest = ""; + this.responseType = "token id_token"; + this.xappversion = "3.14.0"; + this.xappname = "myAudi"; + } + if (this.config.type === "go") { + this.type = ""; + this.country = ""; + this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid%20profile%20address%20email%20phone"; + this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } + this.login().then(() => { + this.log.debug("Login successful"); + this.setState("info.connection", true, true); + this.getPersonalData().then(() => { + this.getVehicles().then(() => { + if (this.config.type !== "go") { + this.vinArray.forEach(vin => { + this.getVehicleData(vin); + this.getVehicleRights(vin); + this.requestStatusUpdate(vin).then(() => { + this.statesArray.forEach(state => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + }); + }); + } + + this.updateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach(vin => { + this.statesArray.forEach(state => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + }); + }, this.config.interval * 60 * 1000); + if (this.config.forceinterval > 0) { + this.fupdateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach(vin => { + this.requestStatusUpdate(vin); + }); + }, this.config.forceinterval * 60 * 1000); + } + }); + }); + }); + this.subscribeStates("*"); + } + login() { + return new Promise((resolve, reject) => { + const nonce = this.getNonce(); + const state = uuidv4(); + const [code_verifier, codeChallenge] = this.getCodeChallenge(); + + let method = "GET"; + let form = {}; + let url = + "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + + this.clientId + + "&scope=" + + this.scope + + "&response_type=" + + this.responseType + + "&redirect_uri=" + + this.redirect + + "&nonce=" + + nonce + + "&state=" + + state; + if (this.config.type === "vw" || this.config.type === "go") { + url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; + } + if (this.config.type === "audi") { + url = "https://id.audi.com/v1/token"; + method = "POST"; + form = { + client_id: this.clientId, + scope: this.scope, + response_type: this.responseType, + grant_type: "password", + username: this.config.user, + password: this.config.password + }; + } + request( + { + method: method, + url: url, + headers: { + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + "upgrade-insecure-requests": 1 + }, + jar: this.jar, + form: form, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + + try { + if (this.config.type === "audi") { + const tokens = JSON.parse(body); + this.getVWToken(tokens, tokens.id_token, reject, resolve); + return; + } + + const dom = new JSDOM(body); + const form = {}; + const formLogin = dom.window.document.querySelector("#emailPasswordForm"); + if (formLogin) { + this.log.debug("parseEmailForm"); + for (const formElement of dom.window.document.querySelector("#emailPasswordForm").children) { + if (formElement.type === "hidden") { + form[formElement.name] = formElement.value; + } + } + form["email"] = this.config.user; + } else { + this.log.error("No Login Form found"); + this.log.debug(body); + reject(); + } + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest + }, + form: form, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + const dom = new JSDOM(body); + const form = {}; + const formLogin = dom.window.document.querySelector("#credentialsForm"); + if (formLogin) { + this.log.debug("parsePasswordForm"); + for (const formElement of dom.window.document.querySelector("#credentialsForm").children) { + if (formElement.type === "hidden") { + form[formElement.name] = formElement.value; + } + } + form["password"] = this.config.password; + } else { + this.log.error("No Login Form found"); + this.log.debug(body); + reject(); + } + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest + }, + form: form, + jar: this.jar, + followAllRedirects: false + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + } + + try { + this.log.debug(JSON.stringify(body)); + this.log.debug(JSON.stringify(resp.headers)); + if (!resp.headers.location.split("&").length[2]) { + this.log.error("No userId found, please check your account"); + return; + } + this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; + let getRequest = request.get( + { + url: resp.headers.location, + headers: { + "User-Agent": + "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest + }, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err) { + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.debug("No Token received visiting url and accept the permissions."); + const dom = new JSDOM(body); + let form = ""; + for (const formElement of dom.window.document.querySelectorAll("input")) { + if (formElement.type === "hidden") { + form += formElement.name + "=" + formElement.value + "&"; + } + } + getRequest = request.post( + { + url: getRequest.uri.href, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": + "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + referer: getRequest.uri.href + }, + form: form, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err) { + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.error("No Token received."); + try { + this.log.debug(body); + } catch (error) { + this.log.error(error); + reject(); + } + } + } + ); + } + } + ); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + + replaceVarInUrl(url, vin) { + return url + .replace("/$vin/", "/" + vin + "/") + .replace("/$type/", "/" + this.type + "/") + .replace("/$country/", "/" + this.country + "/") + .replace("/$tripType", "/" + this.config.tripType); + } + getTokens(getRequest, code_verifier, reject, resolve) { + let hash = ""; + if (getRequest.uri.hash) { + hash = getRequest.uri.hash; + } else { + hash = getRequest.uri.query; + } + const hashArray = hash.split("&"); + let state; + let jwtauth_code; + let jwtaccess_token; + let jwtid_token; + hashArray.forEach(hash => { + const harray = hash.split("="); + if (harray[0] === "#state" || harray[0] === "state") { + state = harray[1]; + } + if (harray[0] === "code") { + jwtauth_code = harray[1]; + } + if (harray[0] === "access_token") { + jwtaccess_token = harray[1]; + } + if (harray[0] === "id_token") { + jwtid_token = harray[1]; + } + }); + // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); + // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); + // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); + // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); + let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; + if (this.config.type === "vw") { + body += "&code_verifier=" + code_verifier; + } else { + body += "&brand=" + this.config.type; + } + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = + "code=" + + jwtauth_code + + "&client_id=" + + this.clientId + + "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + + code_verifier; + } + request.post( + { + url: url, + headers: { + // "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "content-type": "application/x-www-form-urlencoded", + "x-app-name": this.xappname, + accept: "application/json" + }, + body: body, + jar: this.jar, + followAllRedirects: false + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + const tokens = JSON.parse(body); + + this.getVWToken(tokens, jwtid_token, reject, resolve); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } + + getVWToken(tokens, jwtid_token, reject, resolve) { + this.config.atoken = tokens.access_token; + this.config.rtoken = tokens.refresh_token; + this.refreshTokenInterval = setInterval(() => { + this.refreshToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + if (this.config.type === "go") { + resolve(); + return; + } + request.post( + { + url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Client-Id": this.xclientId, + Host: "mbboauth-1d.prd.ece.vwg-connect.com" + }, + form: { + grant_type: "id_token", + token: jwtid_token, + scope: "sc2:fal" + }, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + const tokens = JSON.parse(body); + this.config.vwatoken = tokens.access_token; + this.config.vwrtoken = tokens.refresh_token; + this.vwrefreshTokenInterval = setInterval(() => { + this.refreshToken(true).catch(() => {}); + }, 0.9 * 60 * 60 * 1000); //0.9hours + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } + + refreshToken(isVw) { + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; + let rtoken = this.config.rtoken; + let body = "refresh_token=" + rtoken; + let form = ""; + if (isVw) { + url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; + rtoken = this.config.vwrtoken; + body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; + } else if (this.config.type === "audi") { + url = "https://id.audi.com/v1/token"; + body = ""; + form = { + client_id: this.clientId, + grant_type: "refresh_token", + response_type: "token id_token", + refresh_token: rtoken + }; + } else if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = ""; + form = { + scope: "openid+profile+address+email+phone", + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: rtoken + }; + } + return new Promise((resolve, reject) => { + this.log.debug("refreshToken"); + request.post( + { + url: url, + headers: { + "user-agent": "okhttp/3.7.0", + "content-type": "application/x-www-form-urlencoded", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + "X-Client-Id": this.xclientId, + accept: "application/json" + }, + body: body, + form: form, + gzip: true, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to refresh token."); + this.log.error(err); + reject(); + return; + } + try { + this.log.debug(body); + const tokens = JSON.parse(body); + if (tokens.error) { + this.log.error(body); + setTimeout(() => { + this.refreshToken(isVw); + }, 5 * 60 * 1000); + reject(); + return; + } + if (isVw) { + this.config.vwatoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.vwrtoken = tokens.refresh_token; + } + } else { + this.config.atoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.rtoken = tokens.refresh_token; + } + } + resolve(); + } catch (error) { + this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); + this.log.error(error); + this.log.error(body); + this.log.error(resp.statusCode); + this.log.error(error.stack); + this.restart(); + reject(); + } + } + ); + }); + } + + getPersonalData() { + return new Promise((resolve, reject) => { + if (this.config.type === "audi" || this.config.type === "go") { + resolve(); + return; + } + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.atoken, + accept: "application/json", + Host: "customer-profile.apps.emea.vwapps.io" + }, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(body); + const data = JSON.parse(body); + this.config.identifier = data.businessIdentifierValue; + Object.keys(data).forEach(key => { + this.setObjectNotExists("personal." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState("personal." + key, data[key], true); + }); + + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + + getCarData() { + return new Promise((resolve, reject) => { + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.atoken, + accept: "application/json", + Host: "customer-profile.apps.emea.vwapps.io" + }, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(body); + const data = JSON.parse(body); + Object.keys(data).forEach(key => { + this.setObjectNotExists("car." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState("car." + key, data[key], true); + }); + + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + + getVehicles() { + return new Promise((resolve, reject) => { + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); + let headers = { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json" + }; + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + headers = { + "user-agent": "okhttp/3.9.1", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": "Android/7.0/VW Connect/App/2.9.4", + accept: "application/json;charset=UTF-8" + }; + } + request.get( + { + url: url, + headers: headers, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + } + try { + if (body.errorCode) { + this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + if (this.config.type === "go") { + body.forEach(element => { + const vin = element.vehicle.vin; + this.setObjectNotExists(element.vehicle.vin, { + type: "device", + common: { + name: element.licencePlate, + role: "indicator", + type: "mixed", + write: false, + + read: true + }, + native: {} + }); + const adapter = this; + + let result = body.vehicleData; + + traverse(element).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + } + }); + }); + resolve(); + return; + } + + const vehicles = body.userVehicles.vehicle; + vehicles.forEach(vehicle => { + this.vinArray.push(vehicle); + this.setObjectNotExists(vehicle, { + type: "device", + common: { + name: vehicle.title, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.batterycharge", { + type: "state", + common: { + name: "Start Battery Charge", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.climatisation", { + type: "state", + common: { + name: "Start Climatisation", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { + type: "state", + common: { + name: "Temperature in °C", + type: "boolean", + role: "number", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.windowheating", { + type: "state", + common: { + name: "Start Windowheating", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.honk", { + type: "state", + common: { + name: "Start Honk", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.flash", { + type: "state", + common: { + name: "Start Flash", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.standheizung", { + type: "state", + common: { + name: "Standheizung aktiviert", + type: "boolean", + role: "switch", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.lock", { + type: "state", + common: { + name: "Verriegeln (true) / Entriegeln (false)", + type: "boolean", + role: "switch", + write: true + }, + native: {} + }); + }); + resolve(); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + this.log.error("Not able to find vehicle, did you choose the correct type?."); + reject(); + } + } + ); + }); + } + + getVehicleData(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go") { + resolve(); + return; + } + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); + if (this.config.type !== "vw") { + url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); + } + let atoken = this.config.vwatoken; + if (this.config.type === "audi") { + url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; + atoken = this.config.atoken; + } + request.get( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Market": "de_DE", + Authorization: "Bearer " + atoken, + Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + const adapter = this; + let result = body.vehicleData; + if (this.config.type === "audi") { + result = body.vehicles[this.vinArray.indexOf(vin)]; + } + traverse(result).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); + } + }); + + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + + getVehicleRights(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go" || !this.config.rights) { + resolve(); + return; + } + let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; + if (this.config.type === "vw") { + url += "/users/" + this.config.identifier; + } + request.get( + { + url: url, + qs: { + scope: "All" + }, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + const adapter = this; + traverse(body.operationList).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + if (modPath[modPath.length - 1] !== "$") { + adapter.setObjectNotExists(vin + ".rights." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); + } + } + }); + + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + + requestStatusUpdate(vin) { + return new Promise((resolve, reject) => { + const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + request.post( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: + "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + + getVehicleStatus(vin, url, path, element, element2) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + request.get( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: + "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + + if (path === "position") { + this.setObjectNotExists(vin + ".position.isMoving", { + type: "state", + common: { + name: "is car moving", + role: "indicator", + type: "boolean", + write: false, + read: true + }, + native: {} + }); + + if (resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); + resolve(); + return; + } else { + this.setState(vin + ".position.isMoving", false, true); + } + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + } + + if (body === undefined || body === "" || body.error) { + if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { + this.log.error("Error response try to refresh token " + path); + this.log.error(JSON.stringify(body)); + this.refreshToken(true); + } else { + this.log.debug("Not able to get " + path); + } + this.log.debug(body); + reject(); + return; + } + // const parser = new xml2js.Parser({ + // explicitArray: false, + // explicitRoot: false, + // mergeAttrs: true, + // tagNameProcessors: [xml2js.processors.stripPrefix], + // attrNameProcessors: [xml2js.processors.stripPrefix] + // }); + + const adapter = this; + + let result = body; + if (result === "") { + resolve(); + return; + } + if (result) { + if (element) { + result = result[element]; + } + if (element2) { + result = result[element2]; + } + if (path === "tripdata") { + adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { + type: "state", + common: { + name: "numberOfLastTrip", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); + } + + traverse(result).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); + } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + + modPath.splice(parentIndex + 1, 1); + } + }); + + if (this.node.field && this.node.field[this.node.field.length - 1].textId) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.field[this.node.field.length - 1].textId, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + } + if (this.node.textId) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.textId, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + } else if (this.node.timestamp) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.timestamp, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + } + } + }); + resolve(); + } else { + this.log.error("Cannot find vehicle data " + path); + this.log.error(body); + reject(); + } + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + }); + } + + setVehicleStatus(vin, url, body, contentType, secToken) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + this.log.debug(body); + this.log.debug(contentType); + let headers = { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + "Content-Type": contentType, + Accept: + "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*" + }; + if (secToken) { + headers["x-mbbSecToken"] = secToken; + } + + request.post( + { + url: url, + headers: headers, + body: body, + followAllRedirects: true, + gzip: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + this.log.debug(body); + if (body.indexOf("") !== -1) { + this.log.error("Error response try to refresh token " + url); + this.log.error(body); + this.refreshToken(true); + reject(); + return; + } + this.log.info(body); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + }); + } + requestSecToken(vin, service) { + return new Promise((resolve, reject) => { + request.get( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + accept: "application/json" + }, + followAllRedirects: true, + json: true, + gzip: true + }, + async (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(err); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(JSON.stringify(body)); + if (body.securityPinAuthInfo) { + const secToken = body.securityPinAuthInfo.securityToken; + const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge; + const securPin = await this.generateSecurPin(challenge); + const rBody = { + securityPinAuthentication: { + securityPin: { + challenge: challenge, + securityPinHash: securPin + }, + securityToken: secToken + } + }; + request.post( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed", + headers: { + "user-agent": "okhttp/3.7.0", + "Content-Type": "application/json", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json" + }, + body: rBody, + gzip: true, + json: true, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to get sec token."); + this.log.error(err); + reject(); + return; + } + try { + this.log.debug(body); + if (body.securityToken) { + resolve(body.securityToken); + } else { + this.log.error("No Security token found"); + this.log.error(JSON.stringify(body)); + reject(); + } + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } else { + this.log.error("No Security information found"); + this.log.error(JSON.stringify(body)); + reject(); + } + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + generateSecurPin(challenge) { + return new Promise((resolve, reject) => { + if (!this.config.pin) { + this.log.error("Please Enter your S-Pin in the Instance Options"); + reject(); + return; + } + const pin = this.toByteArray(this.config.pin); + + const byteChallenge = this.toByteArray(challenge); + var webcrypto = new Crypto(); + var concat = new Int8Array(pin.concat(byteChallenge)); + const digest = webcrypto.subtle.digest("SHA-512", concat).then(digest => { + var utf8Array = new Int8Array(digest); + resolve(this.toHexString(utf8Array)); + }); + }); + } + getCodeChallenge() { + let hash = ""; + let result = ""; + while (hash === "" || hash.indexOf("+") !== -1 || hash.indexOf("/") !== -1 || hash.indexOf("=") !== -1 || result.indexOf("+") !== -1 || result.indexOf("/") !== -1) { + const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + result = ""; + for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + result = Buffer.from(result).toString("base64"); + result = result.replace(/=/g, ""); + hash = crypto + .createHash("sha256") + .update(result) + .digest("base64"); + hash = hash.slice(0, hash.length - 1); + } + return [result, hash]; + } + getNonce() { + const timestamp = Date.now(); + let hash = crypto + .createHash("sha256") + .update(timestamp.toString()) + .digest("base64"); + hash = hash.slice(0, hash.length - 1); + return hash; + } + toHexString(byteArray) { + return Array.prototype.map + .call(byteArray, function(byte) { + return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); + }) + .join(""); + } + + toByteArray(hexString) { + var result = []; + for (var i = 0; i < hexString.length; i += 2) { + result.push(parseInt(hexString.substr(i, 2), 16)); + } + return result; + } + /** + * Is called when adapter shuts down - callback has to be called under any circumstances! + * @param {() => void} callback + */ + onUnload(callback) { + try { + this.log.info("cleaned everything up..."); + clearInterval(this.refreshTokenInterval); + clearInterval(this.vwrefreshTokenInterval); + clearInterval(this.updateInterval); + clearInterval(this.fupdateInterval); + callback(); + } catch (e) { + callback(); + } + } + + /** + * Is called if a subscribed state changes + * @param {string} id + * @param {ioBroker.State | null | undefined} state + */ + async onStateChange(id, state) { + if (state) { + if (!state.ack) { + const vin = id.split(".")[2]; + let body = ""; + let contentType = ""; + if (id.indexOf("remote") !== -1) { + const action = id.split(".")[4]; + if (action === "batterycharge") { + body = '\n\n start\n'; + if (state.val === false) { + body = '\n\n stop\n'; + } + contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType); + } + + if (action === "climatisation") { + body = '\n\n startClimatisation\n'; + if (state.val === false) { + body = '\n\n stopClimatisation\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); + } + + if (action === "climatisationTemperature") { + let temp = 2950; + if (state.val && !isNaN(state.val)) { + temp = (parseFloat(state.val) + 273, 6) * 10; + } + body = + '\n\n setSettings ' + + temp + + " false electric \n"; + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); + } + + if (action === "windowheating") { + body = '\n\n startWindowHeating\n'; + if (state.val === false) { + body = '\n\n stopWindowHeating\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); + } + if (action === "flash") { + //HONK_AND_FLASH + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); + } + + if (action === "honk") { + // + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); + } + if (action === "standheizung") { + body = + '\n\n \n true\n \n'; + if (state.val === false) { + body = + '\n\n \n false\n \n'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken); + } + if (action === "lock") { + body = '\n\n lock\n'; + let lockAction = "LOCK"; + if (state.val === false) { + body = '\n\n unlock\n'; + lockAction = "UNLOCK"; + } + contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken); + } + } + } else { + if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { + const vin = id.split(".")[2]; + const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + const longitudeValue = parseFloat(longitude.val); + + this.setObjectNotExists(vin + ".position.latitudeConv", { + type: "state", + common: { + name: "latitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); + this.setObjectNotExists(vin + ".position.longitudeConv", { + type: "state", + common: { + name: "longitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); + if (!this.config.reversePos) { + return; + } + request.get( + { + url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", + + headers: { + "User-Agent": "ioBroker/vw-connect" + }, + json: true, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || resp.statusCode >= 400 || !body) { + this.log.error(body); + this.log.error(resp.statusCode); + this.log.error(err); + return; + } + if (body.display_name) { + try { + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + this.setObjectNotExists(vin + ".position.address.displayName", { + type: "state", + common: { + name: "displayName", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.address.displayName", fullAdress, true); + Object.keys(body.address).forEach(key => { + this.setObjectNotExists(vin + ".position.address." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.address." + key, body.address[key], true); + }); + } catch (error) { + this.log.error(error); + } + } else { + this.log.error(body); + } + } + ); + } + } + } else { + // The state was deleted + // this.log.info(`state ${id} deleted`); + } + } } // @ts-ignore parent is a valid property on module if (module.parent) { - // Export the constructor in compact mode - /** - * @param {Partial} [options={}] - */ - module.exports = (options) => new VwWeconnect(options); + // Export the constructor in compact mode + /** + * @param {Partial} [options={}] + */ + module.exports = options => new VwWeconnect(options); } else { - // otherwise start the instance directly - new VwWeconnect(); -} \ No newline at end of file + // otherwise start the instance directly + new VwWeconnect(); +} From 55bed5de62d9325a9d8c4d9a2d1529e13506957e Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 23 Jan 2020 12:49:08 +0100 Subject: [PATCH 042/729] fix check condition --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index ea553c5f..d3e4390f 100644 --- a/main.js +++ b/main.js @@ -335,7 +335,7 @@ class VwWeconnect extends utils.Adapter { try { this.log.debug(JSON.stringify(body)); this.log.debug(JSON.stringify(resp.headers)); - if (!resp.headers.location.split("&").length[2]) { + if (resp.headers.location.split("&").length <= 1) { this.log.error("No userId found, please check your account"); return; } From 96230b9f0f358372a27410b5b607a83b82fe14c5 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 25 Jan 2020 19:39:23 +0100 Subject: [PATCH 043/729] disable triptype by default --- .vscode/extensions.json | 5 ---- .vscode/launch.json | 15 ---------- .vscode/settings.json | 3 -- README.md | 24 ++++++++------- admin/custom_m.html | 44 ---------------------------- admin/index_m.html | 3 +- io-package.json | 8 +++-- main.js | 65 ++++++++++++++++++++++++----------------- 8 files changed, 60 insertions(+), 107 deletions(-) delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json delete mode 100644 admin/custom_m.html diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index a8d77849..00000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "dbaeumer.vscode-eslint" - ] -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index be07e3e1..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "attach", - "name": "An den Prozess anfügen", // Name, der im VSCode Auswahlmenü neben dem grünen Play angezeigt wird - "address": "127.0.0.1", // Adresse, an dem der node.js Prozess läuft (bei Remote Debug, der Remote-Rechner) - "port": 9229 // Port, auf dem der node.js Debugger lauscht, der mit node --debug-brk ... gestartet wird - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 088bdc8a..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "eslint.enable": true -} \ No newline at end of file diff --git a/README.md b/README.md index 3a4b0c89..32b3b60a 100644 --- a/README.md +++ b/README.md @@ -243,32 +243,36 @@ Use the state under remote control to control your car remotely. ### 0.0.7 -* add we connect go and remote standheizung and lock/unlock - +- set default trip type to none + +### 0.0.7 + +- add we connect go and remote standheizung and lock/unlock + ### 0.0.6 -* add audi +- add audi ### 0.0.5 -* add honk and flash, fix address format +- add honk and flash, fix address format ### 0.0.4 -* add Skoda support +- add Skoda support ### 0.0.3 -* (ta2k) add more information -* (ta2k) add remote controls - +- (ta2k) add more information +- (ta2k) add remote controls + ### 0.0.2 -* (ta2k) add car status capturing +- (ta2k) add car status capturing ### 0.0.1 -* (ta2k) initial release +- (ta2k) initial release ## License diff --git a/admin/custom_m.html b/admin/custom_m.html deleted file mode 100644 index 6b30455e..00000000 --- a/admin/custom_m.html +++ /dev/null @@ -1,44 +0,0 @@ - - - \ No newline at end of file diff --git a/admin/index_m.html b/admin/index_m.html index d373f709..b034a70b 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -110,11 +110,12 @@
- +
diff --git a/io-package.json b/io-package.json index 58e0e4b1..9b09dcc9 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.8", + "version": "0.0.9", "news": { + "0.0.9": { + "en": "set default trip type to none" + }, "0.0.8": { "en": "increase default interval" }, @@ -87,7 +90,6 @@ "type": "vehicle", "compact": true, "materialize": true, - "supportCustoms": true, "dependencies": [ { "js-controller": ">=1.4.2" @@ -109,7 +111,7 @@ "type": "vw", "reversePos": false, "rights": false, - "tripType": "shortTerm" + "tripType": "none" }, "objects": [], "instanceObjects": [ diff --git a/main.js b/main.js index d3e4390f..7975a764 100644 --- a/main.js +++ b/main.js @@ -245,7 +245,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -290,7 +291,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -328,7 +330,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); } @@ -494,7 +497,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -540,7 +544,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -609,7 +614,8 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failing to refresh token."); - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -672,7 +678,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -727,7 +734,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -794,7 +802,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); } try { @@ -1002,7 +1011,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -1080,7 +1090,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -1148,7 +1159,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -1186,7 +1198,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -1230,13 +1243,6 @@ class VwWeconnect extends utils.Adapter { reject(); return; } - // const parser = new xml2js.Parser({ - // explicitArray: false, - // explicitRoot: false, - // mergeAttrs: true, - // tagNameProcessors: [xml2js.processors.stripPrefix], - // attrNameProcessors: [xml2js.processors.stripPrefix] - // }); const adapter = this; @@ -1253,6 +1259,10 @@ class VwWeconnect extends utils.Adapter { result = result[element2]; } if (path === "tripdata") { + if (this.config.tripType === "none") { + resolve(); + return; + } adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { type: "state", common: { @@ -1393,7 +1403,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -1434,7 +1445,8 @@ class VwWeconnect extends utils.Adapter { }, async (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -1476,7 +1488,8 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failing to get sec token."); - this.log.error(err); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); reject(); return; } @@ -1731,9 +1744,9 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || resp.statusCode >= 400 || !body) { - this.log.error(body); - this.log.error(resp.statusCode); - this.log.error(err); + body && this.log.error(body); + resp && this.log.error(resp.statusCode); + err && this.log.error(err); return; } if (body.display_name) { From 6541829f23a6f33bb503443a140e73a70fe2af8c Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 25 Jan 2020 19:42:32 +0100 Subject: [PATCH 044/729] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32b3b60a..eb3cfdbd 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ Use the state under remote control to control your car remotely. ## Changelog -### 0.0.7 +### 0.0.9 - set default trip type to none From 24b03f5d3b4b3e3a14700920ed87fd017f497071 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 25 Jan 2020 22:48:16 +0100 Subject: [PATCH 045/729] reformating --- io-package.json | 4 +- main.js | 3391 ++++++++++++++++++++++++----------------------- package.json | 8 +- 3 files changed, 1703 insertions(+), 1700 deletions(-) diff --git a/io-package.json b/io-package.json index 9b09dcc9..d2369b86 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.9", + "version": "0.0.10", "news": { - "0.0.9": { + "0.0.10": { "en": "set default trip type to none" }, "0.0.8": { diff --git a/main.js b/main.js index 7975a764..1374cecd 100644 --- a/main.js +++ b/main.js @@ -16,190 +16,190 @@ const traverse = require("traverse"); const jsdom = require("jsdom"); const { JSDOM } = jsdom; class VwWeconnect extends utils.Adapter { - /** + /** * @param {Partial} [options={}] */ - constructor(options) { - super({ - ...options, - name: "vw-connect" - }); - this.on("ready", this.onReady.bind(this)); - // this.on("objectChange", this.onObjectChange.bind(this)); - this.on("stateChange", this.onStateChange.bind(this)); - // this.on("message", this.onMessage.bind(this)); - this.on("unload", this.onUnload.bind(this)); + constructor(options) { + super({ + ...options, + name: "vw-connect" + }); + this.on("ready", this.onReady.bind(this)); + // this.on("objectChange", this.onObjectChange.bind(this)); + this.on("stateChange", this.onStateChange.bind(this)); + // this.on("message", this.onMessage.bind(this)); + this.on("unload", this.onUnload.bind(this)); - this.jar = request.jar(); + this.jar = request.jar(); - this.refreshTokenInterval = null; - this.vwrefreshTokenInterval = null; - this.updateInterval = null; - this.fupdateInterval = null; + this.refreshTokenInterval = null; + this.vwrefreshTokenInterval = null; + this.updateInterval = null; + this.fupdateInterval = null; - this.vinArray = []; + this.vinArray = []; - this.statesArray = [ - { - url: "https://msg.volkswagen.de/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", - path: "timer", - element: "timer" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", - path: "climater", - element: "climater" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", - path: "position", - element: "storedPositionResponse", - element2: "position" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", - path: "tripdata", - element: "tripDataList" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", - path: "status", - element: "StoredVehicleDataResponse", - element2: "vehicleData" - }, - { - url: "https://msg.volkswagen.de/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", - path: "destinations", - element: "destinations" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", - path: "charger", - element: "charger" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", - path: "remoteStandheizung", - element: "statusResponse" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", - path: "history" - } - ]; - } + this.statesArray = [ + { + url: "https://msg.volkswagen.de/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", + path: "timer", + element: "timer" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", + path: "climater", + element: "climater" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", + path: "position", + element: "storedPositionResponse", + element2: "position" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", + path: "tripdata", + element: "tripDataList" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", + path: "status", + element: "StoredVehicleDataResponse", + element2: "vehicleData" + }, + { + url: "https://msg.volkswagen.de/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", + path: "destinations", + element: "destinations" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", + path: "charger", + element: "charger" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", + path: "remoteStandheizung", + element: "statusResponse" + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", + path: "history" + } + ]; + } - /** + /** * Is called when databases are connected and adapter received configuration. */ - async onReady() { - // Initialize your adapter here + async onReady() { + // Initialize your adapter here - this.setState("info.connection", false, true); - // Reset the connection indicator during startup - this.type = "VW"; - this.country = "DE"; - this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; - this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; - this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; - this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; - this.xrequest = "de.volkswagen.carnet.eu.eremote"; - this.responseType = "id_token%20token%20code"; - this.xappversion = "5.1.2"; - this.xappname = "eRemote"; - if (this.config.type === "skoda") { - this.type = "Skoda"; - this.country = "CZ"; - this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; - this.xclientId = "28cd30c6-dee7-4529-a0e6-b1e07ff90b79"; - this.scope = "openid%20profile%20phone%20address%20cars%20email%20birthdate%20badge%20dealers%20driversLicense%20mbb"; - this.redirect = "skodaconnect%3A%2F%2Foidc.login%2F"; - this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; - this.xappversion = "3.1.6"; - this.xappname = "cz.skodaauto.connect"; - } - if (this.config.type === "audi") { - this.type = "Audi"; - this.country = "DE"; - this.clientId = "mmiconnect_android"; - this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; - this.scope = "openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write"; - this.redirect = ""; - this.xrequest = ""; - this.responseType = "token id_token"; - this.xappversion = "3.14.0"; - this.xappname = "myAudi"; - } - if (this.config.type === "go") { - this.type = ""; - this.country = ""; - this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid%20profile%20address%20email%20phone"; - this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; - this.xrequest = ""; - this.responseType = "code"; - this.xappversion = ""; - this.xappname = ""; - } - this.login().then(() => { - this.log.debug("Login successful"); - this.setState("info.connection", true, true); - this.getPersonalData().then(() => { - this.getVehicles().then(() => { - if (this.config.type !== "go") { - this.vinArray.forEach(vin => { - this.getVehicleData(vin); - this.getVehicleRights(vin); - this.requestStatusUpdate(vin).then(() => { - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - }); - }); - } + this.setState("info.connection", false, true); + // Reset the connection indicator during startup + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; + this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; + this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; + this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; + this.xrequest = "de.volkswagen.carnet.eu.eremote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.1.2"; + this.xappname = "eRemote"; + if (this.config.type === "skoda") { + this.type = "Skoda"; + this.country = "CZ"; + this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; + this.xclientId = "28cd30c6-dee7-4529-a0e6-b1e07ff90b79"; + this.scope = "openid%20profile%20phone%20address%20cars%20email%20birthdate%20badge%20dealers%20driversLicense%20mbb"; + this.redirect = "skodaconnect%3A%2F%2Foidc.login%2F"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "3.1.6"; + this.xappname = "cz.skodaauto.connect"; + } + if (this.config.type === "audi") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "mmiconnect_android"; + this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; + this.scope = "openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write"; + this.redirect = ""; + this.xrequest = ""; + this.responseType = "token id_token"; + this.xappversion = "3.14.0"; + this.xappname = "myAudi"; + } + if (this.config.type === "go") { + this.type = ""; + this.country = ""; + this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid%20profile%20address%20email%20phone"; + this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } + this.login().then(() => { + this.log.debug("Login successful"); + this.setState("info.connection", true, true); + this.getPersonalData().then(() => { + this.getVehicles().then(() => { + if (this.config.type !== "go") { + this.vinArray.forEach(vin => { + this.getVehicleData(vin); + this.getVehicleRights(vin); + this.requestStatusUpdate(vin).then(() => { + this.statesArray.forEach(state => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + }); + }); + } - this.updateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach(vin => { - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - }); - }, this.config.interval * 60 * 1000); - if (this.config.forceinterval > 0) { - this.fupdateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach(vin => { - this.requestStatusUpdate(vin); - }); - }, this.config.forceinterval * 60 * 1000); - } - }); - }); - }); - this.subscribeStates("*"); - } - login() { - return new Promise((resolve, reject) => { - const nonce = this.getNonce(); - const state = uuidv4(); - const [code_verifier, codeChallenge] = this.getCodeChallenge(); + this.updateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach(vin => { + this.statesArray.forEach(state => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + }); + }, this.config.interval * 60 * 1000); + if (this.config.forceinterval > 0) { + this.fupdateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach(vin => { + this.requestStatusUpdate(vin); + }); + }, this.config.forceinterval * 60 * 1000); + } + }); + }); + }); + this.subscribeStates("*"); + } + login() { + return new Promise((resolve, reject) => { + const nonce = this.getNonce(); + const state = uuidv4(); + const [code_verifier, codeChallenge] = this.getCodeChallenge(); - let method = "GET"; - let form = {}; - let url = + let method = "GET"; + let form = {}; + let url = "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + this.clientId + "&scope=" + @@ -212,1599 +212,1602 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "go") { - url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; - } - if (this.config.type === "audi") { - url = "https://id.audi.com/v1/token"; - method = "POST"; - form = { - client_id: this.clientId, - scope: this.scope, - response_type: this.responseType, - grant_type: "password", - username: this.config.user, - password: this.config.password - }; - } - request( - { - method: method, - url: url, - headers: { - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - "upgrade-insecure-requests": 1 - }, - jar: this.jar, - form: form, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } + if (this.config.type === "vw" || this.config.type === "go") { + url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; + } + if (this.config.type === "audi") { + url = "https://id.audi.com/v1/token"; + method = "POST"; + form = { + client_id: this.clientId, + scope: this.scope, + response_type: this.responseType, + grant_type: "password", + username: this.config.user, + password: this.config.password + }; + } + request( + { + method: method, + url: url, + headers: { + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + "upgrade-insecure-requests": 1 + }, + jar: this.jar, + form: form, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } - try { - if (this.config.type === "audi") { - const tokens = JSON.parse(body); - this.getVWToken(tokens, tokens.id_token, reject, resolve); - return; - } + try { + if (this.config.type === "audi") { + const tokens = JSON.parse(body); + this.getVWToken(tokens, tokens.id_token, reject, resolve); + return; + } - const dom = new JSDOM(body); - const form = {}; - const formLogin = dom.window.document.querySelector("#emailPasswordForm"); - if (formLogin) { - this.log.debug("parseEmailForm"); - for (const formElement of dom.window.document.querySelector("#emailPasswordForm").children) { - if (formElement.type === "hidden") { - form[formElement.name] = formElement.value; - } - } - form["email"] = this.config.user; - } else { - this.log.error("No Login Form found"); - this.log.debug(body); - reject(); - } - request.post( - { - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - form: form, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const dom = new JSDOM(body); - const form = {}; - const formLogin = dom.window.document.querySelector("#credentialsForm"); - if (formLogin) { - this.log.debug("parsePasswordForm"); - for (const formElement of dom.window.document.querySelector("#credentialsForm").children) { - if (formElement.type === "hidden") { - form[formElement.name] = formElement.value; - } - } - form["password"] = this.config.password; - } else { - this.log.error("No Login Form found"); - this.log.debug(body); - reject(); - } - request.post( - { - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - form: form, - jar: this.jar, - followAllRedirects: false - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - } + const dom = new JSDOM(body); + const form = {}; + const formLogin = dom.window.document.querySelector("#emailPasswordForm"); + if (formLogin) { + this.log.debug("parseEmailForm"); + for (const formElement of dom.window.document.querySelector("#emailPasswordForm").children) { + if (formElement.type === "hidden") { + form[formElement.name] = formElement.value; + } + } + form["email"] = this.config.user; + } else { + this.log.error("No Login Form found"); + this.log.debug(body); + reject(); + return; + } + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest + }, + form: form, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + const dom = new JSDOM(body); + const form = {}; + const formLogin = dom.window.document.querySelector("#credentialsForm"); + if (formLogin) { + this.log.debug("parsePasswordForm"); + for (const formElement of dom.window.document.querySelector("#credentialsForm").children) { + if (formElement.type === "hidden") { + form[formElement.name] = formElement.value; + } + } + form["password"] = this.config.password; + } else { + this.log.error("No Login Form found. Please check your E-Mail in the app."); + this.log.debug(body); + reject(); + return; + } + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest + }, + form: form, + jar: this.jar, + followAllRedirects: false + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } - try { - this.log.debug(JSON.stringify(body)); - this.log.debug(JSON.stringify(resp.headers)); - if (resp.headers.location.split("&").length <= 1) { - this.log.error("No userId found, please check your account"); - return; - } - this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; - let getRequest = request.get( - { - url: resp.headers.location, - headers: { - "User-Agent": + try { + this.log.debug(JSON.stringify(body)); + this.log.debug(JSON.stringify(resp.headers)); + if (resp.headers.location.split("&").length <= 1) { + this.log.error("No userId found, please check your account"); + return; + } + this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; + let getRequest = request.get( + { + url: resp.headers.location, + headers: { + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err) { - this.getTokens(getRequest, code_verifier, reject, resolve); - } else { - this.log.debug("No Token received visiting url and accept the permissions."); - const dom = new JSDOM(body); - let form = ""; - for (const formElement of dom.window.document.querySelectorAll("input")) { - if (formElement.type === "hidden") { - form += formElement.name + "=" + formElement.value + "&"; - } - } - getRequest = request.post( - { - url: getRequest.uri.href, - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest + }, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err) { + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.debug("No Token received visiting url and accept the permissions."); + const dom = new JSDOM(body); + let form = ""; + for (const formElement of dom.window.document.querySelectorAll("input")) { + if (formElement.type === "hidden") { + form += formElement.name + "=" + formElement.value + "&"; + } + } + getRequest = request.post( + { + url: getRequest.uri.href, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - referer: getRequest.uri.href - }, - form: form, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err) { - this.getTokens(getRequest, code_verifier, reject, resolve); - } else { - this.log.error("No Token received."); - try { - this.log.debug(body); - } catch (error) { - this.log.error(error); - reject(); - } - } - } - ); - } - } - ); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - } - ); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + referer: getRequest.uri.href + }, + form: form, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err) { + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.error("No Token received."); + try { + this.log.debug(body); + } catch (error) { + this.log.error(error); + reject(); + } + } + } + ); + } + } + ); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - replaceVarInUrl(url, vin) { - return url - .replace("/$vin/", "/" + vin + "/") - .replace("/$type/", "/" + this.type + "/") - .replace("/$country/", "/" + this.country + "/") - .replace("/$tripType", "/" + this.config.tripType); - } - getTokens(getRequest, code_verifier, reject, resolve) { - let hash = ""; - if (getRequest.uri.hash) { - hash = getRequest.uri.hash; - } else { - hash = getRequest.uri.query; - } - const hashArray = hash.split("&"); - let state; - let jwtauth_code; - let jwtaccess_token; - let jwtid_token; - hashArray.forEach(hash => { - const harray = hash.split("="); - if (harray[0] === "#state" || harray[0] === "state") { - state = harray[1]; - } - if (harray[0] === "code") { - jwtauth_code = harray[1]; - } - if (harray[0] === "access_token") { - jwtaccess_token = harray[1]; - } - if (harray[0] === "id_token") { - jwtid_token = harray[1]; - } - }); - // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); - // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); - // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); - // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); - let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; - if (this.config.type === "vw") { - body += "&code_verifier=" + code_verifier; - } else { - body += "&brand=" + this.config.type; - } - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = + replaceVarInUrl(url, vin) { + return url + .replace("/$vin/", "/" + vin + "/") + .replace("/$type/", "/" + this.type + "/") + .replace("/$country/", "/" + this.country + "/") + .replace("/$tripType", "/" + this.config.tripType); + } + getTokens(getRequest, code_verifier, reject, resolve) { + let hash = ""; + if (getRequest.uri.hash) { + hash = getRequest.uri.hash; + } else { + hash = getRequest.uri.query; + } + const hashArray = hash.split("&"); + let state; + let jwtauth_code; + let jwtaccess_token; + let jwtid_token; + hashArray.forEach(hash => { + const harray = hash.split("="); + if (harray[0] === "#state" || harray[0] === "state") { + state = harray[1]; + } + if (harray[0] === "code") { + jwtauth_code = harray[1]; + } + if (harray[0] === "access_token") { + jwtaccess_token = harray[1]; + } + if (harray[0] === "id_token") { + jwtid_token = harray[1]; + } + }); + // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); + // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); + // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); + // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); + let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; + if (this.config.type === "vw") { + body += "&code_verifier=" + code_verifier; + } else { + body += "&brand=" + this.config.type; + } + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = "code=" + jwtauth_code + "&client_id=" + this.clientId + "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + code_verifier; - } - request.post( - { - url: url, - headers: { - // "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "content-type": "application/x-www-form-urlencoded", - "x-app-name": this.xappname, - accept: "application/json" - }, - body: body, - jar: this.jar, - followAllRedirects: false - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const tokens = JSON.parse(body); + } + request.post( + { + url: url, + headers: { + // "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "content-type": "application/x-www-form-urlencoded", + "x-app-name": this.xappname, + accept: "application/json" + }, + body: body, + jar: this.jar, + followAllRedirects: false + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + const tokens = JSON.parse(body); - this.getVWToken(tokens, jwtid_token, reject, resolve); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } + this.getVWToken(tokens, jwtid_token, reject, resolve); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } - getVWToken(tokens, jwtid_token, reject, resolve) { - this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; - this.refreshTokenInterval = setInterval(() => { - this.refreshToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours - if (this.config.type === "go") { - resolve(); - return; - } - request.post( - { - url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Client-Id": this.xclientId, - Host: "mbboauth-1d.prd.ece.vwg-connect.com" - }, - form: { - grant_type: "id_token", - token: jwtid_token, - scope: "sc2:fal" - }, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const tokens = JSON.parse(body); - this.config.vwatoken = tokens.access_token; - this.config.vwrtoken = tokens.refresh_token; - this.vwrefreshTokenInterval = setInterval(() => { - this.refreshToken(true).catch(() => {}); - }, 0.9 * 60 * 60 * 1000); //0.9hours - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } + getVWToken(tokens, jwtid_token, reject, resolve) { + this.config.atoken = tokens.access_token; + this.config.rtoken = tokens.refresh_token; + this.refreshTokenInterval = setInterval(() => { + this.refreshToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + if (this.config.type === "go") { + resolve(); + return; + } + request.post( + { + url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Client-Id": this.xclientId, + Host: "mbboauth-1d.prd.ece.vwg-connect.com" + }, + form: { + grant_type: "id_token", + token: jwtid_token, + scope: "sc2:fal" + }, + jar: this.jar, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + const tokens = JSON.parse(body); + this.config.vwatoken = tokens.access_token; + this.config.vwrtoken = tokens.refresh_token; + this.vwrefreshTokenInterval = setInterval(() => { + this.refreshToken(true).catch(() => {}); + }, 0.9 * 60 * 60 * 1000); //0.9hours + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } - refreshToken(isVw) { - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; - let rtoken = this.config.rtoken; - let body = "refresh_token=" + rtoken; - let form = ""; - if (isVw) { - url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; - rtoken = this.config.vwrtoken; - body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; - } else if (this.config.type === "audi") { - url = "https://id.audi.com/v1/token"; - body = ""; - form = { - client_id: this.clientId, - grant_type: "refresh_token", - response_type: "token id_token", - refresh_token: rtoken - }; - } else if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = ""; - form = { - scope: "openid+profile+address+email+phone", - client_id: this.clientId, - grant_type: "refresh_token", - refresh_token: rtoken - }; - } - return new Promise((resolve, reject) => { - this.log.debug("refreshToken"); - request.post( - { - url: url, - headers: { - "user-agent": "okhttp/3.7.0", - "content-type": "application/x-www-form-urlencoded", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - "X-Client-Id": this.xclientId, - accept: "application/json" - }, - body: body, - form: form, - gzip: true, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to refresh token."); - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(body); - const tokens = JSON.parse(body); - if (tokens.error) { - this.log.error(body); - setTimeout(() => { - this.refreshToken(isVw); - }, 5 * 60 * 1000); - reject(); - return; - } - if (isVw) { - this.config.vwatoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.vwrtoken = tokens.refresh_token; - } - } else { - this.config.atoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.rtoken = tokens.refresh_token; - } - } - resolve(); - } catch (error) { - this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); - this.log.error(error); - this.log.error(body); - this.log.error(resp.statusCode); - this.log.error(error.stack); - this.restart(); - reject(); - } - } - ); - }); - } + refreshToken(isVw) { + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; + let rtoken = this.config.rtoken; + let body = "refresh_token=" + rtoken; + let form = ""; + if (isVw) { + url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; + rtoken = this.config.vwrtoken; + body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; + } else if (this.config.type === "audi") { + url = "https://id.audi.com/v1/token"; + body = ""; + form = { + client_id: this.clientId, + grant_type: "refresh_token", + response_type: "token id_token", + refresh_token: rtoken + }; + } else if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = ""; + form = { + scope: "openid+profile+address+email+phone", + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: rtoken + }; + } + return new Promise((resolve, reject) => { + this.log.debug("refreshToken"); + request.post( + { + url: url, + headers: { + "user-agent": "okhttp/3.7.0", + "content-type": "application/x-www-form-urlencoded", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + "X-Client-Id": this.xclientId, + accept: "application/json" + }, + body: body, + form: form, + gzip: true, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to refresh token."); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(body); + const tokens = JSON.parse(body); + if (tokens.error) { + this.log.error(body); + setTimeout(() => { + this.refreshToken(isVw); + }, 5 * 60 * 1000); + reject(); + return; + } + if (isVw) { + this.config.vwatoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.vwrtoken = tokens.refresh_token; + } + } else { + this.config.atoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.rtoken = tokens.refresh_token; + } + } + resolve(); + } catch (error) { + this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); + this.log.error(error); + this.log.error(body); + this.log.error(resp.statusCode); + this.log.error(error.stack); + this.restart(); + reject(); + } + } + ); + }); + } - getPersonalData() { - return new Promise((resolve, reject) => { - if (this.config.type === "audi" || this.config.type === "go") { - resolve(); - return; - } - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io" - }, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(body); - const data = JSON.parse(body); - this.config.identifier = data.businessIdentifierValue; - Object.keys(data).forEach(key => { - this.setObjectNotExists("personal." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState("personal." + key, data[key], true); - }); + getPersonalData() { + return new Promise((resolve, reject) => { + if (this.config.type === "audi" || this.config.type === "go") { + resolve(); + return; + } + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.atoken, + accept: "application/json", + Host: "customer-profile.apps.emea.vwapps.io" + }, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(body); + const data = JSON.parse(body); + this.config.identifier = data.businessIdentifierValue; + Object.keys(data).forEach(key => { + this.setObjectNotExists("personal." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState("personal." + key, data[key], true); + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getCarData() { - return new Promise((resolve, reject) => { - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io" - }, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(body); - const data = JSON.parse(body); - Object.keys(data).forEach(key => { - this.setObjectNotExists("car." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState("car." + key, data[key], true); - }); + getCarData() { + return new Promise((resolve, reject) => { + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.atoken, + accept: "application/json", + Host: "customer-profile.apps.emea.vwapps.io" + }, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(body); + const data = JSON.parse(body); + Object.keys(data).forEach(key => { + this.setObjectNotExists("car." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState("car." + key, data[key], true); + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getVehicles() { - return new Promise((resolve, reject) => { - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); - let headers = { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json" - }; - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; - headers = { - "user-agent": "okhttp/3.9.1", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE", - "dmp-api-version": "v2.0", - "dmp-client-info": "Android/7.0/VW Connect/App/2.9.4", - accept: "application/json;charset=UTF-8" - }; - } - request.get( - { - url: url, - headers: headers, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - } - try { - if (body.errorCode) { - this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - if (this.config.type === "go") { - body.forEach(element => { - const vin = element.vehicle.vin; - this.setObjectNotExists(element.vehicle.vin, { - type: "device", - common: { - name: element.licencePlate, - role: "indicator", - type: "mixed", - write: false, + getVehicles() { + return new Promise((resolve, reject) => { + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); + let headers = { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json" + }; + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + headers = { + "user-agent": "okhttp/3.9.1", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": "Android/7.0/VW Connect/App/2.9.4", + accept: "application/json;charset=UTF-8" + }; + } + request.get( + { + url: url, + headers: headers, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + } + try { + if (body.errorCode) { + this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + if (this.config.type === "go") { + body.forEach(element => { + const vin = element.vehicle.vin; + this.setObjectNotExists(element.vehicle.vin, { + type: "device", + common: { + name: element.licencePlate, + role: "indicator", + type: "mixed", + write: false, - read: true - }, - native: {} - }); - const adapter = this; + read: true + }, + native: {} + }); + const adapter = this; - let result = body.vehicleData; + const result = body.vehicleData; - traverse(element).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); - } - }); - }); - resolve(); - return; - } + traverse(element).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + } + }); + }); + resolve(); + return; + } - const vehicles = body.userVehicles.vehicle; - vehicles.forEach(vehicle => { - this.vinArray.push(vehicle); - this.setObjectNotExists(vehicle, { - type: "device", - common: { - name: vehicle.title, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.batterycharge", { - type: "state", - common: { - name: "Start Battery Charge", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisation", { - type: "state", - common: { - name: "Start Climatisation", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { - type: "state", - common: { - name: "Temperature in °C", - type: "boolean", - role: "number", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.windowheating", { - type: "state", - common: { - name: "Start Windowheating", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.honk", { - type: "state", - common: { - name: "Start Honk", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.flash", { - type: "state", - common: { - name: "Start Flash", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.standheizung", { - type: "state", - common: { - name: "Standheizung aktiviert", - type: "boolean", - role: "switch", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.lock", { - type: "state", - common: { - name: "Verriegeln (true) / Entriegeln (false)", - type: "boolean", - role: "switch", - write: true - }, - native: {} - }); - }); - resolve(); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - this.log.error("Not able to find vehicle, did you choose the correct type?."); - reject(); - } - } - ); - }); - } + const vehicles = body.userVehicles.vehicle; + vehicles.forEach(vehicle => { + this.vinArray.push(vehicle); + this.setObjectNotExists(vehicle, { + type: "device", + common: { + name: vehicle.title, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.batterycharge", { + type: "state", + common: { + name: "Start Battery Charge", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.climatisation", { + type: "state", + common: { + name: "Start Climatisation", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { + type: "state", + common: { + name: "Temperature in °C", + type: "boolean", + role: "number", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.windowheating", { + type: "state", + common: { + name: "Start Windowheating", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.honk", { + type: "state", + common: { + name: "Start Honk", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.flash", { + type: "state", + common: { + name: "Start Flash", + type: "boolean", + role: "button", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.standheizung", { + type: "state", + common: { + name: "Standheizung aktiviert", + type: "boolean", + role: "switch", + write: true + }, + native: {} + }); + this.setObjectNotExists(vehicle + ".remote.lock", { + type: "state", + common: { + name: "Verriegeln (true) / Entriegeln (false)", + type: "boolean", + role: "switch", + write: true + }, + native: {} + }); + }); + resolve(); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + this.log.error("Not able to find vehicle, did you choose the correct type?."); + reject(); + } + } + ); + }); + } - getVehicleData(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go") { - resolve(); - return; - } - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw") { - url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); - } - let atoken = this.config.vwatoken; - if (this.config.type === "audi") { - url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; - atoken = this.config.atoken; - } - request.get( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Market": "de_DE", - Authorization: "Bearer " + atoken, - Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - const adapter = this; - let result = body.vehicleData; - if (this.config.type === "audi") { - result = body.vehicles[this.vinArray.indexOf(vin)]; - } - traverse(result).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); - } - }); + getVehicleData(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go") { + resolve(); + return; + } + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); + if (this.config.type !== "vw") { + url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); + } + let atoken = this.config.vwatoken; + if (this.config.type === "audi") { + url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; + atoken = this.config.atoken; + } + request.get( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Market": "de_DE", + Authorization: "Bearer " + atoken, + Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + const adapter = this; + let result = body.vehicleData; + if (this.config.type === "audi") { + result = body.vehicles[this.vinArray.indexOf(vin)]; + } + traverse(result).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); + } + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getVehicleRights(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go" || !this.config.rights) { - resolve(); - return; - } - let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; - if (this.config.type === "vw") { - url += "/users/" + this.config.identifier; - } - request.get( - { - url: url, - qs: { - scope: "All" - }, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const adapter = this; - traverse(body.operationList).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - if (modPath[modPath.length - 1] !== "$") { - adapter.setObjectNotExists(vin + ".rights." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); - } - } - }); + getVehicleRights(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go" || !this.config.rights) { + resolve(); + return; + } + let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; + if (this.config.type === "vw") { + url += "/users/" + this.config.identifier; + } + request.get( + { + url: url, + qs: { + scope: "All" + }, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + const adapter = this; + traverse(body.operationList).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + if (modPath[modPath.length - 1] !== "$") { + adapter.setObjectNotExists(vin + ".rights." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); + } + } + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - requestStatusUpdate(vin) { - return new Promise((resolve, reject) => { - const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); - request.post( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: + requestStatusUpdate(vin) { + return new Promise((resolve, reject) => { + const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + request.post( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getVehicleStatus(vin, url, path, element, element2) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); - request.get( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: + getVehicleStatus(vin, url, path, element, element2) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + request.get( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); + }, + followAllRedirects: true, + gzip: true, + json: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); - if (path === "position") { - this.setObjectNotExists(vin + ".position.isMoving", { - type: "state", - common: { - name: "is car moving", - role: "indicator", - type: "boolean", - write: false, - read: true - }, - native: {} - }); + if (path === "position") { + this.setObjectNotExists(vin + ".position.isMoving", { + type: "state", + common: { + name: "is car moving", + role: "indicator", + type: "boolean", + write: false, + read: true + }, + native: {} + }); - if (resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - resolve(); - return; - } else { - this.setState(vin + ".position.isMoving", false, true); - } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } - } + if (resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); + resolve(); + return; + } else { + this.setState(vin + ".position.isMoving", false, true); + } + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + } - if (body === undefined || body === "" || body.error) { - if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { - this.log.error("Error response try to refresh token " + path); - this.log.error(JSON.stringify(body)); - this.refreshToken(true); - } else { - this.log.debug("Not able to get " + path); - } - this.log.debug(body); - reject(); - return; - } + if (body === undefined || body === "" || body.error) { + if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { + this.log.error("Error response try to refresh token " + path); + this.log.error(JSON.stringify(body)); + this.refreshToken(true); + } else { + this.log.debug("Not able to get " + path); + } + this.log.debug(body); + reject(); + return; + } - const adapter = this; + const adapter = this; - let result = body; - if (result === "") { - resolve(); - return; - } - if (result) { - if (element) { - result = result[element]; - } - if (element2) { - result = result[element2]; - } - if (path === "tripdata") { - if (this.config.tripType === "none") { - resolve(); - return; - } - adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { - type: "state", - common: { - name: "numberOfLastTrip", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); - } + let result = body; + if (result === "") { + resolve(); + return; + } + if (result) { + if (element) { + result = result[element]; + } + if (element2) { + result = result[element2]; + } + if (path === "tripdata") { + if (this.config.tripType === "none") { + resolve(); + return; + } + adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { + type: "state", + common: { + name: "numberOfLastTrip", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); + } - traverse(result).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); + traverse(result).forEach(function(value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); - } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); + } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); + modPath.splice(parentIndex + 1, 1); + } + }); - if (this.node.field && this.node.field[this.node.field.length - 1].textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.field[this.node.field.length - 1].textId, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } - if (this.node.textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.textId, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } else if (this.node.timestamp) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.timestamp, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } - } - }); - resolve(); - } else { - this.log.error("Cannot find vehicle data " + path); - this.log.error(body); - reject(); - } - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - } - ); - }); - } + if (this.node.field && this.node.field[this.node.field.length - 1].textId) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.field[this.node.field.length - 1].textId, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + } + if (this.node.textId) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.textId, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + } else if (this.node.timestamp) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.timestamp, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + } + } + }); + resolve(); + } else { + this.log.error("Cannot find vehicle data " + path); + this.log.error(body); + reject(); + } + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + }); + } - setVehicleStatus(vin, url, body, contentType, secToken) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); - this.log.debug(body); - this.log.debug(contentType); - let headers = { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - "Content-Type": contentType, - Accept: + setVehicleStatus(vin, url, body, contentType, secToken) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + this.log.debug(body); + this.log.debug(contentType); + const headers = { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + "Content-Type": contentType, + Accept: "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*" - }; - if (secToken) { - headers["x-mbbSecToken"] = secToken; - } + }; + if (secToken) { + headers["x-mbbSecToken"] = secToken; + } - request.post( - { - url: url, - headers: headers, - body: body, - followAllRedirects: true, - gzip: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(body); - if (body.indexOf("") !== -1) { - this.log.error("Error response try to refresh token " + url); - this.log.error(body); - this.refreshToken(true); - reject(); - return; - } - this.log.info(body); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - } - ); - }); - } - requestSecToken(vin, service) { - return new Promise((resolve, reject) => { - request.get( - { - url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - accept: "application/json" - }, - followAllRedirects: true, - json: true, - gzip: true - }, - async (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - if (body.securityPinAuthInfo) { - const secToken = body.securityPinAuthInfo.securityToken; - const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge; - const securPin = await this.generateSecurPin(challenge); - const rBody = { - securityPinAuthentication: { - securityPin: { - challenge: challenge, - securityPinHash: securPin - }, - securityToken: secToken - } - }; - request.post( - { - url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed", - headers: { - "user-agent": "okhttp/3.7.0", - "Content-Type": "application/json", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json" - }, - body: rBody, - gzip: true, - json: true, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to get sec token."); - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(body); - if (body.securityToken) { - resolve(body.securityToken); - } else { - this.log.error("No Security token found"); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } else { - this.log.error("No Security information found"); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } - generateSecurPin(challenge) { - return new Promise((resolve, reject) => { - if (!this.config.pin) { - this.log.error("Please Enter your S-Pin in the Instance Options"); - reject(); - return; - } - const pin = this.toByteArray(this.config.pin); + request.post( + { + url: url, + headers: headers, + body: body, + followAllRedirects: true, + gzip: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(body); + if (body.indexOf("") !== -1) { + this.log.error("Error response try to refresh token " + url); + this.log.error(body); + this.refreshToken(true); + reject(); + return; + } + this.log.info(body); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + }); + } + requestSecToken(vin, service) { + return new Promise((resolve, reject) => { + request.get( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + accept: "application/json" + }, + followAllRedirects: true, + json: true, + gzip: true + }, + async (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(JSON.stringify(body)); + if (body.securityPinAuthInfo) { + const secToken = body.securityPinAuthInfo.securityToken; + const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge; + const securPin = await this.generateSecurPin(challenge); + const rBody = { + securityPinAuthentication: { + securityPin: { + challenge: challenge, + securityPinHash: securPin + }, + securityToken: secToken + } + }; + request.post( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed", + headers: { + "user-agent": "okhttp/3.7.0", + "Content-Type": "application/json", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json" + }, + body: rBody, + gzip: true, + json: true, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to get sec token."); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(body); + if (body.securityToken) { + resolve(body.securityToken); + } else { + this.log.error("No Security token found"); + this.log.error(JSON.stringify(body)); + reject(); + } + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } else { + this.log.error("No Security information found"); + this.log.error(JSON.stringify(body)); + reject(); + } + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + generateSecurPin(challenge) { + return new Promise((resolve, reject) => { + if (!this.config.pin) { + this.log.error("Please Enter your S-Pin in the Instance Options"); + reject(); + return; + } + const pin = this.toByteArray(this.config.pin); - const byteChallenge = this.toByteArray(challenge); - var webcrypto = new Crypto(); - var concat = new Int8Array(pin.concat(byteChallenge)); - const digest = webcrypto.subtle.digest("SHA-512", concat).then(digest => { - var utf8Array = new Int8Array(digest); - resolve(this.toHexString(utf8Array)); - }); - }); - } - getCodeChallenge() { - let hash = ""; - let result = ""; - while (hash === "" || hash.indexOf("+") !== -1 || hash.indexOf("/") !== -1 || hash.indexOf("=") !== -1 || result.indexOf("+") !== -1 || result.indexOf("/") !== -1) { - const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - result = ""; - for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; - result = Buffer.from(result).toString("base64"); - result = result.replace(/=/g, ""); - hash = crypto - .createHash("sha256") - .update(result) - .digest("base64"); - hash = hash.slice(0, hash.length - 1); - } - return [result, hash]; - } - getNonce() { - const timestamp = Date.now(); - let hash = crypto - .createHash("sha256") - .update(timestamp.toString()) - .digest("base64"); - hash = hash.slice(0, hash.length - 1); - return hash; - } - toHexString(byteArray) { - return Array.prototype.map - .call(byteArray, function(byte) { - return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); - }) - .join(""); - } + const byteChallenge = this.toByteArray(challenge); + const webcrypto = new Crypto(); + const concat = new Int8Array(pin.concat(byteChallenge)); + const digest = webcrypto.subtle.digest("SHA-512", concat).then(digest => { + const utf8Array = new Int8Array(digest); + resolve(this.toHexString(utf8Array)); + }); + }); + } + getCodeChallenge() { + let hash = ""; + let result = ""; + while (hash === "" || hash.indexOf("+") !== -1 || hash.indexOf("/") !== -1 || hash.indexOf("=") !== -1 || result.indexOf("+") !== -1 || result.indexOf("/") !== -1) { + const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + result = ""; + for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + result = Buffer.from(result).toString("base64"); + result = result.replace(/=/g, ""); + hash = crypto + .createHash("sha256") + .update(result) + .digest("base64"); + hash = hash.slice(0, hash.length - 1); + } + return [result, hash]; + } + getNonce() { + const timestamp = Date.now(); + let hash = crypto + .createHash("sha256") + .update(timestamp.toString()) + .digest("base64"); + hash = hash.slice(0, hash.length - 1); + return hash; + } + toHexString(byteArray) { + return Array.prototype.map + .call(byteArray, function(byte) { + return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); + }) + .join(""); + } - toByteArray(hexString) { - var result = []; - for (var i = 0; i < hexString.length; i += 2) { - result.push(parseInt(hexString.substr(i, 2), 16)); - } - return result; - } - /** + toByteArray(hexString) { + const result = []; + for (let i = 0; i < hexString.length; i += 2) { + result.push(parseInt(hexString.substr(i, 2), 16)); + } + return result; + } + /** * Is called when adapter shuts down - callback has to be called under any circumstances! * @param {() => void} callback */ - onUnload(callback) { - try { - this.log.info("cleaned everything up..."); - clearInterval(this.refreshTokenInterval); - clearInterval(this.vwrefreshTokenInterval); - clearInterval(this.updateInterval); - clearInterval(this.fupdateInterval); - callback(); - } catch (e) { - callback(); - } - } + onUnload(callback) { + try { + this.log.info("cleaned everything up..."); + clearInterval(this.refreshTokenInterval); + clearInterval(this.vwrefreshTokenInterval); + clearInterval(this.updateInterval); + clearInterval(this.fupdateInterval); + callback(); + } catch (e) { + callback(); + } + } - /** + /** * Is called if a subscribed state changes * @param {string} id * @param {ioBroker.State | null | undefined} state */ - async onStateChange(id, state) { - if (state) { - if (!state.ack) { - const vin = id.split(".")[2]; - let body = ""; - let contentType = ""; - if (id.indexOf("remote") !== -1) { - const action = id.split(".")[4]; - if (action === "batterycharge") { - body = '\n\n start\n'; - if (state.val === false) { - body = '\n\n stop\n'; - } - contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType); - } + async onStateChange(id, state) { + if (state) { + if (!state.ack) { + const vin = id.split(".")[2]; + let body = ""; + let contentType = ""; + if (id.indexOf("remote") !== -1) { + const action = id.split(".")[4]; + if (action === "batterycharge") { + body = '\n\n start\n'; + if (state.val === false) { + body = '\n\n stop\n'; + } + contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType); + } - if (action === "climatisation") { - body = '\n\n startClimatisation\n'; - if (state.val === false) { - body = '\n\n stopClimatisation\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } + if (action === "climatisation") { + body = '\n\n startClimatisation\n'; + if (state.val === false) { + body = '\n\n stopClimatisation\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); + } - if (action === "climatisationTemperature") { - let temp = 2950; - if (state.val && !isNaN(state.val)) { - temp = (parseFloat(state.val) + 273, 6) * 10; - } - body = + if (action === "climatisationTemperature") { + let temp = 2950; + if (state.val && !isNaN(state.val)) { + temp = (parseFloat(state.val) + 273, 6) * 10; + } + body = '\n\n setSettings ' + temp + " false electric \n"; - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); + } - if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; - if (state.val === false) { - body = '\n\n stopWindowHeating\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } - if (action === "flash") { - //HONK_AND_FLASH - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); - } + if (action === "windowheating") { + body = '\n\n startWindowHeating\n'; + if (state.val === false) { + body = '\n\n stopWindowHeating\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); + } + if (action === "flash") { + //HONK_AND_FLASH + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); + } - if (action === "honk") { - // - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); - } - if (action === "standheizung") { - body = + if (action === "honk") { + // + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); + } + if (action === "standheizung") { + body = '\n\n \n true\n \n'; - if (state.val === false) { - body = + if (state.val === false) { + body = '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken); - } - if (action === "lock") { - body = '\n\n lock\n'; - let lockAction = "LOCK"; - if (state.val === false) { - body = '\n\n unlock\n'; - lockAction = "UNLOCK"; - } - contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken); - } - } - } else { - if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - const vin = id.split(".")[2]; - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken); + } + if (action === "lock") { + body = '\n\n lock\n'; + let lockAction = "LOCK"; + if (state.val === false) { + body = '\n\n unlock\n'; + lockAction = "UNLOCK"; + } + contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken); + } + } + } else { + if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { + const vin = id.split(".")[2]; + const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + const longitudeValue = parseFloat(longitude.val); - this.setObjectNotExists(vin + ".position.latitudeConv", { - type: "state", - common: { - name: "latitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); - this.setObjectNotExists(vin + ".position.longitudeConv", { - type: "state", - common: { - name: "longitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - if (!this.config.reversePos) { - return; - } - request.get( - { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", + this.setObjectNotExists(vin + ".position.latitudeConv", { + type: "state", + common: { + name: "latitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); + this.setObjectNotExists(vin + ".position.longitudeConv", { + type: "state", + common: { + name: "longitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); + if (!this.config.reversePos) { + return; + } + request.get( + { + url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", - headers: { - "User-Agent": "ioBroker/vw-connect" - }, - json: true, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || resp.statusCode >= 400 || !body) { - body && this.log.error(body); - resp && this.log.error(resp.statusCode); - err && this.log.error(err); - return; - } - if (body.display_name) { - try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - this.setObjectNotExists(vin + ".position.address.displayName", { - type: "state", - common: { - name: "displayName", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach(key => { - this.setObjectNotExists(vin + ".position.address." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.address." + key, body.address[key], true); - }); - } catch (error) { - this.log.error(error); - } - } else { - this.log.error(body); - } - } - ); - } - } - } else { - // The state was deleted - // this.log.info(`state ${id} deleted`); - } - } + headers: { + "User-Agent": "ioBroker/vw-connect" + }, + json: true, + followAllRedirects: true + }, + (err, resp, body) => { + if (err || resp.statusCode >= 400 || !body) { + body && this.log.error(body); + resp && this.log.error(resp.statusCode); + err && this.log.error(err); + return; + } + if (body.display_name) { + try { + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + this.setObjectNotExists(vin + ".position.address.displayName", { + type: "state", + common: { + name: "displayName", + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.address.displayName", fullAdress, true); + Object.keys(body.address).forEach(key => { + this.setObjectNotExists(vin + ".position.address." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true + }, + native: {} + }); + this.setState(vin + ".position.address." + key, body.address[key], true); + }); + } catch (error) { + this.log.error(error); + } + } else { + this.log.error(body); + } + } + ); + } + } + } else { + // The state was deleted + // this.log.info(`state ${id} deleted`); + } + } } // @ts-ignore parent is a valid property on module if (module.parent) { - // Export the constructor in compact mode - /** + // Export the constructor in compact mode + /** * @param {Partial} [options={}] */ - module.exports = options => new VwWeconnect(options); + module.exports = options => new VwWeconnect(options); } else { - // otherwise start the instance directly - new VwWeconnect(); + // otherwise start the instance directly + new VwWeconnect(); } diff --git a/package.json b/package.json index 136d2f40..ac99dee1 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,9 @@ "sinon": "^7.5.0", "sinon-chai": "^3.3.0" }, + "engines": { + "node": ">=10.0.0" + }, "homepage": "https://github.com/ta2k/ioBroker.vw-connect", "keywords": [ "VW", @@ -62,8 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.8", - "engines": { - "node": ">=10.0.0" - } + "version": "0.0.10" } \ No newline at end of file From 5e23a0e62a9c7a663ac608ff7f013fe14cb5b240 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 28 Jan 2020 18:37:21 +0100 Subject: [PATCH 046/729] fix hiding errors --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 1374cecd..6a333db9 100644 --- a/main.js +++ b/main.js @@ -1202,7 +1202,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.debug(resp.statusCode); reject(); return; } From 321d3cb6aafbdc49006ce9cc672755d21faae64c Mon Sep 17 00:00:00 2001 From: Yves Schumann Date: Mon, 3 Feb 2020 20:42:28 +0100 Subject: [PATCH 047/729] Improved readme layout --- README.md | 297 +++++++++++++++--------------------------------------- 1 file changed, 83 insertions(+), 214 deletions(-) diff --git a/README.md b/README.md index eb3cfdbd..66a3e196 100644 --- a/README.md +++ b/README.md @@ -24,220 +24,89 @@ Use the state under remote control to control your car remotely. ## Status fields Explanation -'0x0101010002.0x0101010002': //distanceCovered - -'0x0204FFFFFF.0x02040C0001': //adBlueInspectionData_km - -'0x0203FFFFFF.0x0203010001': //oilInspectionData_km - -'0x0203FFFFFF.0x0203010002': //oilInspectionData_days - -'0x0203FFFFFF.0x0203010003': //serviceInspectionData_km - -'0x0203FFFFFF.0x0203010004': //serviceInspectionData_days - -'0x030101FFFF.0x0301010001': //status_parking_light_off - -'0x030103FFFF.0x0301030001': //parking brake - -'0x030103FFFF.0x0301030007': //fuel type - -'0x030103FFFF.0x030103000A': //fuel level - -'0x030103FFFF.0x0301030006': //fuel range - -'0x030103FFFF.0x0301030009': //secondary_typ - erst ab Modelljahr 2018 - -'0x030103FFFF.0x0301030002': //soc_ok - -'0x030103FFFF.0x0301030008': //secondary_range - erst ab Modelljahr 2018 - -'0x030103FFFF.0x0301030005': //hybrid_range - erst ab Modelljahr 2018 - -1 = open 2 = Locked 3 = Closed -//door1 - front/left - -'0x030104FFFF.0x0301040001': -//door2 - rear/left - -'0x030104FFFF.0x0301040004': -//door3 - front/right - -'0x030104FFFF.0x0301040007': -//door4 - rear/right - -'0x030104FFFF.0x030104000A': -//door5 - rear - -'0x030104FFFF.0x030104000D': -//door6 - hood - -'0x030104FFFF.0x0301040010': -//window1 - front/left - -'0x030105FFFF.0x0301050001': -//window2 - rear/left - -'0x030105FFFF.0x0301050003': -//window3 - front/right - -'0x030105FFFF.0x0301050005': -//window4 - rear/right - -'0x030105FFFF.0x0301050007': -//window4 - roof window - -'0x030105FFFF.0x030105000B': - -1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); - -2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); - -3MAINTENANCE_INTERVAL_DISTANCE_TO_INSPECTION", 2, "0x0203010003"); - -4MAINTENANCE_INTERVAL_TIME_TO_INSPECTION", 3, "0x0203010004"); - -5WARNING_OIL_CHANGE", 4, "0x0203010005"); - -6MAINTENANCE_INTERVAL_ALARM_INSPECTION", 5, "0x0203010006"); - -7MAINTENANCE_INTERVAL_MONTHLY_MILEAGE", 6, "0x0203010007"); - -8MAINTENANCE_INTERVAL_AD_BLUE_RANGE", 7, "0x02040C0001"); - -9OIL_LEVEL_AMOUNT_IN_LITERS", 8, "0x0204040001"); - -10OIL_LEVEL_MINIMUM_WARNING", 9, "0x0204040002"); - -11OIL_LEVEL_DIPSTICK_PERCENTAGE", 10, "0x0204040003"); - -12LIGHT_STATUS", 11, "0x0301010001"); - -13TOTAL_RANGE", 12, "0x0301030005"); - -14FUEL_LEVEL_IN_PERCENTAGE", 13, "0x030103000A"); - -15CNG_LEVEL_IN_PERCENTAGE", 14, "0x030103000D"); - -16LOCK_STATE_LEFT_FRONT_DOOR", 15, "0x0301040001"); - -17OPEN_STATE_LEFT_FRONT_DOOR", 16, "0x0301040002"); - -18SAFETY_STATE_LEFT_FRONT_DOOR", 17, "0x0301040003"); - -19LOCK_STATE_LEFT_REAR_DOOR", 18, "0x0301040004"); - -20OPEN_STATE_LEFT_REAR_DOOR", 19, "0x0301040005"); - -21SAFETY_STATE_LEFT_REAR_DOOR", 20, "0x0301040006"); - -22LOCK_STATE_RIGHT_FRONT_DOOR", 21, "0x0301040007"); - -23OPEN_STATE_RIGHT_FRONT_DOOR", 22, "0x0301040008"); - -24SAFETY_STATE_RIGHT_FRONT_DOOR", 23, "0x0301040009"); - -25LOCK_STATE_RIGHT_REAR_DOOR", 24, "0x030104000A"); - -26OPEN_STATE_RIGHT_REAR_DOOR", 25, "0x030104000B"); - -27SAFETY_STATE_RIGHT_REAR_DOOR", 26, "0x030104000C"); - -28LOCK_STATE_TRUNK_LID", 27, "0x030104000D"); - -29OPEN_STATE_TRUNK_LID", 28, "0x030104000E"); - -30SAFETY_STATE_TRUNK_LID", 29, "0x030104000F"); - -31LOCK_STATE_HOOD", 30, "0x0301040010"); - -32OPEN_STATE_HOOD", 31, "0x0301040011"); - -33SAFETY_STATE_HOOD", 32, "0x0301040012"); - -34STATE_LEFT_FRONT_WINDOW", 33, "0x0301050001"); - -35POSITION_LEFT_FRONT_WINDOW", 34, "0x0301050002"); - -36STATE_LEFT_REAR_WINDOW", 35, "0x0301050003"); - -37POSITION_LEFT_REAR_WINDOW", 36, "0x0301050004"); - -38STATE_RIGHT_FRONT_WINDOW", 37, "0x0301050005"); - -39POSITION_RIGHT_FRONT_WINDOW", 38, "0x0301050006"); - -40STATE_RIGHT_REAR_WINDOW", 39, "0x0301050007"); - -41POSITION_RIGHT_REAR_WINDOW", 40, "0x0301050008"); - -42STATE_CONVERTIBLE_TOP", 41, "0x0301050009"); - -43POSITION_CONVERTIBLE_TOP", 42, "0x030105000A"); - -44STATE_SUN_ROOF_MOTOR_COVER", 43, "0x030105000B"); - -45POSITION_SUN_ROOF_MOTOR_COVER", 44, "0x030105000C"); - -46STATE_SUN_ROOF_REAR_MOTOR_COVER_3", 45, "0x030105000D"); - -47POSITION_SUN_ROOF_REAR_MOTOR_COVER_3", 46, "0x030105000E"); - -48STATE_SERVICE_FLAP", 47, "0x030105000F"); - -49POSITION_SERVICE_FLAP", 48, "0x0301050010"); - -50STATE_SPOILER", 49, "0x0301050011"); - -51POSITION_SPOILER", 50, "0x0301050012"); - -52UTC_TIME_STATUS", 51, "0x0101010001"); - -53KILOMETER_STATUS", 52, "0x0101010002"); - -54PRIMARY_RANGE", 53, "0x0301030006"); - -55PRIMARY_DRIVE", 54, "0x0301030007"); - -56SECONDARY_RANGE", 55, "0x0301030008"); - -57SECONDARY_DRIVE", 56, "0x0301030009"); - -58STATE_OF_CHARGE", 57, "0x0301030002"); - -59TEMPERATURE_OUTSIDE", 58, "0x0301020001"); - -60PARKING_BRAKE", 59, "0x0301030001"); - -61TYRE_PRESSURE_LEFT_FRONT_CURRENT_VALUE", 60, "0x0301060001"); - -62TYRE_PRESSURE_LEFT_FRONT_DESIRED_VALUE", 61, "0x0301060002"); - -63TYRE_PRESSURE_LEFT_REAR_CURRENT_VALUE", 62, "0x0301060003"); - -64TYRE_PRESSURE_LEFT_REAR_DESIRED_VALUE", 63, "0x0301060004"); - -65TYRE_PRESSURE_RIGHT_FRONT_CURRENT_VALUE", 64, "0x0301060005"); - -66TYRE_PRESSURE_RIGHT_FRONT_DESIRED_VALUE", 65, "0x0301060006"); - -67TYRE_PRESSURE_RIGHT_REAR_CURRENT_VALUE", 66, "0x0301060007"); - -68TYRE_PRESSURE_RIGHT_REAR_DESIRED_VALUE", 67, "0x0301060008"); - -69TYRE_PRESSURE_SPARE_TYRE_CURRENT_VALUE", 68, "0x0301060009"); - -70TYRE_PRESSURE_SPARE_TYRE_DESIRED_VALUE", 69, "0x030106000A"); - -71TYRE_PRESSURE_LEFT_FRONT_TYRE_DIFFERENCE", 70, "0x030106000B"); - -72TYRE_PRESSURE_LEFT_REAR_TYRE_DIFFERENCE", 71, "0x030106000C"); - -73TYRE_PRESSURE_RIGHT_FRONT_TYRE_DIFFERENCE", 72, "0x030106000D"); - -74TYRE_PRESSURE_RIGHT_REAR_TYRE_DIFFERENCE", 73, "0x030106000E"); - -75TYRE_PRESSURE_SPARE_TYRE_DIFFERENCE", 74, "0x030106000F"); +Door and window states: +* open: 1 +* locked: 2 +* closed: 3 + +### List of entries +``` +"1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); // 0x0203FFFFFF.0x0203010001, oilInspectionData_km +"2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); // 0x0203FFFFFF.0x0203010002, oilInspectionData_days +"3MAINTENANCE_INTERVAL_DISTANCE_TO_INSPECTION", 2, "0x0203010003"); // 0x0203FFFFFF.0x0203010003, serviceInspectionData_km +"4MAINTENANCE_INTERVAL_TIME_TO_INSPECTION", 3, "0x0203010004"); // 0x0203FFFFFF.0x0203010004, serviceInspectionData_days +"5WARNING_OIL_CHANGE", 4, "0x0203010005"); +"6MAINTENANCE_INTERVAL_ALARM_INSPECTION", 5, "0x0203010006"); +"7MAINTENANCE_INTERVAL_MONTHLY_MILEAGE", 6, "0x0203010007"); +"8MAINTENANCE_INTERVAL_AD_BLUE_RANGE", 7, "0x02040C0001"); // 0x0204FFFFFF.0x02040C0001, adBlueInspectionData_km +"9OIL_LEVEL_AMOUNT_IN_LITERS", 8, "0x0204040001"); +"10OIL_LEVEL_MINIMUM_WARNING", 9, "0x0204040002"); +"11OIL_LEVEL_DIPSTICK_PERCENTAGE", 10, "0x0204040003"); +"12LIGHT_STATUS", 11, "0x0301010001"); // 0x030101FFFF.0x0301010001, status_parking_light_off +"13TOTAL_RANGE", 12, "0x0301030005"); // 0x030103FFFF.0x0301030005, hybrid_range - erst ab Modelljahr 2018 +"14FUEL_LEVEL_IN_PERCENTAGE", 13, "0x030103000A"); // 0x030103FFFF.0x030103000A, fuel level +"15CNG_LEVEL_IN_PERCENTAGE", 14, "0x030103000D"); +"16LOCK_STATE_LEFT_FRONT_DOOR", 15, "0x0301040001"); // 0x030104FFFF.0x0301040001, door1 - front/left +"17OPEN_STATE_LEFT_FRONT_DOOR", 16, "0x0301040002"); +"18SAFETY_STATE_LEFT_FRONT_DOOR", 17, "0x0301040003"); +"19LOCK_STATE_LEFT_REAR_DOOR", 18, "0x0301040004"); // 0x030104FFFF.0x0301040004, door2 - rear/left +"20OPEN_STATE_LEFT_REAR_DOOR", 19, "0x0301040005"); +"21SAFETY_STATE_LEFT_REAR_DOOR", 20, "0x0301040006"); +"22LOCK_STATE_RIGHT_FRONT_DOOR", 21, "0x0301040007"); // 0x030104FFFF.0x0301040007, door3 - front/right +"23OPEN_STATE_RIGHT_FRONT_DOOR", 22, "0x0301040008"); +"24SAFETY_STATE_RIGHT_FRONT_DOOR", 23, "0x0301040009"); +"25LOCK_STATE_RIGHT_REAR_DOOR", 24, "0x030104000A"); // 0x030104FFFF.0x030104000A, door4 - rear/right +"26OPEN_STATE_RIGHT_REAR_DOOR", 25, "0x030104000B"); +"27SAFETY_STATE_RIGHT_REAR_DOOR", 26, "0x030104000C"); +"28LOCK_STATE_TRUNK_LID", 27, "0x030104000D"); // 0x030104FFFF.0x030104000D, door5 - rear +"29OPEN_STATE_TRUNK_LID", 28, "0x030104000E"); +"30SAFETY_STATE_TRUNK_LID", 29, "0x030104000F"); +"31LOCK_STATE_HOOD", 30, "0x0301040010"); // 0x030104FFFF.0x0301040010, door6 - hood +"32OPEN_STATE_HOOD", 31, "0x0301040011"); +"33SAFETY_STATE_HOOD", 32, "0x0301040012"); +"34STATE_LEFT_FRONT_WINDOW", 33, "0x0301050001"); // 0x030105FFFF.0x0301050001, window1 - front/left +"35POSITION_LEFT_FRONT_WINDOW", 34, "0x0301050002"); +"36STATE_LEFT_REAR_WINDOW", 35, "0x0301050003"); // 0x030105FFFF.0x0301050003, window2 - rear/left +"37POSITION_LEFT_REAR_WINDOW", 36, "0x0301050004"); +"38STATE_RIGHT_FRONT_WINDOW", 37, "0x0301050005"); // 0x030105FFFF.0x0301050005, window3 - front/right +"39POSITION_RIGHT_FRONT_WINDOW", 38, "0x0301050006"); +"40STATE_RIGHT_REAR_WINDOW", 39, "0x0301050007"); // 0x030105FFFF.0x0301050007, window4 - rear/right +"41POSITION_RIGHT_REAR_WINDOW", 40, "0x0301050008"); +"42STATE_CONVERTIBLE_TOP", 41, "0x0301050009"); +"43POSITION_CONVERTIBLE_TOP", 42, "0x030105000A"); +"44STATE_SUN_ROOF_MOTOR_COVER", 43, "0x030105000B"); //0x030105FFFF.0x030105000B, window4 - roof window +"45POSITION_SUN_ROOF_MOTOR_COVER", 44, "0x030105000C"); +"46STATE_SUN_ROOF_REAR_MOTOR_COVER_3", 45, "0x030105000D"); +"47POSITION_SUN_ROOF_REAR_MOTOR_COVER_3", 46, "0x030105000E"); +"48STATE_SERVICE_FLAP", 47, "0x030105000F"); +"49POSITION_SERVICE_FLAP", 48, "0x0301050010"); +"50STATE_SPOILER", 49, "0x0301050011"); +"51POSITION_SPOILER", 50, "0x0301050012"); +"52UTC_TIME_STATUS", 51, "0x0101010001"); +"53KILOMETER_STATUS", 52, "0x0101010002"); // 0x0101010002.0x0101010002, distanceCovered +"54PRIMARY_RANGE", 53, "0x0301030006"); // 0x030103FFFF.0x0301030006, fuel range +"55PRIMARY_DRIVE", 54, "0x0301030007"); // 0x030103FFFF.0x0301030007, fuel type +"56SECONDARY_RANGE", 55, "0x0301030008"); // 0x030103FFFF.0x0301030008, secondary_range - erst ab Modelljahr 2018 +"57SECONDARY_DRIVE", 56, "0x0301030009"); // 0x030103FFFF.0x0301030009, secondary_typ - erst ab Modelljahr 2018 +"58STATE_OF_CHARGE", 57, "0x0301030002"); // 0x030103FFFF.0x0301030002, soc_ok +"59TEMPERATURE_OUTSIDE", 58, "0x0301020001"); +"60PARKING_BRAKE", 59, "0x0301030001"); // 0x030103FFFF.0x0301030001, parking brake +"61TYRE_PRESSURE_LEFT_FRONT_CURRENT_VALUE", 60, "0x0301060001"); +"62TYRE_PRESSURE_LEFT_FRONT_DESIRED_VALUE", 61, "0x0301060002"); +"63TYRE_PRESSURE_LEFT_REAR_CURRENT_VALUE", 62, "0x0301060003"); +"64TYRE_PRESSURE_LEFT_REAR_DESIRED_VALUE", 63, "0x0301060004"); +"65TYRE_PRESSURE_RIGHT_FRONT_CURRENT_VALUE", 64, "0x0301060005"); +"66TYRE_PRESSURE_RIGHT_FRONT_DESIRED_VALUE", 65, "0x0301060006"); +"67TYRE_PRESSURE_RIGHT_REAR_CURRENT_VALUE", 66, "0x0301060007"); +"68TYRE_PRESSURE_RIGHT_REAR_DESIRED_VALUE", 67, "0x0301060008"); +"69TYRE_PRESSURE_SPARE_TYRE_CURRENT_VALUE", 68, "0x0301060009"); +"70TYRE_PRESSURE_SPARE_TYRE_DESIRED_VALUE", 69, "0x030106000A"); +"71TYRE_PRESSURE_LEFT_FRONT_TYRE_DIFFERENCE", 70, "0x030106000B"); +"72TYRE_PRESSURE_LEFT_REAR_TYRE_DIFFERENCE", 71, "0x030106000C"); +"73TYRE_PRESSURE_RIGHT_FRONT_TYRE_DIFFERENCE", 72, "0x030106000D"); +"74TYRE_PRESSURE_RIGHT_REAR_TYRE_DIFFERENCE", 73, "0x030106000E"); +"75TYRE_PRESSURE_SPARE_TYRE_DIFFERENCE", 74, "0x030106000F"); +``` ## Changelog From 981118a93cf4664f7d9e10ceb789cfc98410e9bc Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 8 Feb 2020 22:24:14 +0100 Subject: [PATCH 048/729] Update .travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 387eb1ce..d64bb9ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ os: language: node_js node_js: - - '8' - '10' addons: From 4896e15c4d17e973173fb579b01c32efa2966b9c Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 8 Feb 2020 22:24:28 +0100 Subject: [PATCH 049/729] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d64bb9ff..16d82a1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ os: language: node_js node_js: - '10' + - '12' addons: apt: From 8ae46144da9d66e46bf2f607fbf1d82fc93b5135 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 8 Feb 2020 22:41:04 +0100 Subject: [PATCH 050/729] Update .npmignore --- .npmignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index ed16ee5d..0420f2fd 100644 --- a/.npmignore +++ b/.npmignore @@ -25,4 +25,5 @@ package-lock.json admin/i18n # maintenance scripts -maintenance/** \ No newline at end of file +maintenance/** +tsconfig.json From 864eecb53244f6e69f3ccdb5e832444c3e43e777 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 27 Feb 2020 11:22:58 +0100 Subject: [PATCH 051/729] 0.0.11 --- README.md | 25 ++++++++++++++++--------- io-package.json | 5 ++++- main.js | 23 +++++++++++++++++++++-- package.json | 6 +++--- 4 files changed, 44 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 66a3e196..ea7fe742 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,13 @@ Use the state under remote control to control your car remotely. ## Status fields Explanation Door and window states: + * open: 1 * locked: 2 * closed: 3 ### List of entries + ``` "1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); // 0x0203FFFFFF.0x0203010001, oilInspectionData_km "2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); // 0x0203FFFFFF.0x0203010002, oilInspectionData_days @@ -110,38 +112,43 @@ Door and window states: ## Changelog +### 0.0.11 + +- fix audi bug with multiple vehicles +- hide status update error if feature is not available + ### 0.0.9 -- set default trip type to none +- set default trip type to none ### 0.0.7 -- add we connect go and remote standheizung and lock/unlock +- add we connect go and remote standheizung and lock/unlock ### 0.0.6 -- add audi +- add audi ### 0.0.5 -- add honk and flash, fix address format +- add honk and flash, fix address format ### 0.0.4 -- add Skoda support +- add Skoda support ### 0.0.3 -- (ta2k) add more information -- (ta2k) add remote controls +- (ta2k) add more information +- (ta2k) add remote controls ### 0.0.2 -- (ta2k) add car status capturing +- (ta2k) add car status capturing ### 0.0.1 -- (ta2k) initial release +- (ta2k) initial release ## License diff --git a/io-package.json b/io-package.json index d2369b86..553b6b9a 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.10", + "version": "0.0.11", "news": { + "0.0.11": { + "en": "fix audi bug with multiple vehicles, hide status update error if feature is not available" + }, "0.0.10": { "en": "set default trip type to none" }, diff --git a/main.js b/main.js index 6a333db9..a849f849 100644 --- a/main.js +++ b/main.js @@ -38,6 +38,7 @@ class VwWeconnect extends utils.Adapter { this.fupdateInterval = null; this.vinArray = []; + this.etags = {} this.statesArray = [ { @@ -1006,6 +1007,7 @@ class VwWeconnect extends utils.Adapter { "X-App-Name": this.xappname, "X-Market": "de_DE", Authorization: "Bearer " + atoken, + "If-None-Match" : this.etags[url] || "", Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" }, followAllRedirects: true, @@ -1024,7 +1026,16 @@ class VwWeconnect extends utils.Adapter { const adapter = this; let result = body.vehicleData; if (this.config.type === "audi") { - result = body.vehicles[this.vinArray.indexOf(vin)]; + const index = body.vehicles.findIndex(vehicle => vehicle.vin === vin); + result = body.vehicles[index]; + } + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } } traverse(result).forEach(function(value) { if (this.path.length > 0 && this.isLeaf) { @@ -1190,6 +1201,7 @@ class VwWeconnect extends utils.Adapter { Host: "msg.volkswagen.de", "X-App-Version": this.xappversion, "X-App-Name": this.xappname, + "If-None-Match" : this.etags[url] || "", Authorization: "Bearer " + this.config.vwatoken, "Accept-charset": "UTF-8", Accept: @@ -1208,7 +1220,14 @@ class VwWeconnect extends utils.Adapter { } try { this.log.debug(JSON.stringify(body)); - + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } if (path === "position") { this.setObjectNotExists(vin + ".position.isMoving", { type: "state", diff --git a/package.json b/package.json index ac99dee1..8a120225 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "bundleDependencies": false, "dependencies": { "@iobroker/adapter-core": "^1.0.3", - "@peculiar/webcrypto": "^1.0.21", + "@peculiar/webcrypto": "^1.0.22", "jsdom": "^15.2.1", "request": "^2.88.0", "traverse": "^0.6.6", @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.10" -} \ No newline at end of file + "version": "0.0.11" +} From 9fb6b2cc065d1ba899dd2e0554157e2b37f93cd7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 27 Feb 2020 11:28:49 +0100 Subject: [PATCH 052/729] fix options width --- admin/index_m.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index b034a70b..c5110c91 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -102,13 +102,13 @@
-
+
-
+
-
+
Lizenzinformationen laden
From 8188ede28a45ce4dbd48cc8a61e22c4e57a8e3ca Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 27 Feb 2020 11:56:19 +0100 Subject: [PATCH 053/729] add login error --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index a849f849..add59007 100644 --- a/main.js +++ b/main.js @@ -38,7 +38,7 @@ class VwWeconnect extends utils.Adapter { this.fupdateInterval = null; this.vinArray = []; - this.etags = {} + this.etags = {}; this.statesArray = [ { @@ -363,7 +363,9 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err) { + this.log.debug(err); this.getTokens(getRequest, code_verifier, reject, resolve); + } else { this.log.debug("No Token received visiting url and accept the permissions."); const dom = new JSDOM(body); @@ -409,6 +411,8 @@ class VwWeconnect extends utils.Adapter { } ); } catch (error) { + this.log.error("Login was not successful, please check your login credentials and selected type"); + err && this.log.error(err); this.log.error(error); this.log.error(error.stack); reject(); From 3b090192dc98a0c031719290f31d2ee4841fd960 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 9 May 2020 15:05:44 +0200 Subject: [PATCH 054/729] add promise catches --- main.js | 3484 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 1760 insertions(+), 1724 deletions(-) diff --git a/main.js b/main.js index add59007..01b8f34c 100644 --- a/main.js +++ b/main.js @@ -16,191 +16,207 @@ const traverse = require("traverse"); const jsdom = require("jsdom"); const { JSDOM } = jsdom; class VwWeconnect extends utils.Adapter { - /** + /** * @param {Partial} [options={}] */ - constructor(options) { - super({ - ...options, - name: "vw-connect" - }); - this.on("ready", this.onReady.bind(this)); - // this.on("objectChange", this.onObjectChange.bind(this)); - this.on("stateChange", this.onStateChange.bind(this)); - // this.on("message", this.onMessage.bind(this)); - this.on("unload", this.onUnload.bind(this)); + constructor(options) { + super({ + ...options, + name: "vw-connect", + }); + this.on("ready", this.onReady.bind(this)); + // this.on("objectChange", this.onObjectChange.bind(this)); + this.on("stateChange", this.onStateChange.bind(this)); + // this.on("message", this.onMessage.bind(this)); + this.on("unload", this.onUnload.bind(this)); - this.jar = request.jar(); + this.jar = request.jar(); - this.refreshTokenInterval = null; - this.vwrefreshTokenInterval = null; - this.updateInterval = null; - this.fupdateInterval = null; + this.refreshTokenInterval = null; + this.vwrefreshTokenInterval = null; + this.updateInterval = null; + this.fupdateInterval = null; - this.vinArray = []; - this.etags = {}; + this.vinArray = []; + this.etags = {}; - this.statesArray = [ - { - url: "https://msg.volkswagen.de/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", - path: "timer", - element: "timer" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", - path: "climater", - element: "climater" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", - path: "position", - element: "storedPositionResponse", - element2: "position" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", - path: "tripdata", - element: "tripDataList" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", - path: "status", - element: "StoredVehicleDataResponse", - element2: "vehicleData" - }, - { - url: "https://msg.volkswagen.de/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", - path: "destinations", - element: "destinations" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", - path: "charger", - element: "charger" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", - path: "remoteStandheizung", - element: "statusResponse" - }, - { - url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", - path: "history" - } - ]; - } + this.statesArray = [ + { + url: "https://msg.volkswagen.de/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", + path: "timer", + element: "timer", + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", + path: "climater", + element: "climater", + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", + path: "position", + element: "storedPositionResponse", + element2: "position", + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", + path: "tripdata", + element: "tripDataList", + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", + path: "status", + element: "StoredVehicleDataResponse", + element2: "vehicleData", + }, + { + url: "https://msg.volkswagen.de/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", + path: "destinations", + element: "destinations", + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", + path: "charger", + element: "charger", + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", + path: "remoteStandheizung", + element: "statusResponse", + }, + { + url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", + path: "history", + }, + ]; + } - /** + /** * Is called when databases are connected and adapter received configuration. */ - async onReady() { - // Initialize your adapter here + async onReady() { + // Initialize your adapter here - this.setState("info.connection", false, true); - // Reset the connection indicator during startup - this.type = "VW"; - this.country = "DE"; - this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; - this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; - this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; - this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; - this.xrequest = "de.volkswagen.carnet.eu.eremote"; - this.responseType = "id_token%20token%20code"; - this.xappversion = "5.1.2"; - this.xappname = "eRemote"; - if (this.config.type === "skoda") { - this.type = "Skoda"; - this.country = "CZ"; - this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; - this.xclientId = "28cd30c6-dee7-4529-a0e6-b1e07ff90b79"; - this.scope = "openid%20profile%20phone%20address%20cars%20email%20birthdate%20badge%20dealers%20driversLicense%20mbb"; - this.redirect = "skodaconnect%3A%2F%2Foidc.login%2F"; - this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; - this.xappversion = "3.1.6"; - this.xappname = "cz.skodaauto.connect"; - } - if (this.config.type === "audi") { - this.type = "Audi"; - this.country = "DE"; - this.clientId = "mmiconnect_android"; - this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; - this.scope = "openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write"; - this.redirect = ""; - this.xrequest = ""; - this.responseType = "token id_token"; - this.xappversion = "3.14.0"; - this.xappname = "myAudi"; - } - if (this.config.type === "go") { - this.type = ""; - this.country = ""; - this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid%20profile%20address%20email%20phone"; - this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; - this.xrequest = ""; - this.responseType = "code"; - this.xappversion = ""; - this.xappname = ""; - } - this.login().then(() => { - this.log.debug("Login successful"); - this.setState("info.connection", true, true); - this.getPersonalData().then(() => { - this.getVehicles().then(() => { - if (this.config.type !== "go") { - this.vinArray.forEach(vin => { - this.getVehicleData(vin); - this.getVehicleRights(vin); - this.requestStatusUpdate(vin).then(() => { - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - }); - }); - } + this.setState("info.connection", false, true); + // Reset the connection indicator during startup + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; + this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; + this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; + this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; + this.xrequest = "de.volkswagen.carnet.eu.eremote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.1.2"; + this.xappname = "eRemote"; + if (this.config.type === "skoda") { + this.type = "Skoda"; + this.country = "CZ"; + this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; + this.xclientId = "28cd30c6-dee7-4529-a0e6-b1e07ff90b79"; + this.scope = "openid%20profile%20phone%20address%20cars%20email%20birthdate%20badge%20dealers%20driversLicense%20mbb"; + this.redirect = "skodaconnect%3A%2F%2Foidc.login%2F"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "3.1.6"; + this.xappname = "cz.skodaauto.connect"; + } + if (this.config.type === "audi") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "mmiconnect_android"; + this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; + this.scope = "openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write"; + this.redirect = ""; + this.xrequest = ""; + this.responseType = "token id_token"; + this.xappversion = "3.14.0"; + this.xappname = "myAudi"; + } + if (this.config.type === "go") { + this.type = ""; + this.country = ""; + this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid%20profile%20address%20email%20phone"; + this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } + this.login() + .then(() => { + this.log.debug("Login successful"); + this.setState("info.connection", true, true); + this.getPersonalData() + .then(() => { + this.getVehicles() + .then(() => { + if (this.config.type !== "go") { + this.vinArray.forEach((vin) => { + this.getVehicleData(vin); + this.getVehicleRights(vin); + this.requestStatusUpdate(vin) + .then(() => { + this.statesArray.forEach((state) => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + }) + .catch(() => { + this.log.error("status update Failed"); + }); + }); + } - this.updateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach(vin => { - this.statesArray.forEach(state => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - }); - }, this.config.interval * 60 * 1000); - if (this.config.forceinterval > 0) { - this.fupdateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach(vin => { - this.requestStatusUpdate(vin); - }); - }, this.config.forceinterval * 60 * 1000); - } - }); - }); - }); - this.subscribeStates("*"); - } - login() { - return new Promise((resolve, reject) => { - const nonce = this.getNonce(); - const state = uuidv4(); - const [code_verifier, codeChallenge] = this.getCodeChallenge(); + this.updateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach((vin) => { + this.statesArray.forEach((state) => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + }); + }, this.config.interval * 60 * 1000); + if (this.config.forceinterval > 0) { + this.fupdateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach((vin) => { + this.requestStatusUpdate(vin); + }); + }, this.config.forceinterval * 60 * 1000); + } + }) + .catch(() => { + this.log.error("Get Vehicles Failed"); + }); + }) + .catch(() => { + this.log.error("get personal data Failed"); + }); + }) + .catch(() => { + this.log.error("Login Failed"); + }); + this.subscribeStates("*"); + } + login() { + return new Promise((resolve, reject) => { + const nonce = this.getNonce(); + const state = uuidv4(); + const [code_verifier, codeChallenge] = this.getCodeChallenge(); - let method = "GET"; - let form = {}; - let url = + let method = "GET"; + let form = {}; + let url = "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + this.clientId + "&scope=" + @@ -213,1624 +229,1644 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "go") { - url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; - } - if (this.config.type === "audi") { - url = "https://id.audi.com/v1/token"; - method = "POST"; - form = { - client_id: this.clientId, - scope: this.scope, - response_type: this.responseType, - grant_type: "password", - username: this.config.user, - password: this.config.password - }; - } - request( - { - method: method, - url: url, - headers: { - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - "upgrade-insecure-requests": 1 - }, - jar: this.jar, - form: form, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } + if (this.config.type === "vw" || this.config.type === "go") { + url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; + } + if (this.config.type === "audi") { + url = "https://id.audi.com/v1/token"; + method = "POST"; + form = { + client_id: this.clientId, + scope: this.scope, + response_type: this.responseType, + grant_type: "password", + username: this.config.user, + password: this.config.password, + }; + } + request( + { + method: method, + url: url, + headers: { + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + "upgrade-insecure-requests": 1, + }, + jar: this.jar, + form: form, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed in first login step "); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(body); + reject(); + return; + } - try { - if (this.config.type === "audi") { - const tokens = JSON.parse(body); - this.getVWToken(tokens, tokens.id_token, reject, resolve); - return; - } + try { + if (this.config.type === "audi") { + const tokens = JSON.parse(body); + this.getVWToken(tokens, tokens.id_token, reject, resolve); + return; + } - const dom = new JSDOM(body); - const form = {}; - const formLogin = dom.window.document.querySelector("#emailPasswordForm"); - if (formLogin) { - this.log.debug("parseEmailForm"); - for (const formElement of dom.window.document.querySelector("#emailPasswordForm").children) { - if (formElement.type === "hidden") { - form[formElement.name] = formElement.value; - } - } - form["email"] = this.config.user; - } else { - this.log.error("No Login Form found"); - this.log.debug(body); - reject(); - return; - } - request.post( - { - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - form: form, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const dom = new JSDOM(body); - const form = {}; - const formLogin = dom.window.document.querySelector("#credentialsForm"); - if (formLogin) { - this.log.debug("parsePasswordForm"); - for (const formElement of dom.window.document.querySelector("#credentialsForm").children) { - if (formElement.type === "hidden") { - form[formElement.name] = formElement.value; - } - } - form["password"] = this.config.password; - } else { - this.log.error("No Login Form found. Please check your E-Mail in the app."); - this.log.debug(body); - reject(); - return; - } - request.post( - { - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - form: form, - jar: this.jar, - followAllRedirects: false - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } + const dom = new JSDOM(body); + const form = {}; + const formLogin = dom.window.document.querySelector("#emailPasswordForm"); + if (formLogin) { + this.log.debug("parseEmailForm"); + for (const formElement of dom.window.document.querySelector("#emailPasswordForm").children) { + if (formElement.type === "hidden") { + form[formElement.name] = formElement.value; + } + } + form["email"] = this.config.user; + } else { + this.log.error("No Login Form found"); + this.log.debug(body); + reject(); + return; + } + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }, + form: form, + jar: this.jar, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to get login identifier"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(body); + reject(); + return; + } + try { + const dom = new JSDOM(body); + const form = {}; + const formLogin = dom.window.document.querySelector("#credentialsForm"); + if (formLogin) { + this.log.debug("parsePasswordForm"); + for (const formElement of dom.window.document.querySelector("#credentialsForm").children) { + if (formElement.type === "hidden") { + form[formElement.name] = formElement.value; + } + } + form["password"] = this.config.password; + } else { + this.log.error("No Login Form found. Please check your E-Mail in the app."); + this.log.debug(body); + reject(); + return; + } + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }, + form: form, + jar: this.jar, + followAllRedirects: false, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to get login authenticate"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(body); + reject(); + return; + } - try { - this.log.debug(JSON.stringify(body)); - this.log.debug(JSON.stringify(resp.headers)); - if (resp.headers.location.split("&").length <= 1) { - this.log.error("No userId found, please check your account"); - return; - } - this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; - let getRequest = request.get( - { - url: resp.headers.location, - headers: { - "User-Agent": + try { + this.log.debug(JSON.stringify(body)); + this.log.debug(JSON.stringify(resp.headers)); + if (resp.headers.location.split("&").length <= 1) { + this.log.error("No userId found, please check your account"); + return; + } + this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; + let getRequest = request.get( + { + url: resp.headers.location, + headers: { + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest - }, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err) { - this.log.debug(err); - this.getTokens(getRequest, code_verifier, reject, resolve); - - } else { - this.log.debug("No Token received visiting url and accept the permissions."); - const dom = new JSDOM(body); - let form = ""; - for (const formElement of dom.window.document.querySelectorAll("input")) { - if (formElement.type === "hidden") { - form += formElement.name + "=" + formElement.value + "&"; - } - } - getRequest = request.post( - { - url: getRequest.uri.href, - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }, + jar: this.jar, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err) { + this.log.debug(err); + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.debug("No Token received visiting url and accept the permissions."); + const dom = new JSDOM(body); + let form = ""; + for (const formElement of dom.window.document.querySelectorAll("input")) { + if (formElement.type === "hidden") { + form += formElement.name + "=" + formElement.value + "&"; + } + } + getRequest = request.post( + { + url: getRequest.uri.href, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", - Accept: + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - referer: getRequest.uri.href - }, - form: form, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err) { - this.getTokens(getRequest, code_verifier, reject, resolve); - } else { - this.log.error("No Token received."); - try { - this.log.debug(body); - } catch (error) { - this.log.error(error); - reject(); - } - } - } - ); - } - } - ); - } catch (error) { - this.log.error("Login was not successful, please check your login credentials and selected type"); - err && this.log.error(err); - this.log.error(error); - this.log.error(error.stack); - reject(); - } - } - ); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + referer: getRequest.uri.href, + }, + form: form, + jar: this.jar, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err) { + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.error("No Token received."); + try { + this.log.debug(body); + } catch (error) { + this.log.error(error); + reject(); + } + } + } + ); + } + } + ); + } catch (error) { + this.log.error("Login was not successful, please check your login credentials and selected type"); + err && this.log.error(err); + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - replaceVarInUrl(url, vin) { - return url - .replace("/$vin/", "/" + vin + "/") - .replace("/$type/", "/" + this.type + "/") - .replace("/$country/", "/" + this.country + "/") - .replace("/$tripType", "/" + this.config.tripType); - } - getTokens(getRequest, code_verifier, reject, resolve) { - let hash = ""; - if (getRequest.uri.hash) { - hash = getRequest.uri.hash; - } else { - hash = getRequest.uri.query; - } - const hashArray = hash.split("&"); - let state; - let jwtauth_code; - let jwtaccess_token; - let jwtid_token; - hashArray.forEach(hash => { - const harray = hash.split("="); - if (harray[0] === "#state" || harray[0] === "state") { - state = harray[1]; - } - if (harray[0] === "code") { - jwtauth_code = harray[1]; - } - if (harray[0] === "access_token") { - jwtaccess_token = harray[1]; - } - if (harray[0] === "id_token") { - jwtid_token = harray[1]; - } - }); - // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); - // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); - // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); - // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); - let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; - if (this.config.type === "vw") { - body += "&code_verifier=" + code_verifier; - } else { - body += "&brand=" + this.config.type; - } - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = + replaceVarInUrl(url, vin) { + return url + .replace("/$vin/", "/" + vin + "/") + .replace("/$type/", "/" + this.type + "/") + .replace("/$country/", "/" + this.country + "/") + .replace("/$tripType", "/" + this.config.tripType); + } + getTokens(getRequest, code_verifier, reject, resolve) { + let hash = ""; + if (getRequest.uri.hash) { + hash = getRequest.uri.hash; + } else { + hash = getRequest.uri.query; + } + const hashArray = hash.split("&"); + let state; + let jwtauth_code; + let jwtaccess_token; + let jwtid_token; + hashArray.forEach((hash) => { + const harray = hash.split("="); + if (harray[0] === "#state" || harray[0] === "state") { + state = harray[1]; + } + if (harray[0] === "code") { + jwtauth_code = harray[1]; + } + if (harray[0] === "access_token") { + jwtaccess_token = harray[1]; + } + if (harray[0] === "id_token") { + jwtid_token = harray[1]; + } + }); + // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); + // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); + // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); + // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); + let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; + if (this.config.type === "vw") { + body += "&code_verifier=" + code_verifier; + } else { + body += "&brand=" + this.config.type; + } + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = "code=" + jwtauth_code + "&client_id=" + this.clientId + "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + code_verifier; - } - request.post( - { - url: url, - headers: { - // "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "content-type": "application/x-www-form-urlencoded", - "x-app-name": this.xappname, - accept: "application/json" - }, - body: body, - jar: this.jar, - followAllRedirects: false - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const tokens = JSON.parse(body); + } + request.post( + { + url: url, + headers: { + // "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "content-type": "application/x-www-form-urlencoded", + "x-app-name": this.xappname, + accept: "application/json", + }, + body: body, + jar: this.jar, + followAllRedirects: false, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to get token"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(body); + reject(); + return; + } + try { + const tokens = JSON.parse(body); - this.getVWToken(tokens, jwtid_token, reject, resolve); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } + this.getVWToken(tokens, jwtid_token, reject, resolve); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } - getVWToken(tokens, jwtid_token, reject, resolve) { - this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; - this.refreshTokenInterval = setInterval(() => { - this.refreshToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours - if (this.config.type === "go") { - resolve(); - return; - } - request.post( - { - url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Client-Id": this.xclientId, - Host: "mbboauth-1d.prd.ece.vwg-connect.com" - }, - form: { - grant_type: "id_token", - token: jwtid_token, - scope: "sc2:fal" - }, - jar: this.jar, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const tokens = JSON.parse(body); - this.config.vwatoken = tokens.access_token; - this.config.vwrtoken = tokens.refresh_token; - this.vwrefreshTokenInterval = setInterval(() => { - this.refreshToken(true).catch(() => {}); - }, 0.9 * 60 * 60 * 1000); //0.9hours - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } + getVWToken(tokens, jwtid_token, reject, resolve) { + this.config.atoken = tokens.access_token; + this.config.rtoken = tokens.refresh_token; + this.refreshTokenInterval = setInterval(() => { + this.refreshToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + if (this.config.type === "go") { + resolve(); + return; + } + request.post( + { + url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Client-Id": this.xclientId, + Host: "mbboauth-1d.prd.ece.vwg-connect.com", + }, + form: { + grant_type: "id_token", + token: jwtid_token, + scope: "sc2:fal", + }, + jar: this.jar, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + const tokens = JSON.parse(body); + this.config.vwatoken = tokens.access_token; + this.config.vwrtoken = tokens.refresh_token; + this.vwrefreshTokenInterval = setInterval(() => { + this.refreshToken(true).catch(() => {}); + }, 0.9 * 60 * 60 * 1000); //0.9hours + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } - refreshToken(isVw) { - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; - let rtoken = this.config.rtoken; - let body = "refresh_token=" + rtoken; - let form = ""; - if (isVw) { - url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; - rtoken = this.config.vwrtoken; - body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; - } else if (this.config.type === "audi") { - url = "https://id.audi.com/v1/token"; - body = ""; - form = { - client_id: this.clientId, - grant_type: "refresh_token", - response_type: "token id_token", - refresh_token: rtoken - }; - } else if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = ""; - form = { - scope: "openid+profile+address+email+phone", - client_id: this.clientId, - grant_type: "refresh_token", - refresh_token: rtoken - }; - } - return new Promise((resolve, reject) => { - this.log.debug("refreshToken"); - request.post( - { - url: url, - headers: { - "user-agent": "okhttp/3.7.0", - "content-type": "application/x-www-form-urlencoded", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - "X-Client-Id": this.xclientId, - accept: "application/json" - }, - body: body, - form: form, - gzip: true, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to refresh token."); - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(body); - const tokens = JSON.parse(body); - if (tokens.error) { - this.log.error(body); - setTimeout(() => { - this.refreshToken(isVw); - }, 5 * 60 * 1000); - reject(); - return; - } - if (isVw) { - this.config.vwatoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.vwrtoken = tokens.refresh_token; - } - } else { - this.config.atoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.rtoken = tokens.refresh_token; - } - } - resolve(); - } catch (error) { - this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); - this.log.error(error); - this.log.error(body); - this.log.error(resp.statusCode); - this.log.error(error.stack); - this.restart(); - reject(); - } - } - ); - }); - } + refreshToken(isVw) { + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; + let rtoken = this.config.rtoken; + let body = "refresh_token=" + rtoken; + let form = ""; + if (isVw) { + url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; + rtoken = this.config.vwrtoken; + body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; + } else if (this.config.type === "audi") { + url = "https://id.audi.com/v1/token"; + body = ""; + form = { + client_id: this.clientId, + grant_type: "refresh_token", + response_type: "token id_token", + refresh_token: rtoken, + }; + } else if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = ""; + form = { + scope: "openid+profile+address+email+phone", + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: rtoken, + }; + } + return new Promise((resolve, reject) => { + this.log.debug("refreshToken"); + request.post( + { + url: url, + headers: { + "user-agent": "okhttp/3.7.0", + "content-type": "application/x-www-form-urlencoded", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + "X-Client-Id": this.xclientId, + accept: "application/json", + }, + body: body, + form: form, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to refresh token."); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(body); + const tokens = JSON.parse(body); + if (tokens.error) { + this.log.error(body); + setTimeout(() => { + this.refreshToken(isVw).catch(() => { + this.log.error("refresh token failed"); + }); + }, 5 * 60 * 1000); + reject(); + return; + } + if (isVw) { + this.config.vwatoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.vwrtoken = tokens.refresh_token; + } + } else { + this.config.atoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.rtoken = tokens.refresh_token; + } + } + resolve(); + } catch (error) { + this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); + this.log.error(error); + this.log.error(body); + this.log.error(resp.statusCode); + this.log.error(error.stack); + this.restart(); + reject(); + } + } + ); + }); + } - getPersonalData() { - return new Promise((resolve, reject) => { - if (this.config.type === "audi" || this.config.type === "go") { - resolve(); - return; - } - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io" - }, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(body); - const data = JSON.parse(body); - this.config.identifier = data.businessIdentifierValue; - Object.keys(data).forEach(key => { - this.setObjectNotExists("personal." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState("personal." + key, data[key], true); - }); + getPersonalData() { + return new Promise((resolve, reject) => { + if (this.config.type === "audi" || this.config.type === "go") { + resolve(); + return; + } + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.atoken, + accept: "application/json", + Host: "customer-profile.apps.emea.vwapps.io", + }, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(body); + const data = JSON.parse(body); + this.config.identifier = data.businessIdentifierValue; + Object.keys(data).forEach((key) => { + this.setObjectNotExists("personal." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState("personal." + key, data[key], true); + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getCarData() { - return new Promise((resolve, reject) => { - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io" - }, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(body); - const data = JSON.parse(body); - Object.keys(data).forEach(key => { - this.setObjectNotExists("car." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState("car." + key, data[key], true); - }); + getCarData() { + return new Promise((resolve, reject) => { + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.atoken, + accept: "application/json", + Host: "customer-profile.apps.emea.vwapps.io", + }, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(body); + const data = JSON.parse(body); + Object.keys(data).forEach((key) => { + this.setObjectNotExists("car." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState("car." + key, data[key], true); + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getVehicles() { - return new Promise((resolve, reject) => { - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); - let headers = { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json" - }; - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; - headers = { - "user-agent": "okhttp/3.9.1", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE", - "dmp-api-version": "v2.0", - "dmp-client-info": "Android/7.0/VW Connect/App/2.9.4", - accept: "application/json;charset=UTF-8" - }; - } - request.get( - { - url: url, - headers: headers, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - } - try { - if (body.errorCode) { - this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - if (this.config.type === "go") { - body.forEach(element => { - const vin = element.vehicle.vin; - this.setObjectNotExists(element.vehicle.vin, { - type: "device", - common: { - name: element.licencePlate, - role: "indicator", - type: "mixed", - write: false, + getVehicles() { + return new Promise((resolve, reject) => { + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); + let headers = { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json", + }; + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + headers = { + "user-agent": "okhttp/3.9.1", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": "Android/7.0/VW Connect/App/2.9.4", + accept: "application/json;charset=UTF-8", + }; + } + request.get( + { + url: url, + headers: headers, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + } + try { + if (body.errorCode) { + this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + if (this.config.type === "go") { + body.forEach((element) => { + const vin = element.vehicle.vin; + this.setObjectNotExists(element.vehicle.vin, { + type: "device", + common: { + name: element.licencePlate, + role: "indicator", + type: "mixed", + write: false, - read: true - }, - native: {} - }); - const adapter = this; + read: true, + }, + native: {}, + }); + const adapter = this; - const result = body.vehicleData; + const result = body.vehicleData; - traverse(element).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); - } - }); - }); - resolve(); - return; - } + traverse(element).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + } + }); + }); + resolve(); + return; + } - const vehicles = body.userVehicles.vehicle; - vehicles.forEach(vehicle => { - this.vinArray.push(vehicle); - this.setObjectNotExists(vehicle, { - type: "device", - common: { - name: vehicle.title, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.batterycharge", { - type: "state", - common: { - name: "Start Battery Charge", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisation", { - type: "state", - common: { - name: "Start Climatisation", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { - type: "state", - common: { - name: "Temperature in °C", - type: "boolean", - role: "number", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.windowheating", { - type: "state", - common: { - name: "Start Windowheating", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.honk", { - type: "state", - common: { - name: "Start Honk", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.flash", { - type: "state", - common: { - name: "Start Flash", - type: "boolean", - role: "button", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.standheizung", { - type: "state", - common: { - name: "Standheizung aktiviert", - type: "boolean", - role: "switch", - write: true - }, - native: {} - }); - this.setObjectNotExists(vehicle + ".remote.lock", { - type: "state", - common: { - name: "Verriegeln (true) / Entriegeln (false)", - type: "boolean", - role: "switch", - write: true - }, - native: {} - }); - }); - resolve(); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - this.log.error("Not able to find vehicle, did you choose the correct type?."); - reject(); - } - } - ); - }); - } + const vehicles = body.userVehicles.vehicle; + vehicles.forEach((vehicle) => { + this.vinArray.push(vehicle); + this.setObjectNotExists(vehicle, { + type: "device", + common: { + name: vehicle.title, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.batterycharge", { + type: "state", + common: { + name: "Start Battery Charge", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.climatisation", { + type: "state", + common: { + name: "Start Climatisation", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { + type: "state", + common: { + name: "Temperature in °C", + type: "boolean", + role: "number", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.windowheating", { + type: "state", + common: { + name: "Start Windowheating", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.honk", { + type: "state", + common: { + name: "Start Honk", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.flash", { + type: "state", + common: { + name: "Start Flash", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.standheizung", { + type: "state", + common: { + name: "Standheizung aktiviert", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.lock", { + type: "state", + common: { + name: "Verriegeln (true) / Entriegeln (false)", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + }); + resolve(); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + this.log.error("Not able to find vehicle, did you choose the correct type?."); + reject(); + } + } + ); + }); + } - getVehicleData(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go") { - resolve(); - return; - } - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw") { - url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); - } - let atoken = this.config.vwatoken; - if (this.config.type === "audi") { - url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; - atoken = this.config.atoken; - } - request.get( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Market": "de_DE", - Authorization: "Bearer " + atoken, - "If-None-Match" : this.etags[url] || "", - Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - const adapter = this; - let result = body.vehicleData; - if (this.config.type === "audi") { - const index = body.vehicles.findIndex(vehicle => vehicle.vin === vin); - result = body.vehicles[index]; - } - if (resp) { - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { - this.log.debug("304 No values updated"); - resolve(); - return; - } - } - traverse(result).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); - } - }); + getVehicleData(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go") { + resolve(); + return; + } + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); + if (this.config.type !== "vw") { + url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); + } + let atoken = this.config.vwatoken; + if (this.config.type === "audi") { + url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; + atoken = this.config.atoken; + } + request.get( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Market": "de_DE", + Authorization: "Bearer " + atoken, + "If-None-Match": this.etags[url] || "", + Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + const adapter = this; + let result = body.vehicleData; + if (this.config.type === "audi") { + const index = body.vehicles.findIndex((vehicle) => vehicle.vin === vin); + result = body.vehicles[index]; + } + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } + traverse(result).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); + } + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getVehicleRights(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go" || !this.config.rights) { - resolve(); - return; - } - let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; - if (this.config.type === "vw") { - url += "/users/" + this.config.identifier; - } - request.get( - { - url: url, - qs: { - scope: "All" - }, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - const adapter = this; - traverse(body.operationList).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - if (modPath[modPath.length - 1] !== "$") { - adapter.setObjectNotExists(vin + ".rights." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); - } - } - }); + getVehicleRights(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go" || !this.config.rights) { + resolve(); + return; + } + let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; + if (this.config.type === "vw") { + url += "/users/" + this.config.identifier; + } + request.get( + { + url: url, + qs: { + scope: "All", + }, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + const adapter = this; + traverse(body.operationList).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + if (modPath[modPath.length - 1] !== "$") { + adapter.setObjectNotExists(vin + ".rights." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); + } + } + }); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - requestStatusUpdate(vin) { - return new Promise((resolve, reject) => { - const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); - request.post( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: - "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } + requestStatusUpdate(vin) { + return new Promise((resolve, reject) => { + const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + request.post( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: + "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } - getVehicleStatus(vin, url, path, element, element2) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); - request.get( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "If-None-Match" : this.etags[url] || "", - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: - "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*" - }, - followAllRedirects: true, - gzip: true, - json: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.debug(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - if (resp) { - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { - this.log.debug("304 No values updated"); - resolve(); - return; - } - } - if (path === "position") { - this.setObjectNotExists(vin + ".position.isMoving", { - type: "state", - common: { - name: "is car moving", - role: "indicator", - type: "boolean", - write: false, - read: true - }, - native: {} - }); + getVehicleStatus(vin, url, path, element, element2) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + request.get( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "If-None-Match": this.etags[url] || "", + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: + "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(body); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } + if (path === "position") { + this.setObjectNotExists(vin + ".position.isMoving", { + type: "state", + common: { + name: "is car moving", + role: "indicator", + type: "boolean", + write: false, + read: true, + }, + native: {}, + }); - if (resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - resolve(); - return; - } else { - this.setState(vin + ".position.isMoving", false, true); - } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } - } + if (resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); + resolve(); + return; + } else { + this.setState(vin + ".position.isMoving", false, true); + } + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + } - if (body === undefined || body === "" || body.error) { - if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { - this.log.error("Error response try to refresh token " + path); - this.log.error(JSON.stringify(body)); - this.refreshToken(true); - } else { - this.log.debug("Not able to get " + path); - } - this.log.debug(body); - reject(); - return; - } + if (body === undefined || body === "" || body.error) { + if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { + this.log.error("Error response try to refresh token " + path); + this.log.error(JSON.stringify(body)); + this.refreshToken(true); + } else { + this.log.debug("Not able to get " + path); + } + this.log.debug(body); + reject(); + return; + } - const adapter = this; + const adapter = this; - let result = body; - if (result === "") { - resolve(); - return; - } - if (result) { - if (element) { - result = result[element]; - } - if (element2) { - result = result[element2]; - } - if (path === "tripdata") { - if (this.config.tripType === "none") { - resolve(); - return; - } - adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { - type: "state", - common: { - name: "numberOfLastTrip", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); - } + let result = body; + if (result === "") { + resolve(); + return; + } + if (result) { + if (element) { + result = result[element]; + } + if (element2) { + result = result[element2]; + } + if (path === "tripdata") { + if (this.config.tripType === "none") { + resolve(); + return; + } + adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { + type: "state", + common: { + name: "numberOfLastTrip", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); + } - traverse(result).forEach(function(value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); + traverse(result).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); - } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); + } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); + modPath.splice(parentIndex + 1, 1); + } + }); - if (this.node.field && this.node.field[this.node.field.length - 1].textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.field[this.node.field.length - 1].textId, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } - if (this.node.textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.textId, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } else if (this.node.timestamp) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.timestamp, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - } - } - }); - resolve(); - } else { - this.log.error("Cannot find vehicle data " + path); - this.log.error(body); - reject(); - } - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - } - ); - }); - } + if (this.node.field && this.node.field[this.node.field.length - 1].textId) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.field[this.node.field.length - 1].textId, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + } + if (this.node.textId) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.textId, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + } else if (this.node.timestamp) { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "state", + common: { + name: this.node.timestamp, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + } + } + }); + resolve(); + } else { + this.log.error("Cannot find vehicle data " + path); + this.log.error(body); + reject(); + } + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + }); + } - setVehicleStatus(vin, url, body, contentType, secToken) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); - this.log.debug(body); - this.log.debug(contentType); - const headers = { - "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - "Content-Type": contentType, - Accept: - "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*" - }; - if (secToken) { - headers["x-mbbSecToken"] = secToken; - } + setVehicleStatus(vin, url, body, contentType, secToken) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + this.log.debug(body); + this.log.debug(contentType); + const headers = { + "User-Agent": "okhttp/3.7.0", + Host: "msg.volkswagen.de", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + "Content-Type": contentType, + Accept: + "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*", + }; + if (secToken) { + headers["x-mbbSecToken"] = secToken; + } - request.post( - { - url: url, - headers: headers, - body: body, - followAllRedirects: true, - gzip: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(body); - if (body.indexOf("") !== -1) { - this.log.error("Error response try to refresh token " + url); - this.log.error(body); - this.refreshToken(true); - reject(); - return; - } - this.log.info(body); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); - reject(); - } - } - ); - }); - } - requestSecToken(vin, service) { - return new Promise((resolve, reject) => { - request.get( - { - url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested", - headers: { - "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - accept: "application/json" - }, - followAllRedirects: true, - json: true, - gzip: true - }, - async (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - if (body.securityPinAuthInfo) { - const secToken = body.securityPinAuthInfo.securityToken; - const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge; - const securPin = await this.generateSecurPin(challenge); - const rBody = { - securityPinAuthentication: { - securityPin: { - challenge: challenge, - securityPinHash: securPin - }, - securityToken: secToken - } - }; - request.post( - { - url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed", - headers: { - "user-agent": "okhttp/3.7.0", - "Content-Type": "application/json", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json" - }, - body: rBody, - gzip: true, - json: true, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to get sec token."); - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(body); - if (body.securityToken) { - resolve(body.securityToken); - } else { - this.log.error("No Security token found"); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - } else { - this.log.error("No Security information found"); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (error) { - this.log.error(error); - reject(); - } - } - ); - }); - } - generateSecurPin(challenge) { - return new Promise((resolve, reject) => { - if (!this.config.pin) { - this.log.error("Please Enter your S-Pin in the Instance Options"); - reject(); - return; - } - const pin = this.toByteArray(this.config.pin); + request.post( + { + url: url, + headers: headers, + body: body, + followAllRedirects: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(body); + if (body.indexOf("") !== -1) { + this.log.error("Error response try to refresh token " + url); + this.log.error(body); + this.refreshToken(true); + reject(); + return; + } + this.log.info(body); + } catch (error) { + this.log.error(error); + this.log.error(error.stack); + reject(); + } + } + ); + }); + } + requestSecToken(vin, service) { + return new Promise((resolve, reject) => { + request.get( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + accept: "application/json", + }, + followAllRedirects: true, + json: true, + gzip: true, + }, + async (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(JSON.stringify(body)); + if (body.securityPinAuthInfo) { + const secToken = body.securityPinAuthInfo.securityToken; + const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge; + const securPin = await this.generateSecurPin(challenge); + const rBody = { + securityPinAuthentication: { + securityPin: { + challenge: challenge, + securityPinHash: securPin, + }, + securityToken: secToken, + }, + }; + request.post( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed", + headers: { + "user-agent": "okhttp/3.7.0", + "Content-Type": "application/json", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json", + }, + body: rBody, + gzip: true, + json: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to get sec token."); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(body); + if (body.securityToken) { + resolve(body.securityToken); + } else { + this.log.error("No Security token found"); + this.log.error(JSON.stringify(body)); + reject(); + } + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + } else { + this.log.error("No Security information found"); + this.log.error(JSON.stringify(body)); + reject(); + } + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } + generateSecurPin(challenge) { + return new Promise((resolve, reject) => { + if (!this.config.pin) { + this.log.error("Please Enter your S-Pin in the Instance Options"); + reject(); + return; + } + const pin = this.toByteArray(this.config.pin); - const byteChallenge = this.toByteArray(challenge); - const webcrypto = new Crypto(); - const concat = new Int8Array(pin.concat(byteChallenge)); - const digest = webcrypto.subtle.digest("SHA-512", concat).then(digest => { - const utf8Array = new Int8Array(digest); - resolve(this.toHexString(utf8Array)); - }); - }); - } - getCodeChallenge() { - let hash = ""; - let result = ""; - while (hash === "" || hash.indexOf("+") !== -1 || hash.indexOf("/") !== -1 || hash.indexOf("=") !== -1 || result.indexOf("+") !== -1 || result.indexOf("/") !== -1) { - const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - result = ""; - for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; - result = Buffer.from(result).toString("base64"); - result = result.replace(/=/g, ""); - hash = crypto - .createHash("sha256") - .update(result) - .digest("base64"); - hash = hash.slice(0, hash.length - 1); - } - return [result, hash]; - } - getNonce() { - const timestamp = Date.now(); - let hash = crypto - .createHash("sha256") - .update(timestamp.toString()) - .digest("base64"); - hash = hash.slice(0, hash.length - 1); - return hash; - } - toHexString(byteArray) { - return Array.prototype.map - .call(byteArray, function(byte) { - return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); - }) - .join(""); - } + const byteChallenge = this.toByteArray(challenge); + const webcrypto = new Crypto(); + const concat = new Int8Array(pin.concat(byteChallenge)); + const digest = webcrypto.subtle.digest("SHA-512", concat).then((digest) => { + const utf8Array = new Int8Array(digest); + resolve(this.toHexString(utf8Array)); + }); + }); + } + getCodeChallenge() { + let hash = ""; + let result = ""; + while (hash === "" || hash.indexOf("+") !== -1 || hash.indexOf("/") !== -1 || hash.indexOf("=") !== -1 || result.indexOf("+") !== -1 || result.indexOf("/") !== -1) { + const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + result = ""; + for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + result = Buffer.from(result).toString("base64"); + result = result.replace(/=/g, ""); + hash = crypto.createHash("sha256").update(result).digest("base64"); + hash = hash.slice(0, hash.length - 1); + } + return [result, hash]; + } + getNonce() { + const timestamp = Date.now(); + let hash = crypto.createHash("sha256").update(timestamp.toString()).digest("base64"); + hash = hash.slice(0, hash.length - 1); + return hash; + } + toHexString(byteArray) { + return Array.prototype.map + .call(byteArray, function (byte) { + return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); + }) + .join(""); + } - toByteArray(hexString) { - const result = []; - for (let i = 0; i < hexString.length; i += 2) { - result.push(parseInt(hexString.substr(i, 2), 16)); - } - return result; - } - /** + toByteArray(hexString) { + const result = []; + for (let i = 0; i < hexString.length; i += 2) { + result.push(parseInt(hexString.substr(i, 2), 16)); + } + return result; + } + /** * Is called when adapter shuts down - callback has to be called under any circumstances! * @param {() => void} callback */ - onUnload(callback) { - try { - this.log.info("cleaned everything up..."); - clearInterval(this.refreshTokenInterval); - clearInterval(this.vwrefreshTokenInterval); - clearInterval(this.updateInterval); - clearInterval(this.fupdateInterval); - callback(); - } catch (e) { - callback(); - } - } + onUnload(callback) { + try { + this.log.info("cleaned everything up..."); + clearInterval(this.refreshTokenInterval); + clearInterval(this.vwrefreshTokenInterval); + clearInterval(this.updateInterval); + clearInterval(this.fupdateInterval); + callback(); + } catch (e) { + callback(); + } + } - /** + /** * Is called if a subscribed state changes * @param {string} id * @param {ioBroker.State | null | undefined} state */ - async onStateChange(id, state) { - if (state) { - if (!state.ack) { - const vin = id.split(".")[2]; - let body = ""; - let contentType = ""; - if (id.indexOf("remote") !== -1) { - const action = id.split(".")[4]; - if (action === "batterycharge") { - body = '\n\n start\n'; - if (state.val === false) { - body = '\n\n stop\n'; - } - contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType); - } + async onStateChange(id, state) { + if (state) { + if (!state.ack) { + const vin = id.split(".")[2]; + let body = ""; + let contentType = ""; + if (id.indexOf("remote") !== -1) { + const action = id.split(".")[4]; + if (action === "batterycharge") { + body = '\n\n start\n'; + if (state.val === false) { + body = '\n\n stop\n'; + } + contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "climatisation") { - body = '\n\n startClimatisation\n'; - if (state.val === false) { - body = '\n\n stopClimatisation\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } + if (action === "climatisation") { + body = '\n\n startClimatisation\n'; + if (state.val === false) { + body = '\n\n stopClimatisation\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "climatisationTemperature") { - let temp = 2950; - if (state.val && !isNaN(state.val)) { - temp = (parseFloat(state.val) + 273, 6) * 10; - } - body = + if (action === "climatisationTemperature") { + let temp = 2950; + if (state.val && !isNaN(state.val)) { + temp = (parseFloat(state.val) + 273, 6) * 10; + } + body = '\n\n setSettings ' + temp + " false electric \n"; - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; - if (state.val === false) { - body = '\n\n stopWindowHeating\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType); - } - if (action === "flash") { - //HONK_AND_FLASH - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); - } + if (action === "windowheating") { + body = '\n\n startWindowHeating\n'; + if (state.val === false) { + body = '\n\n stopWindowHeating\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "flash") { + //HONK_AND_FLASH + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "honk") { - // - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType); - } - if (action === "standheizung") { - body = + if (action === "honk") { + // + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "standheizung") { + body = '\n\n \n true\n \n'; - if (state.val === false) { - body = + if (state.val === false) { + body = '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken); - } - if (action === "lock") { - body = '\n\n lock\n'; - let lockAction = "LOCK"; - if (state.val === false) { - body = '\n\n unlock\n'; - lockAction = "UNLOCK"; - } - contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken); - } - } - } else { - if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - const vin = id.split(".")[2]; - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "lock") { + body = '\n\n lock\n'; + let lockAction = "LOCK"; + if (state.val === false) { + body = '\n\n unlock\n'; + lockAction = "UNLOCK"; + } + contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); + this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + } + } else { + if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { + const vin = id.split(".")[2]; + const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + const longitudeValue = parseFloat(longitude.val); - this.setObjectNotExists(vin + ".position.latitudeConv", { - type: "state", - common: { - name: "latitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); - this.setObjectNotExists(vin + ".position.longitudeConv", { - type: "state", - common: { - name: "longitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - if (!this.config.reversePos) { - return; - } - request.get( - { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", + this.setObjectNotExists(vin + ".position.latitudeConv", { + type: "state", + common: { + name: "latitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); + this.setObjectNotExists(vin + ".position.longitudeConv", { + type: "state", + common: { + name: "longitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); + if (!this.config.reversePos) { + return; + } + request.get( + { + url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", - headers: { - "User-Agent": "ioBroker/vw-connect" - }, - json: true, - followAllRedirects: true - }, - (err, resp, body) => { - if (err || resp.statusCode >= 400 || !body) { - body && this.log.error(body); - resp && this.log.error(resp.statusCode); - err && this.log.error(err); - return; - } - if (body.display_name) { - try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - this.setObjectNotExists(vin + ".position.address.displayName", { - type: "state", - common: { - name: "displayName", - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach(key => { - this.setObjectNotExists(vin + ".position.address." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true - }, - native: {} - }); - this.setState(vin + ".position.address." + key, body.address[key], true); - }); - } catch (error) { - this.log.error(error); - } - } else { - this.log.error(body); - } - } - ); - } - } - } else { - // The state was deleted - // this.log.info(`state ${id} deleted`); - } - } + headers: { + "User-Agent": "ioBroker/vw-connect", + }, + json: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || resp.statusCode >= 400 || !body) { + body && this.log.error(body); + resp && this.log.error(resp.statusCode); + err && this.log.error(err); + return; + } + if (body.display_name) { + try { + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + this.setObjectNotExists(vin + ".position.address.displayName", { + type: "state", + common: { + name: "displayName", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address.displayName", fullAdress, true); + Object.keys(body.address).forEach((key) => { + this.setObjectNotExists(vin + ".position.address." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address." + key, body.address[key], true); + }); + } catch (error) { + this.log.error(error); + } + } else { + this.log.error(body); + } + } + ); + } + } + } else { + // The state was deleted + // this.log.info(`state ${id} deleted`); + } + } } // @ts-ignore parent is a valid property on module if (module.parent) { - // Export the constructor in compact mode - /** + // Export the constructor in compact mode + /** * @param {Partial} [options={}] */ - module.exports = options => new VwWeconnect(options); + module.exports = (options) => new VwWeconnect(options); } else { - // otherwise start the instance directly - new VwWeconnect(); + // otherwise start the instance directly + new VwWeconnect(); } From 2bb1d1c83769d8fe2c469a8a7eeef080fcaabb74 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 9 May 2020 19:55:16 +0200 Subject: [PATCH 055/729] 0.0.12 --- README.md | 4 ++++ io-package.json | 5 ++++- main.js | 49 ++++++++++++++++++++++++++++++------------------- package.json | 4 ++-- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index ea7fe742..e5896eb2 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.12 + +- fix js.controller 3 problems + ### 0.0.11 - fix audi bug with multiple vehicles diff --git a/io-package.json b/io-package.json index 553b6b9a..4d896981 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.11", + "version": "0.0.12", "news": { + "0.0.12": { + "en": "fix js.controller 3 problems" + }, "0.0.11": { "en": "fix audi bug with multiple vehicles, hide status update error if feature is not available" }, diff --git a/main.js b/main.js index 01b8f34c..69e7a98b 100644 --- a/main.js +++ b/main.js @@ -117,7 +117,7 @@ class VwWeconnect extends utils.Adapter { this.redirect = "skodaconnect%3A%2F%2Foidc.login%2F"; this.xrequest = "cz.skodaauto.connect"; this.responseType = "code%20id_token"; - this.xappversion = "3.1.6"; + this.xappversion = "3.2.6"; this.xappname = "cz.skodaauto.connect"; } if (this.config.type === "audi") { @@ -154,8 +154,12 @@ class VwWeconnect extends utils.Adapter { .then(() => { if (this.config.type !== "go") { this.vinArray.forEach((vin) => { - this.getVehicleData(vin); - this.getVehicleRights(vin); + this.getVehicleData(vin).catch(() => { + this.log.error("get vehicle data Failed"); + }); + this.getVehicleRights(vin).catch(() => { + this.log.error("get vehicle rights Failed"); + }); this.requestStatusUpdate(vin) .then(() => { this.statesArray.forEach((state) => { @@ -265,7 +269,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed in first login step "); err && this.log.error(err); resp && this.log.error(resp.statusCode); - body && this.log.error(body); + body && this.log.error(JSON.stringify(body)); reject(); return; } @@ -314,7 +318,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to get login identifier"); err && this.log.error(err); resp && this.log.error(resp.statusCode); - body && this.log.error(body); + body && this.log.error(JSON.stringify(body)); reject(); return; } @@ -356,7 +360,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to get login authenticate"); err && this.log.error(err); resp && this.log.error(resp.statusCode); - body && this.log.error(body); + body && this.log.error(JSON.stringify(body)); reject(); return; } @@ -529,7 +533,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to get token"); err && this.log.error(err); resp && this.log.error(resp.statusCode); - body && this.log.error(body); + body && this.log.error(JSON.stringify(body)); reject(); return; } @@ -654,7 +658,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(body); const tokens = JSON.parse(body); if (tokens.error) { - this.log.error(body); + this.log.error(JSON.stringify(body)); setTimeout(() => { this.refreshToken(isVw).catch(() => { this.log.error("refresh token failed"); @@ -678,7 +682,7 @@ class VwWeconnect extends utils.Adapter { } catch (error) { this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); this.log.error(error); - this.log.error(body); + this.log.error(JSON.stringify(body)); this.log.error(resp.statusCode); this.log.error(error.stack); this.restart(); @@ -1037,7 +1041,7 @@ class VwWeconnect extends utils.Adapter { "X-Market": "de_DE", Authorization: "Bearer " + atoken, "If-None-Match": this.etags[url] || "", - Accept: "application/json, application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", + Accept: "application/json", }, followAllRedirects: true, gzip: true, @@ -1047,6 +1051,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); resp && this.log.error(resp.statusCode); + body && this.log.error(JSON.stringify(body)); reject(); return; } @@ -1242,11 +1247,17 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - body && this.log.error(body); - reject(); - return; + if (resp.statusCode === 403 || resp.statusCode === 502) { + body && this.log.debug(JSON.stringify(body)); + resolve(); + return; + } else { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } } try { this.log.debug(JSON.stringify(body)); @@ -1412,7 +1423,7 @@ class VwWeconnect extends utils.Adapter { resolve(); } else { this.log.error("Cannot find vehicle data " + path); - this.log.error(body); + this.log.error(JSON.stringify(body)); reject(); } } catch (error) { @@ -1464,7 +1475,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(body); if (body.indexOf("") !== -1) { this.log.error("Error response try to refresh token " + url); - this.log.error(body); + this.log.error(JSON.stringify(body)); this.refreshToken(true); reject(); return; @@ -1806,7 +1817,7 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || resp.statusCode >= 400 || !body) { - body && this.log.error(body); + body && this.log.error(JSON.stringify(body)); resp && this.log.error(resp.statusCode); err && this.log.error(err); return; @@ -1846,7 +1857,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); } } else { - this.log.error(body); + this.log.error(JSON.stringify(body)); } } ); diff --git a/package.json b/package.json index 8a120225..5efbf155 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.11" -} + "version": "0.0.12" +} \ No newline at end of file From c5d8ebf8f00f768d366cf97da15c5bce6de99672 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 10 May 2020 12:26:23 +0200 Subject: [PATCH 056/729] add sentry --- io-package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/io-package.json b/io-package.json index 4d896981..e859479e 100644 --- a/io-package.json +++ b/io-package.json @@ -96,6 +96,11 @@ "type": "vehicle", "compact": true, "materialize": true, + "plugins": { + "sentry": { + "dsn": "https://8318f3635f334042a0525ee37a87a587@sentry.iobroker.net/66" + } + }, "dependencies": [ { "js-controller": ">=1.4.2" From 7fed96c71f2ae8f971bb2038a76ab0fd213efef0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 10 May 2020 19:25:44 +0200 Subject: [PATCH 057/729] fix trip date and add debug for reverse pos --- .eslintrc.json | 2 +- README.md | 2 +- io-package.json | 4 ++-- main.js | 10 ++++++++++ package.json | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 50409a9b..09f51540 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,7 @@ "rules": { "indent": [ "error", - "tab", + "space", { "SwitchCase": 1 } diff --git a/README.md b/README.md index e5896eb2..af45dc34 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Door and window states: ## Changelog -### 0.0.12 +### 0.0.13 - fix js.controller 3 problems diff --git a/io-package.json b/io-package.json index e859479e..1bca5e12 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.12", + "version": "0.0.13", "news": { - "0.0.12": { + "0.0.13": { "en": "fix js.controller 3 problems" }, "0.0.11": { diff --git a/main.js b/main.js index 69e7a98b..6ef89022 100644 --- a/main.js +++ b/main.js @@ -1227,6 +1227,12 @@ class VwWeconnect extends utils.Adapter { getVehicleStatus(vin, url, path, element, element2) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); + if (path === "tripdata") { + if (this.config.tripType === "none") { + resolve(); + return; + } + } request.get( { url: url, @@ -1803,8 +1809,10 @@ class VwWeconnect extends utils.Adapter { }); this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); if (!this.config.reversePos) { + this.log.debug("reverse pos deactivated"); return; } + this.log.debug("reverse pos started"); request.get( { url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", @@ -1816,6 +1824,8 @@ class VwWeconnect extends utils.Adapter { followAllRedirects: true, }, (err, resp, body) => { + this.log.debug("reverse pos received"); + this.log.debug(JSON.stringify(body)); if (err || resp.statusCode >= 400 || !body) { body && this.log.error(JSON.stringify(body)); resp && this.log.error(resp.statusCode); diff --git a/package.json b/package.json index 5efbf155..156e6a2c 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.12" + "version": "0.0.13" } \ No newline at end of file From f2e4192bec8e3cdc9473e07e36cc5fd9d5827f8f Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 15 May 2020 23:42:02 +0200 Subject: [PATCH 058/729] fix minor sentry issues --- README.md | 32 ++++++++++++++++---------------- io-package.json | 4 ++-- main.js | 10 +++++++++- package.json | 2 +- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index af45dc34..0aebae3c 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ Use the state under remote control to control your car remotely. Door and window states: -* open: 1 -* locked: 2 -* closed: 3 +- open: 1 +- locked: 2 +- closed: 3 ### List of entries @@ -112,47 +112,47 @@ Door and window states: ## Changelog -### 0.0.13 +### 0.0.14 -- fix js.controller 3 problems +- fix js.controller 3 problems ### 0.0.11 -- fix audi bug with multiple vehicles -- hide status update error if feature is not available +- fix audi bug with multiple vehicles +- hide status update error if feature is not available ### 0.0.9 -- set default trip type to none +- set default trip type to none ### 0.0.7 -- add we connect go and remote standheizung and lock/unlock +- add we connect go and remote standheizung and lock/unlock ### 0.0.6 -- add audi +- add audi ### 0.0.5 -- add honk and flash, fix address format +- add honk and flash, fix address format ### 0.0.4 -- add Skoda support +- add Skoda support ### 0.0.3 -- (ta2k) add more information -- (ta2k) add remote controls +- (ta2k) add more information +- (ta2k) add remote controls ### 0.0.2 -- (ta2k) add car status capturing +- (ta2k) add car status capturing ### 0.0.1 -- (ta2k) initial release +- (ta2k) initial release ## License diff --git a/io-package.json b/io-package.json index 1bca5e12..c6b12d99 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.13", + "version": "0.0.14", "news": { - "0.0.13": { + "0.0.14": { "en": "fix js.controller 3 problems" }, "0.0.11": { diff --git a/main.js b/main.js index 6ef89022..241da189 100644 --- a/main.js +++ b/main.js @@ -1253,7 +1253,7 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - if (resp.statusCode === 403 || resp.statusCode === 502) { + if ((resp && resp.statusCode === 403) || (resp && resp.statusCode === 502)) { body && this.log.debug(JSON.stringify(body)); resolve(); return; @@ -1729,6 +1729,10 @@ class VwWeconnect extends utils.Adapter { const posId = idArray.join("."); const longitude = await this.getStateAsync(posId + ".longitude"); const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { @@ -1745,6 +1749,10 @@ class VwWeconnect extends utils.Adapter { const posId = idArray.join("."); const longitude = await this.getStateAsync(posId + ".longitude"); const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { diff --git a/package.json b/package.json index 156e6a2c..b5225994 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.13" + "version": "0.0.14" } \ No newline at end of file From f2dbbe63f334f0a1534bc30a3c168e39636b5541 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 16 May 2020 00:07:48 +0200 Subject: [PATCH 059/729] add gitignore --- .gitignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..000d0acb --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +.git +.idea +*.code-workspace +node_modules +nbproject + +# npm package files +iobroker.*.tgz + +Thumbs.db + +# i18n intermediate files +admin/i18n/flat.txt +admin/i18n/*/flat.txt \ No newline at end of file From 4f71eee6a9015e0f168dcff16ff740076106af1e Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 16 May 2020 00:09:55 +0200 Subject: [PATCH 060/729] 0.0.15 --- README.md | 32 ++++++++++++++++---------------- io-package.json | 4 ++-- main.js | 4 +++- package.json | 2 +- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 0aebae3c..a1c42cd6 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ Use the state under remote control to control your car remotely. Door and window states: -- open: 1 -- locked: 2 -- closed: 3 +- open: 1 +- locked: 2 +- closed: 3 ### List of entries @@ -112,47 +112,47 @@ Door and window states: ## Changelog -### 0.0.14 +### 0.0.15 -- fix js.controller 3 problems +- fix js.controller 3 problems ### 0.0.11 -- fix audi bug with multiple vehicles -- hide status update error if feature is not available +- fix audi bug with multiple vehicles +- hide status update error if feature is not available ### 0.0.9 -- set default trip type to none +- set default trip type to none ### 0.0.7 -- add we connect go and remote standheizung and lock/unlock +- add we connect go and remote standheizung and lock/unlock ### 0.0.6 -- add audi +- add audi ### 0.0.5 -- add honk and flash, fix address format +- add honk and flash, fix address format ### 0.0.4 -- add Skoda support +- add Skoda support ### 0.0.3 -- (ta2k) add more information -- (ta2k) add remote controls +- (ta2k) add more information +- (ta2k) add remote controls ### 0.0.2 -- (ta2k) add car status capturing +- (ta2k) add car status capturing ### 0.0.1 -- (ta2k) initial release +- (ta2k) initial release ## License diff --git a/io-package.json b/io-package.json index c6b12d99..51a95e76 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.14", + "version": "0.0.15", "news": { - "0.0.14": { + "0.0.15": { "en": "fix js.controller 3 problems" }, "0.0.11": { diff --git a/main.js b/main.js index 241da189..6cc27dbb 100644 --- a/main.js +++ b/main.js @@ -36,6 +36,7 @@ class VwWeconnect extends utils.Adapter { this.vwrefreshTokenInterval = null; this.updateInterval = null; this.fupdateInterval = null; + this.refreshTokenTimeout = null; this.vinArray = []; this.etags = {}; @@ -659,7 +660,7 @@ class VwWeconnect extends utils.Adapter { const tokens = JSON.parse(body); if (tokens.error) { this.log.error(JSON.stringify(body)); - setTimeout(() => { + this.refreshTokenTimeout = setTimeout(() => { this.refreshToken(isVw).catch(() => { this.log.error("refresh token failed"); }); @@ -1654,6 +1655,7 @@ class VwWeconnect extends utils.Adapter { clearInterval(this.vwrefreshTokenInterval); clearInterval(this.updateInterval); clearInterval(this.fupdateInterval); + clearTimeout(this.refreshTokenTimeout); callback(); } catch (e) { callback(); diff --git a/package.json b/package.json index b5225994..ec24af9e 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.14" + "version": "0.0.15" } \ No newline at end of file From d9831c6401e08a7f425de11105cbc8e432609ad8 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 18 May 2020 20:01:39 +0200 Subject: [PATCH 061/729] add missing catch --- README.md | 32 ++++++++++++++++---------------- io-package.json | 4 ++-- main.js | 4 +++- package.json | 2 +- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index a1c42cd6..9c56254d 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ Use the state under remote control to control your car remotely. Door and window states: -- open: 1 -- locked: 2 -- closed: 3 +- open: 1 +- locked: 2 +- closed: 3 ### List of entries @@ -112,47 +112,47 @@ Door and window states: ## Changelog -### 0.0.15 +### 0.0.16 -- fix js.controller 3 problems +- fix js.controller 3 problems ### 0.0.11 -- fix audi bug with multiple vehicles -- hide status update error if feature is not available +- fix audi bug with multiple vehicles +- hide status update error if feature is not available ### 0.0.9 -- set default trip type to none +- set default trip type to none ### 0.0.7 -- add we connect go and remote standheizung and lock/unlock +- add we connect go and remote standheizung and lock/unlock ### 0.0.6 -- add audi +- add audi ### 0.0.5 -- add honk and flash, fix address format +- add honk and flash, fix address format ### 0.0.4 -- add Skoda support +- add Skoda support ### 0.0.3 -- (ta2k) add more information -- (ta2k) add remote controls +- (ta2k) add more information +- (ta2k) add remote controls ### 0.0.2 -- (ta2k) add car status capturing +- (ta2k) add car status capturing ### 0.0.1 -- (ta2k) initial release +- (ta2k) initial release ## License diff --git a/io-package.json b/io-package.json index 51a95e76..075b0fb1 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.15", + "version": "0.0.16", "news": { - "0.0.15": { + "0.0.16": { "en": "fix js.controller 3 problems" }, "0.0.11": { diff --git a/main.js b/main.js index 6cc27dbb..3f08c056 100644 --- a/main.js +++ b/main.js @@ -1305,7 +1305,9 @@ class VwWeconnect extends utils.Adapter { if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { this.log.error("Error response try to refresh token " + path); this.log.error(JSON.stringify(body)); - this.refreshToken(true); + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); } else { this.log.debug("Not able to get " + path); } diff --git a/package.json b/package.json index ec24af9e..38879033 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.15" + "version": "0.0.16" } \ No newline at end of file From 2015722a848273ead3d5505d8d5dd4f82a07417b Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 6 Jun 2020 21:15:37 +0200 Subject: [PATCH 062/729] add new vw models --- main.js | 162 +++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 114 insertions(+), 48 deletions(-) diff --git a/main.js b/main.js index 3f08c056..6ade4278 100644 --- a/main.js +++ b/main.js @@ -38,54 +38,58 @@ class VwWeconnect extends utils.Adapter { this.fupdateInterval = null; this.refreshTokenTimeout = null; + this.homeRegion = "https://msg.volkswagen.de"; + this.vinArray = []; this.etags = {}; this.statesArray = [ { - url: "https://msg.volkswagen.de/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", + url: "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", path: "timer", element: "timer", }, { - url: "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", + url: "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", path: "climater", element: "climater", }, { - url: "https://msg.volkswagen.de/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", + url: "$homeregion/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", path: "position", element: "storedPositionResponse", element2: "position", + element3: "findCarResponse", + element4: "Position", }, { - url: "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", + url: "$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", path: "tripdata", element: "tripDataList", }, { - url: "https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", + url: "$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", path: "status", element: "StoredVehicleDataResponse", element2: "vehicleData", }, { - url: "https://msg.volkswagen.de/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", + url: "$homeregion/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", path: "destinations", element: "destinations", }, { - url: "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", + url: "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", path: "charger", element: "charger", }, { - url: "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", + url: "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", path: "remoteStandheizung", element: "statusResponse", }, { - url: "https://msg.volkswagen.de/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", + url: "$homeregion/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", path: "history", }, ]; @@ -155,22 +159,28 @@ class VwWeconnect extends utils.Adapter { .then(() => { if (this.config.type !== "go") { this.vinArray.forEach((vin) => { - this.getVehicleData(vin).catch(() => { - this.log.error("get vehicle data Failed"); - }); - this.getVehicleRights(vin).catch(() => { - this.log.error("get vehicle rights Failed"); - }); - this.requestStatusUpdate(vin) - .then(() => { - this.statesArray.forEach((state) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - }) + this.getHomeRegion(vin) .catch(() => { - this.log.error("status update Failed"); + this.log.debug("get home region Failed"); + }) + .finally(() => { + this.getVehicleData(vin).catch(() => { + this.log.error("get vehicle data Failed"); + }); + this.getVehicleRights(vin).catch(() => { + this.log.error("get vehicle rights Failed"); + }); + this.requestStatusUpdate(vin) + .then(() => { + this.statesArray.forEach((state) => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + }) + .catch(() => { + this.log.error("status update Failed"); + }); }); }); } @@ -463,6 +473,7 @@ class VwWeconnect extends utils.Adapter { replaceVarInUrl(url, vin) { return url .replace("/$vin/", "/" + vin + "/") + .replace("$homeregion/", this.homeRegion + "/") .replace("/$type/", "/" + this.type + "/") .replace("/$country/", "/" + this.country + "/") .replace("/$tripType", "/" + this.config.tripType); @@ -687,7 +698,6 @@ class VwWeconnect extends utils.Adapter { this.log.error(resp.statusCode); this.log.error(error.stack); this.restart(); - reject(); } } ); @@ -753,7 +763,49 @@ class VwWeconnect extends utils.Adapter { ); }); } - + getHomeRegion(vin) { + return new Promise((resolve, reject) => { + this.log.debug("getHomeRegion"); + request.get( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/" + vin + "/homeRegion", + headers: { + "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + accept: "application/json", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(body); + if (body.homeRegion && body.homeRegion.baseUri && body.homeRegion.baseUri.content) { + this.homeRegion = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); + this.log.debug("Set URL to: " + this.homeRegion); + } + resolve(); + } catch (error) { + this.log.error(error); + reject(); + } + } + ); + }); + } getCarData() { return new Promise((resolve, reject) => { this.log.debug("getData"); @@ -1023,14 +1075,17 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); + let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); if (this.config.type !== "vw") { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); + accept = "application/json"; } let atoken = this.config.vwatoken; if (this.config.type === "audi") { url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; atoken = this.config.atoken; + accept = "application/json"; } request.get( { @@ -1042,7 +1097,7 @@ class VwWeconnect extends utils.Adapter { "X-Market": "de_DE", Authorization: "Bearer " + atoken, "If-None-Match": this.etags[url] || "", - Accept: "application/json", + Accept: accept, }, followAllRedirects: true, gzip: true, @@ -1188,19 +1243,22 @@ class VwWeconnect extends utils.Adapter { requestStatusUpdate(vin) { return new Promise((resolve, reject) => { - const url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + let accept = "application/json"; + if (this.config.type === "vw") { + accept = + "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + } request.post( { url: url, headers: { "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, "Accept-charset": "UTF-8", - Accept: - "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*", + Accept: accept, }, followAllRedirects: true, gzip: true, @@ -1225,7 +1283,7 @@ class VwWeconnect extends utils.Adapter { }); } - getVehicleStatus(vin, url, path, element, element2) { + getVehicleStatus(vin, url, path, element, element2, element3, element4) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); if (path === "tripdata") { @@ -1234,19 +1292,22 @@ class VwWeconnect extends utils.Adapter { return; } } + let accept = "application/json"; + if (this.config.type === "vw") { + accept = + "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + } request.get( { url: url, headers: { "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", "X-App-Version": this.xappversion, "X-App-Name": this.xappname, "If-None-Match": this.etags[url] || "", Authorization: "Bearer " + this.config.vwatoken, "Accept-charset": "UTF-8", - Accept: - "application/json, application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+xml, application/vnd.vwg.mbb.climater_v1_0_0+xml, application/vnd.vwg.mbb.carfinderservice_v1_0_0+xml, application/vnd.volkswagenag.com-error-v1+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml, */*", + Accept: accept, }, followAllRedirects: true, gzip: true, @@ -1254,7 +1315,7 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - if ((resp && resp.statusCode === 403) || (resp && resp.statusCode === 502)) { + if ((resp && resp.statusCode === 403) || (resp && resp.statusCode === 502) || (resp && resp.statusCode === 406) || (resp && resp.statusCode === 500)) { body && this.log.debug(JSON.stringify(body)); resolve(); return; @@ -1324,12 +1385,18 @@ class VwWeconnect extends utils.Adapter { return; } if (result) { - if (element) { + if (element && result[element]) { result = result[element]; } - if (element2) { + if (element2 && result[element2]) { result = result[element2]; } + if (element3 && result[element3]) { + result = result[element3]; + } + if (element4 && result[element4]) { + result = result[element4]; + } if (path === "tripdata") { if (this.config.tripType === "none") { resolve(); @@ -1452,7 +1519,6 @@ class VwWeconnect extends utils.Adapter { this.log.debug(contentType); const headers = { "User-Agent": "okhttp/3.7.0", - Host: "msg.volkswagen.de", "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, @@ -1683,7 +1749,7 @@ class VwWeconnect extends utils.Adapter { body = '\n\n stop\n'; } contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { this.log.error("failed set state"); }); } @@ -1694,7 +1760,7 @@ class VwWeconnect extends utils.Adapter { body = '\n\n stopClimatisation\n'; } contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { this.log.error("failed set state"); }); } @@ -1709,7 +1775,7 @@ class VwWeconnect extends utils.Adapter { temp + " false electric \n"; contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { this.log.error("failed set state"); }); } @@ -1720,7 +1786,7 @@ class VwWeconnect extends utils.Adapter { body = '\n\n stopWindowHeating\n'; } contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { this.log.error("failed set state"); }); } @@ -1739,7 +1805,7 @@ class VwWeconnect extends utils.Adapter { } body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { this.log.error("failed set state"); }); } @@ -1759,7 +1825,7 @@ class VwWeconnect extends utils.Adapter { } body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { this.log.error("failed set state"); }); } @@ -1772,7 +1838,7 @@ class VwWeconnect extends utils.Adapter { } contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { this.log.error("failed set state"); }); } @@ -1785,7 +1851,7 @@ class VwWeconnect extends utils.Adapter { } contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "https://msg.volkswagen.de/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { this.log.error("failed set state"); }); } From 855d836258f4806751907a55d3c6e0f30b82ce56 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 19 Jun 2020 20:38:24 +0200 Subject: [PATCH 063/729] 0.0.17 --- README.md | 4 ++++ io-package.json | 5 ++++- main.js | 6 ++++-- package.json | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9c56254d..43ffc3cd 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.17 + +- add support for 2020 models + ### 0.0.16 - fix js.controller 3 problems diff --git a/io-package.json b/io-package.json index 075b0fb1..705afb1b 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.16", + "version": "0.0.17", "news": { + "0.0.17": { + "en": "support 2020 models" + }, "0.0.16": { "en": "fix js.controller 3 problems" }, diff --git a/main.js b/main.js index 6ade4278..6d216ca5 100644 --- a/main.js +++ b/main.js @@ -794,8 +794,10 @@ class VwWeconnect extends utils.Adapter { } this.log.debug(body); if (body.homeRegion && body.homeRegion.baseUri && body.homeRegion.baseUri.content) { - this.homeRegion = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); - this.log.debug("Set URL to: " + this.homeRegion); + if (body.homeRegion.baseUri.content !== "https://mal-1a.prd.ece.vwg-connect.com/api") { + this.homeRegion = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); + this.log.debug("Set URL to: " + this.homeRegion); + } } resolve(); } catch (error) { diff --git a/package.json b/package.json index 38879033..890d4172 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.16" + "version": "0.0.17" } \ No newline at end of file From ed392edb673ade84a6e26471a9181c01da020b3c Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 21 Jun 2020 12:59:57 +0200 Subject: [PATCH 064/729] fix support for old vw models --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index 6d216ca5..d1967bdf 100644 --- a/main.js +++ b/main.js @@ -1298,6 +1298,9 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "vw") { accept = "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + if (this.homeRegion === "https://msg.volkswagen.de") { + accept += ",application/json"; + } } request.get( { From 488f78f4b8bfbe8df35014ba54b2678fde3d0061 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 24 Jun 2020 13:49:56 +0200 Subject: [PATCH 065/729] add ventilation --- main.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/main.js b/main.js index d1967bdf..99d13fd7 100644 --- a/main.js +++ b/main.js @@ -1058,6 +1058,25 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.ventilation", { + type: "state", + common: { + name: "Start Ventilation", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.ventilationDuration", { + type: "state", + common: { + name: "Dauer Lüftung in min", + role: "number", + write: true, + }, + native: {}, + }); }); resolve(); } catch (error) { @@ -1770,6 +1789,26 @@ class VwWeconnect extends utils.Adapter { }); } + if (action === "ventilation") { + const idArray = id.split("."); + idArray.pop(); + idArray.push("ventilationDuration"); + const ventilationDurationPath = idArray.join("."); + const durationState = await this.getStateAsync(ventilationDurationPath); + let duration = 30; + if (durationState && durationState.val) { + duration = durationState.val; + } + let body = '{ "performAction": { "quickstart": { "climatisationDuration": ' + duration + ', "startMode": "heating", "active": true } } }'; + if (state.val === false) { + body = '{ "performAction": { "quickstop": { "active": false } } }'; + } + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/action", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "climatisationTemperature") { let temp = 2950; if (state.val && !isNaN(state.val)) { From d7e34d6e25361ad1b6e4c80dc8c971bf4ab4f13f Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 24 Jun 2020 20:17:12 +0200 Subject: [PATCH 066/729] add heating --- main.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 99d13fd7..419cf2e4 100644 --- a/main.js +++ b/main.js @@ -1077,6 +1077,25 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.heating", { + type: "state", + common: { + name: "Start Heizung", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.heatingDuration", { + type: "state", + common: { + name: "Dauer Heizung in min", + role: "number", + write: true, + }, + native: {}, + }); }); resolve(); } catch (error) { @@ -1789,17 +1808,17 @@ class VwWeconnect extends utils.Adapter { }); } - if (action === "ventilation") { + if (action === "ventilation" || action === "heating") { const idArray = id.split("."); idArray.pop(); - idArray.push("ventilationDuration"); + idArray.push(action + "Duration"); const ventilationDurationPath = idArray.join("."); const durationState = await this.getStateAsync(ventilationDurationPath); let duration = 30; if (durationState && durationState.val) { duration = durationState.val; } - let body = '{ "performAction": { "quickstart": { "climatisationDuration": ' + duration + ', "startMode": "heating", "active": true } } }'; + let body = '{ "performAction": { "quickstart": { "climatisationDuration": ' + duration + ', "startMode": "' + action + '", "active": true } } }'; if (state.val === false) { body = '{ "performAction": { "quickstop": { "active": false } } }'; } From 98ca98753f8d15e8d35e0b300049fe99f2a8c0df Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 25 Jun 2020 20:09:42 +0200 Subject: [PATCH 067/729] fix ventilation --- main.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 419cf2e4..53cad324 100644 --- a/main.js +++ b/main.js @@ -1808,7 +1808,7 @@ class VwWeconnect extends utils.Adapter { }); } - if (action === "ventilation" || action === "heating") { + if (action === "ventilation") { const idArray = id.split("."); idArray.pop(); idArray.push(action + "Duration"); @@ -1818,12 +1818,19 @@ class VwWeconnect extends utils.Adapter { if (durationState && durationState.val) { duration = durationState.val; } - let body = '{ "performAction": { "quickstart": { "climatisationDuration": ' + duration + ', "startMode": "' + action + '", "active": true } } }'; + let body = + '\n\n \n true\n' + + duration + + "\n " + + action + + "\n"; if (state.val === false) { - body = '{ "performAction": { "quickstop": { "active": false } } }'; + body = + '\n\n \n false\n \n'; } - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/action", body, contentType).catch(() => { + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { this.log.error("failed set state"); }); } From 8369a978c1b1fdd92ba909ef3b3da40307880158 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 26 Jun 2020 23:55:23 +0200 Subject: [PATCH 068/729] adjust vent version --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 53cad324..d5a0405a 100644 --- a/main.js +++ b/main.js @@ -1828,7 +1828,7 @@ class VwWeconnect extends utils.Adapter { body = '\n\n \n false\n \n'; } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { this.log.error("failed set state"); From 7e8b6e833eccd55b22889f76b9419e5b04972355 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 29 Jun 2020 21:28:01 +0200 Subject: [PATCH 069/729] add accept wildcard --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index d5a0405a..47f6de80 100644 --- a/main.js +++ b/main.js @@ -1335,9 +1335,9 @@ class VwWeconnect extends utils.Adapter { let accept = "application/json"; if (this.config.type === "vw") { accept = - "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json, */*"; if (this.homeRegion === "https://msg.volkswagen.de") { - accept += ",application/json"; + accept += ", application/json"; } } request.get( From ceac1e273d4b2b8f053afbb7452e3c3bca9e058c Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 9 Jul 2020 09:10:28 +0200 Subject: [PATCH 070/729] 0.0.18 --- README.md | 4 ++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 43ffc3cd..0dbdd79d 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.18 + +- fix battery status for 2020 models + ### 0.0.17 - add support for 2020 models diff --git a/io-package.json b/io-package.json index 705afb1b..d6e5d480 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.17", + "version": "0.0.18", "news": { + "0.0.18": { + "en": "fix battery status of 2020 models" + }, "0.0.17": { "en": "support 2020 models" }, diff --git a/package.json b/package.json index 890d4172..da345f56 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.17" + "version": "0.0.18" } \ No newline at end of file From a2ffb01c0135f0ed81895ec07760bb97a61d5462 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 18:05:10 +0100 Subject: [PATCH 071/729] erste Anpassung Versionsdaten --- admin/index_m.html | 2 +- io-package.json | 5 ++++- main.js | 2 +- package.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index c5110c91..4e985124 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -104,7 +104,7 @@
- +
diff --git a/io-package.json b/io-package.json index d6e5d480..51c598ef 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.18", + "version": "0.0.19", "news": { + "0.0.19": { + "en": "save status objects in state by id instead of consecutive numbers " + }, "0.0.18": { "en": "fix battery status of 2020 models" }, diff --git a/main.js b/main.js index 47f6de80..0f864012 100644 --- a/main.js +++ b/main.js @@ -1101,7 +1101,7 @@ class VwWeconnect extends utils.Adapter { } catch (error) { this.log.error(error); this.log.error(error.stack); - this.log.error("Not able to find vehicle, did you choose the correct type?."); + this.log.error("Not able to find vehicle, did you choose the correct type?"); reject(); } } diff --git a/package.json b/package.json index da345f56..4852876b 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.18" + "version": "0.0.19" } \ No newline at end of file From 616ba40bbf85fca59e4c5bed84f38c0729d14b34 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 20:57:39 +0100 Subject: [PATCH 072/729] first test of ID recognition --- README.md | 4 ++++ main.js | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/README.md b/README.md index 0dbdd79d..bbd30c61 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.19 + +- save status objects in state by id instead of consecutive numbers + ### 0.0.18 - fix battery status for 2020 models diff --git a/main.js b/main.js index 0f864012..b93ec492 100644 --- a/main.js +++ b/main.js @@ -1459,11 +1459,46 @@ class VwWeconnect extends utils.Adapter { adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); } + if (path === "status") { + this.setObjectNotExists(vin + ".status.isCarLocked", { + type: "state", + common: { + name: "is car locked", + role: "indicator", + type: "boolean", + write: false, + read: true, + }, + native: {}, + }); + } + if (path === "climater") { + this.setObjectNotExists(vin + ".climater.outsideTemperature", { + type: "state", + common: { + name: "outside temperature", + role: "indicator.temperature", + type: "number", + write: false, + read: true, + }, + native: {}, + }); + } + traverse(result).forEach(function (value) { if (this.path.length > 0 && this.isLeaf) { + var mainId = ""; + var subID = ""; const modPath = this.path; this.path.forEach((pathElement, pathIndex) => { if (!isNaN(parseInt(pathElement))) { + if (path === "status") { + if (this.path[pathIndex -1] == 'data' && this.node.id) + mainID = this.node.id; + if (this.path[pathIndex -1] == 'field' && this.node.id) + subID = this.node.id; + } let stringPathIndex = parseInt(pathElement) + 1 + ""; while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; const key = this.path[pathIndex - 1] + stringPathIndex; @@ -1484,6 +1519,10 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainID + "/" subID); + if (mainID == "0x030104FFFF" && subID = "0x0301040001") { + adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); + } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { const modPath = this.path; From 85e5e6141188b31cd53e155bc7d7110ff9ec82a7 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 21:04:04 +0100 Subject: [PATCH 073/729] fix logging --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b93ec492..853c9564 100644 --- a/main.js +++ b/main.js @@ -1519,7 +1519,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainID + "/" subID); + log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainID + "/" + subID); if (mainID == "0x030104FFFF" && subID = "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 0c3d14fbb03ee92584777717ab42a9c81fc60f8d Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 21:05:45 +0100 Subject: [PATCH 074/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 853c9564..07fa1b52 100644 --- a/main.js +++ b/main.js @@ -1520,7 +1520,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainID + "/" + subID); - if (mainID == "0x030104FFFF" && subID = "0x0301040001") { + if (mainID == "0x030104FFFF" && subID == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); From 475d8458abd99d7d52c508c3e2f164b0a198c2a4 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 21:08:14 +0100 Subject: [PATCH 075/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 07fa1b52..1ecf8adb 100644 --- a/main.js +++ b/main.js @@ -1519,7 +1519,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainID + "/" + subID); + this.log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainID + "/" + subID); if (mainID == "0x030104FFFF" && subID == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 11456fe46c87b33a4cfcabe4ea8940b350b02555 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 21:10:32 +0100 Subject: [PATCH 076/729] fix --- main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 1ecf8adb..5c75718e 100644 --- a/main.js +++ b/main.js @@ -1489,15 +1489,15 @@ class VwWeconnect extends utils.Adapter { traverse(result).forEach(function (value) { if (this.path.length > 0 && this.isLeaf) { var mainId = ""; - var subID = ""; + var subId = ""; const modPath = this.path; this.path.forEach((pathElement, pathIndex) => { if (!isNaN(parseInt(pathElement))) { if (path === "status") { if (this.path[pathIndex -1] == 'data' && this.node.id) - mainID = this.node.id; + mainId = this.node.id; if (this.path[pathIndex -1] == 'field' && this.node.id) - subID = this.node.id; + subId = this.node.id; } let stringPathIndex = parseInt(pathElement) + 1 + ""; while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; @@ -1519,8 +1519,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainID + "/" + subID); - if (mainID == "0x030104FFFF" && subID == "0x0301040001") { + this.log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); + if (mainId == "0x030104FFFF" && subId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); From 24e246679527c055625730206925721077441172 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 22:15:45 +0100 Subject: [PATCH 077/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 5c75718e..359801f8 100644 --- a/main.js +++ b/main.js @@ -1519,7 +1519,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.log("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); + this.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); if (mainId == "0x030104FFFF" && subId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 1a71a51a9f140929300290fee5b42dc90e432b8a Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 22:18:14 +0100 Subject: [PATCH 078/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 359801f8..ab101101 100644 --- a/main.js +++ b/main.js @@ -1519,7 +1519,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); + adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); if (mainId == "0x030104FFFF" && subId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From f8b3097e8a2e56812272f462478326767c041bdb Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Nov 2020 22:24:47 +0100 Subject: [PATCH 079/729] fix --- main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index ab101101..3a22f9da 100644 --- a/main.js +++ b/main.js @@ -1479,6 +1479,7 @@ class VwWeconnect extends utils.Adapter { name: "outside temperature", role: "indicator.temperature", type: "number", + unit: "°C", write: false, read: true, }, @@ -1494,9 +1495,9 @@ class VwWeconnect extends utils.Adapter { this.path.forEach((pathElement, pathIndex) => { if (!isNaN(parseInt(pathElement))) { if (path === "status") { - if (this.path[pathIndex -1] == 'data' && this.node.id) + if (this.path[pathIndex -1] == 'data' && this.node && this.node.id) mainId = this.node.id; - if (this.path[pathIndex -1] == 'field' && this.node.id) + if (this.path[pathIndex -1] == 'field' && this.node && this.node.id) subId = this.node.id; } let stringPathIndex = parseInt(pathElement) + 1 + ""; @@ -1519,7 +1520,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); + //adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); if (mainId == "0x030104FFFF" && subId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 7ab2ceedd844c608938673f46093ef365e3bd475 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 17:19:14 +0100 Subject: [PATCH 080/729] save ids outside loop --- main.js | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/main.js b/main.js index 3a22f9da..03535c42 100644 --- a/main.js +++ b/main.js @@ -1487,19 +1487,33 @@ class VwWeconnect extends utils.Adapter { }); } + var dataId = ""; + var dataLevel = 0; + var fieldId = ""; + var fieldLevel = 0; traverse(result).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - var mainId = ""; - var subId = ""; + if (this.path.length > 0 && this.path.length < dataLevel) { + dataId = ""; + dataLevel = 0; + } + if (this.path.length > 0 && this.path.length < fieldLevel) { + fieldId = ""; + fieldLevel = 0; + } + if (path === "status" && this.node === "id") { + if (this.path[this.path.length -2] == 'data') { + dataId = this.node.id; + dataLevel = this.path.length; + } + if (this.path[this.path.length -2] == 'field') { + fieldId = this.node.id; + fieldLevel = this.path.length; + } + } + if (this.path.length > 0 && this.isLeaf) { const modPath = this.path; this.path.forEach((pathElement, pathIndex) => { if (!isNaN(parseInt(pathElement))) { - if (path === "status") { - if (this.path[pathIndex -1] == 'data' && this.node && this.node.id) - mainId = this.node.id; - if (this.path[pathIndex -1] == 'field' && this.node && this.node.id) - subId = this.node.id; - } let stringPathIndex = parseInt(pathElement) + 1 + ""; while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; const key = this.path[pathIndex - 1] + stringPathIndex; @@ -1520,7 +1534,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - //adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); + adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); if (mainId == "0x030104FFFF" && subId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 79e412cac4586be1ea9190ebff9d5fc19e6b3ab4 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 17:22:28 +0100 Subject: [PATCH 081/729] fix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 03535c42..0ad42afc 100644 --- a/main.js +++ b/main.js @@ -1534,8 +1534,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + mainId + "/" + subId); - if (mainId == "0x030104FFFF" && subId == "0x0301040001") { + adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); + if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); From 8b61e5f354d15a8285b02768a676c8ed87891a58 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 17:30:36 +0100 Subject: [PATCH 082/729] fix --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 0ad42afc..b3f0fd1e 100644 --- a/main.js +++ b/main.js @@ -1500,13 +1500,13 @@ class VwWeconnect extends utils.Adapter { fieldId = ""; fieldLevel = 0; } - if (path === "status" && this.node === "id") { + if (path === "status" && this.key === "id") { if (this.path[this.path.length -2] == 'data') { - dataId = this.node.id; + dataId = this.node; dataLevel = this.path.length; } if (this.path[this.path.length -2] == 'field') { - fieldId = this.node.id; + fieldId = this.node; fieldLevel = this.path.length; } } @@ -1534,7 +1534,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - adapter.log.info("value = " + value + "/" + this.node + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); + adapter.log.info("value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 010432333c31dc50af31466e732f1f5ee55309a0 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 17:34:37 +0100 Subject: [PATCH 083/729] fix --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index b3f0fd1e..494c8fba 100644 --- a/main.js +++ b/main.js @@ -1534,7 +1534,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - adapter.log.info("value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); + if (path === "status") + adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 7e58c7d67cb13c593b44e5b9cb2926989c08dea5 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 17:51:46 +0100 Subject: [PATCH 084/729] fix --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 494c8fba..332c22c2 100644 --- a/main.js +++ b/main.js @@ -1501,11 +1501,12 @@ class VwWeconnect extends utils.Adapter { fieldLevel = 0; } if (path === "status" && this.key === "id") { - if (this.path[this.path.length -2] == 'data') { + adapter.log.info("-1 = " + this.path[this.path.length -1] + " -2 = " + this.path[this.path.length -2] + " -3 = " + this.path[this.path.length -3]); + if (this.path[this.path.length -3] == 'data') { dataId = this.node; dataLevel = this.path.length; } - if (this.path[this.path.length -2] == 'field') { + if (this.path[this.path.length -3] == 'field') { fieldId = this.node; fieldLevel = this.path.length; } From dc414684bae1b8a5376ab1710ebac73f0dea8b9f Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 20:08:08 +0100 Subject: [PATCH 085/729] fix --- main.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 332c22c2..2f724ea1 100644 --- a/main.js +++ b/main.js @@ -1492,11 +1492,11 @@ class VwWeconnect extends utils.Adapter { var fieldId = ""; var fieldLevel = 0; traverse(result).forEach(function (value) { - if (this.path.length > 0 && this.path.length < dataLevel) { + if (this.path.length > 0 && this.path.length <= dataLevel) { dataId = ""; dataLevel = 0; } - if (this.path.length > 0 && this.path.length < fieldLevel) { + if (this.path.length > 0 && this.path.length <= fieldLevel) { fieldId = ""; fieldLevel = 0; } @@ -1504,11 +1504,11 @@ class VwWeconnect extends utils.Adapter { adapter.log.info("-1 = " + this.path[this.path.length -1] + " -2 = " + this.path[this.path.length -2] + " -3 = " + this.path[this.path.length -3]); if (this.path[this.path.length -3] == 'data') { dataId = this.node; - dataLevel = this.path.length; + dataLevel = this.path.length -1; } if (this.path[this.path.length -3] == 'field') { fieldId = this.node; - fieldLevel = this.path.length; + fieldLevel = this.path.length -1; } } if (this.path.length > 0 && this.isLeaf) { @@ -1538,6 +1538,7 @@ class VwWeconnect extends utils.Adapter { if (path === "status") adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { + adapter.log.inf('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); From 819ac7960f2179f020d99e01f82898e8c13d7449 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 20:09:42 +0100 Subject: [PATCH 086/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 2f724ea1..82f5e8b5 100644 --- a/main.js +++ b/main.js @@ -1538,7 +1538,7 @@ class VwWeconnect extends utils.Adapter { if (path === "status") adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { - adapter.log.inf('is car locked: ' + value + " yes/no " + (value == 2)); + adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); From fa55242fc768eb4370cf6eb100e8fe17542f1925 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 20:13:37 +0100 Subject: [PATCH 087/729] fix --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 82f5e8b5..b38a0fe4 100644 --- a/main.js +++ b/main.js @@ -1535,9 +1535,9 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - if (path === "status") - adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); - if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { + // if (path === "status") + // adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); + if (dataId == "0x030104FFFF" && fieldId == "0x0301040001" && this.key = "value") { adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From 496cec1b6b70f9b7c03f677432900d68ce945733 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 21:02:10 +0100 Subject: [PATCH 088/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b38a0fe4..1622c1a3 100644 --- a/main.js +++ b/main.js @@ -1537,7 +1537,7 @@ class VwWeconnect extends utils.Adapter { }); // if (path === "status") // adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); - if (dataId == "0x030104FFFF" && fieldId == "0x0301040001" && this.key = "value") { + if (dataId == "0x030104FFFF" && fieldId == "0x0301040001" && this.key == "value") { adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } From fce4595dcca9e1a23988db6bbd711333c76a1aa1 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 21:04:26 +0100 Subject: [PATCH 089/729] fix --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index 1622c1a3..495e985a 100644 --- a/main.js +++ b/main.js @@ -1501,7 +1501,6 @@ class VwWeconnect extends utils.Adapter { fieldLevel = 0; } if (path === "status" && this.key === "id") { - adapter.log.info("-1 = " + this.path[this.path.length -1] + " -2 = " + this.path[this.path.length -2] + " -3 = " + this.path[this.path.length -3]); if (this.path[this.path.length -3] == 'data') { dataId = this.node; dataLevel = this.path.length -1; From 971b88ad795852cf76e8bf2034206eae2f9ea1b9 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 21:28:01 +0100 Subject: [PATCH 090/729] state for temperature --- main.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 495e985a..21645a51 100644 --- a/main.js +++ b/main.js @@ -1471,9 +1471,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - } - if (path === "climater") { - this.setObjectNotExists(vin + ".climater.outsideTemperature", { + this.setObjectNotExists(vin + ".status.outsideTemperature", { type: "state", common: { name: "outside temperature", @@ -1540,6 +1538,11 @@ class VwWeconnect extends utils.Adapter { adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } + if (dataId == "0x030102FFFF" && fieldId == "0x0301020001" && this.key == "value") { + adapter.log.info('outside temp: ' + value); + adapter.setState(vin + "." + path + ".outsideTemperature", value / 10 - 273.15, true); + } + adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { const modPath = this.path; From bed91f0056d6295c3eb8344a65d536ec7a3894c9 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Nov 2020 21:40:07 +0100 Subject: [PATCH 091/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 21645a51..5fb0ebc3 100644 --- a/main.js +++ b/main.js @@ -1540,7 +1540,7 @@ class VwWeconnect extends utils.Adapter { } if (dataId == "0x030102FFFF" && fieldId == "0x0301020001" && this.key == "value") { adapter.log.info('outside temp: ' + value); - adapter.setState(vin + "." + path + ".outsideTemperature", value / 10 - 273.15, true); + adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); From a849a287528b6eccf556e6c0dd66413f68d3e2f5 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:06:53 +0100 Subject: [PATCH 092/729] new method getStatusKeys --- main.js | 55 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 5fb0ebc3..f559da3b 100644 --- a/main.js +++ b/main.js @@ -1440,7 +1440,11 @@ class VwWeconnect extends utils.Adapter { if (element4 && result[element4]) { result = result[element4]; } - if (path === "tripdata") { + var isStatusData = (path === "status"); + var isTripData = (path === "tripdata"); + + if (isTripData) { + // tripType = "shortTerm" or "cyclic" if (this.config.tripType === "none") { resolve(); return; @@ -1459,7 +1463,7 @@ class VwWeconnect extends utils.Adapter { adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); } - if (path === "status") { + if (isStatusData) { this.setObjectNotExists(vin + ".status.isCarLocked", { type: "state", common: { @@ -1485,6 +1489,12 @@ class VwWeconnect extends utils.Adapter { }); } + var statusKeys = null; + if (isStatusData) + statusKeys = getStatusKeys(result); + var tripKeys = null; + if (isTripData) + tripKeys = getTripKeys(result); var dataId = ""; var dataLevel = 0; var fieldId = ""; @@ -1498,7 +1508,7 @@ class VwWeconnect extends utils.Adapter { fieldId = ""; fieldLevel = 0; } - if (path === "status" && this.key === "id") { + if (isStatusData && this.key === "id") { if (this.path[this.path.length -3] == 'data') { dataId = this.node; dataLevel = this.path.length -1; @@ -1532,7 +1542,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - // if (path === "status") + // if (isStatusData) // adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); if (dataId == "0x030104FFFF" && fieldId == "0x0301040001" && this.key == "value") { adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); @@ -1540,11 +1550,11 @@ class VwWeconnect extends utils.Adapter { } if (dataId == "0x030102FFFF" && fieldId == "0x0301020001" && this.key == "value") { adapter.log.info('outside temp: ' + value); - adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10, true); + adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); - } else if ((path === "status" || path === "tripdata") && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + } else if ((isStatusData || isTripData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { const modPath = this.path; this.path.forEach((pathElement, pathIndex) => { if (!isNaN(parseInt(pathElement))) { @@ -1614,6 +1624,39 @@ class VwWeconnect extends utils.Adapter { }); } + getStatusKeys(statusJson) { + result = null; + if (statusJson && statusJson.data) { + if Array.isArray(statusJson.data) { + result = new Array(statusJson.data.length); + statusJson.data.forEach(function(dataValue, dataIndex) { + if (dataValue && dataValue.id) { + result[dataIndex] = {dataId: dataValue.id}; + if (dataValue.field && Array.isArray(dataValue.field)) { + var newList = new Array(dataValue.field.length); + dataValue.field.forEach(function(fieldValue, fieldIndex) { + if (fieldValue && fieldValue.id) { + newList[fieldIndex] = fieldValue.id; + } else { + adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); + } + }); + result[dataIndex]."fieldIds" = newList; + } else { + adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); + } + } else { + adapter.log.warn("status[" + dataIndex + "] has no id"); + } + }); + } else { + adapter.log.warn("status is not an array"); + } + } else { + adapter.log.warn("status data without status field"); + } + } + setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); From 0cd400c684793512858aab2005eb6e96fc1a92f9 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:11:03 +0100 Subject: [PATCH 093/729] bugfix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index f559da3b..08d01807 100644 --- a/main.js +++ b/main.js @@ -1627,7 +1627,7 @@ class VwWeconnect extends utils.Adapter { getStatusKeys(statusJson) { result = null; if (statusJson && statusJson.data) { - if Array.isArray(statusJson.data) { + if (Array.isArray(statusJson.data)) { result = new Array(statusJson.data.length); statusJson.data.forEach(function(dataValue, dataIndex) { if (dataValue && dataValue.id) { From 77006e26166d2087bdf479d2e46bdb480a0a39ed Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:14:53 +0100 Subject: [PATCH 094/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 08d01807..501e7cbf 100644 --- a/main.js +++ b/main.js @@ -1641,7 +1641,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); } }); - result[dataIndex]."fieldIds" = newList; + result[dataIndex].["fieldIds"] = newList; } else { adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); } From 7aa26964d22d0940ba56af329c822b48a24a6d49 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:17:30 +0100 Subject: [PATCH 095/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 501e7cbf..2785b665 100644 --- a/main.js +++ b/main.js @@ -1641,7 +1641,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); } }); - result[dataIndex].["fieldIds"] = newList; + result[dataIndex]["fieldIds"] = newList; } else { adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); } From 5db2914cecc5672494b43b314ef0078242bf1f51 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:25:04 +0100 Subject: [PATCH 096/729] fix --- main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.js b/main.js index 2785b665..69be8eb6 100644 --- a/main.js +++ b/main.js @@ -1655,6 +1655,11 @@ class VwWeconnect extends utils.Adapter { } else { adapter.log.warn("status data without status field"); } + return result; + } + + getTipKeys(tripJson) { + return null; } setVehicleStatus(vin, url, body, contentType, secToken) { From 03feafd5a25f4ebc41f255d59a33e075aebe26b7 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:28:26 +0100 Subject: [PATCH 097/729] fix --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.js b/main.js index 69be8eb6..1a43806b 100644 --- a/main.js +++ b/main.js @@ -1631,7 +1631,6 @@ class VwWeconnect extends utils.Adapter { result = new Array(statusJson.data.length); statusJson.data.forEach(function(dataValue, dataIndex) { if (dataValue && dataValue.id) { - result[dataIndex] = {dataId: dataValue.id}; if (dataValue.field && Array.isArray(dataValue.field)) { var newList = new Array(dataValue.field.length); dataValue.field.forEach(function(fieldValue, fieldIndex) { @@ -1641,7 +1640,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); } }); - result[dataIndex]["fieldIds"] = newList; + result[dataIndex] = {dataId: dataValue.id, fieldIds: newList}; } else { adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); } From d10782f5fdc42f919ba2db934e8a75fcf868f295 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:35:45 +0100 Subject: [PATCH 098/729] fix --- main.js | 80 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/main.js b/main.js index 1a43806b..e91be544 100644 --- a/main.js +++ b/main.js @@ -1323,6 +1323,43 @@ class VwWeconnect extends utils.Adapter { }); } + getStatusKeys(statusJson) { + result = null; + if (statusJson && statusJson.data) { + if (Array.isArray(statusJson.data)) { + result = new Array(statusJson.data.length); + statusJson.data.forEach(function(dataValue, dataIndex) { + if (dataValue && dataValue.id) { + if (dataValue.field && Array.isArray(dataValue.field)) { + var newList = new Array(dataValue.field.length); + dataValue.field.forEach(function(fieldValue, fieldIndex) { + if (fieldValue && fieldValue.id) { + newList[fieldIndex] = fieldValue.id; + } else { + adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); + } + }); + result[dataIndex] = {dataId: dataValue.id, fieldIds: newList}; + } else { + adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); + } + } else { + adapter.log.warn("status[" + dataIndex + "] has no id"); + } + }); + } else { + adapter.log.warn("status is not an array"); + } + } else { + adapter.log.warn("status data without status field"); + } + return result; + } + + getTripKeys(tripJson) { + return null; + } + getVehicleStatus(vin, url, path, element, element2, element3, element4) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); @@ -1490,11 +1527,13 @@ class VwWeconnect extends utils.Adapter { } var statusKeys = null; - if (isStatusData) + if (isStatusData) { statusKeys = getStatusKeys(result); + } var tripKeys = null; - if (isTripData) + if (isTripData) { tripKeys = getTripKeys(result); + } var dataId = ""; var dataLevel = 0; var fieldId = ""; @@ -1624,43 +1663,6 @@ class VwWeconnect extends utils.Adapter { }); } - getStatusKeys(statusJson) { - result = null; - if (statusJson && statusJson.data) { - if (Array.isArray(statusJson.data)) { - result = new Array(statusJson.data.length); - statusJson.data.forEach(function(dataValue, dataIndex) { - if (dataValue && dataValue.id) { - if (dataValue.field && Array.isArray(dataValue.field)) { - var newList = new Array(dataValue.field.length); - dataValue.field.forEach(function(fieldValue, fieldIndex) { - if (fieldValue && fieldValue.id) { - newList[fieldIndex] = fieldValue.id; - } else { - adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); - } - }); - result[dataIndex] = {dataId: dataValue.id, fieldIds: newList}; - } else { - adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); - } - } else { - adapter.log.warn("status[" + dataIndex + "] has no id"); - } - }); - } else { - adapter.log.warn("status is not an array"); - } - } else { - adapter.log.warn("status data without status field"); - } - return result; - } - - getTipKeys(tripJson) { - return null; - } - setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); From 08bce34b16e37492d05f86895f7d9e97f217b63e Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:40:04 +0100 Subject: [PATCH 099/729] fix --- main.js | 78 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/main.js b/main.js index e91be544..3f1c733a 100644 --- a/main.js +++ b/main.js @@ -1323,43 +1323,6 @@ class VwWeconnect extends utils.Adapter { }); } - getStatusKeys(statusJson) { - result = null; - if (statusJson && statusJson.data) { - if (Array.isArray(statusJson.data)) { - result = new Array(statusJson.data.length); - statusJson.data.forEach(function(dataValue, dataIndex) { - if (dataValue && dataValue.id) { - if (dataValue.field && Array.isArray(dataValue.field)) { - var newList = new Array(dataValue.field.length); - dataValue.field.forEach(function(fieldValue, fieldIndex) { - if (fieldValue && fieldValue.id) { - newList[fieldIndex] = fieldValue.id; - } else { - adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); - } - }); - result[dataIndex] = {dataId: dataValue.id, fieldIds: newList}; - } else { - adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); - } - } else { - adapter.log.warn("status[" + dataIndex + "] has no id"); - } - }); - } else { - adapter.log.warn("status is not an array"); - } - } else { - adapter.log.warn("status data without status field"); - } - return result; - } - - getTripKeys(tripJson) { - return null; - } - getVehicleStatus(vin, url, path, element, element2, element3, element4) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); @@ -1528,11 +1491,11 @@ class VwWeconnect extends utils.Adapter { var statusKeys = null; if (isStatusData) { - statusKeys = getStatusKeys(result); + statusKeys = this.getStatusKeys(result); } var tripKeys = null; if (isTripData) { - tripKeys = getTripKeys(result); + tripKeys = this.getTripKeys(result); } var dataId = ""; var dataLevel = 0; @@ -1663,6 +1626,43 @@ class VwWeconnect extends utils.Adapter { }); } + getStatusKeys(statusJson) { + result = null; + if (statusJson && statusJson.data) { + if (Array.isArray(statusJson.data)) { + result = new Array(statusJson.data.length); + statusJson.data.forEach(function(dataValue, dataIndex) { + if (dataValue && dataValue.id) { + if (dataValue.field && Array.isArray(dataValue.field)) { + var newList = new Array(dataValue.field.length); + dataValue.field.forEach(function(fieldValue, fieldIndex) { + if (fieldValue && fieldValue.id) { + newList[fieldIndex] = fieldValue.id; + } else { + adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); + } + }); + result[dataIndex] = {dataId: dataValue.id, fieldIds: newList}; + } else { + adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); + } + } else { + adapter.log.warn("status[" + dataIndex + "] has no id"); + } + }); + } else { + adapter.log.warn("status is not an array"); + } + } else { + adapter.log.warn("status data without status field"); + } + return result; + } + + getTripKeys(tripJson) { + return null; + } + setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); From 51f284632c2e2d996104840d5ea8782d724427f2 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:46:12 +0100 Subject: [PATCH 100/729] fix --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 3f1c733a..d30e99b5 100644 --- a/main.js +++ b/main.js @@ -1627,7 +1627,7 @@ class VwWeconnect extends utils.Adapter { } getStatusKeys(statusJson) { - result = null; + var result = null; if (statusJson && statusJson.data) { if (Array.isArray(statusJson.data)) { result = new Array(statusJson.data.length); @@ -1640,22 +1640,28 @@ class VwWeconnect extends utils.Adapter { newList[fieldIndex] = fieldValue.id; } else { adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); + adapter.log.debug(JSON.stringify(fieldValue)); } }); result[dataIndex] = {dataId: dataValue.id, fieldIds: newList}; } else { adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); + adapter.log.debug(JSON.stringify(dataValue)); } } else { adapter.log.warn("status[" + dataIndex + "] has no id"); + adapter.log.debug(JSON.stringify(dataValue)); } }); } else { adapter.log.warn("status is not an array"); + adapter.log.debug(JSON.stringify(statusJson.data)); } } else { adapter.log.warn("status data without status field"); + adapter.log.debug(JSON.stringify(statusJson)); } + adapter.log.info(JSON.stringify(result)); return result; } From 6ae95424cac2951b386831e832e1405caf5d9a19 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 18:49:27 +0100 Subject: [PATCH 101/729] fix --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index d30e99b5..4d5db7e0 100644 --- a/main.js +++ b/main.js @@ -1627,6 +1627,7 @@ class VwWeconnect extends utils.Adapter { } getStatusKeys(statusJson) { + const adapter = this; var result = null; if (statusJson && statusJson.data) { if (Array.isArray(statusJson.data)) { From 2d2792a6f78bcc6d591f7ad35e967648388f0353 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 19:28:16 +0100 Subject: [PATCH 102/729] implent getTripKeys --- main.js | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 4d5db7e0..d6504e5a 100644 --- a/main.js +++ b/main.js @@ -1662,12 +1662,82 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("status data without status field"); adapter.log.debug(JSON.stringify(statusJson)); } - adapter.log.info(JSON.stringify(result)); + adapter.log.debug(JSON.stringify(result)); return result; } getTripKeys(tripJson) { - return null; + const adapter = this; + const maxCount = 10; // this.config.maxTrips; + var result = null; + if (tripJson && tripJson.tripData) { + if (Array.isArray(statusJson.tripData)) { + var bestShort = []; + var bestCycle = []; + // select and sort newest tripData + tripJson.tripData.forEach(function(tripValue, tripIndex) { + if (tripValue && tripValue.tripType && tripValue.tripID) { + if (tripValue.tripType === "shortTerm") { + var found = false; + bestShort.forEach(function(value, index) { + if ((! found) && tripValue.tripID > value) { + bestShort.splice(index, 0, tripValue.tripID); + found = true; + } + }); + if ((! found) && (maxCount == 0 || bestShort.length < maxCount)) { + bestShort.push(tripValue.tripID); + } else if (maxCount > 0 && bestSort.length > maxCount) { + bestShort.pop(); + } + } else if (tripValue.tripType === "cyclic") { + var found = false; + bestCycle.forEach(function(value, index) { + if ((! found) && tripValue.tripID > value) { + bestCycle.splice(index, 0, tripValue.tripID); + found = true; + } + }); + if ((! found) && (maxCount == 0 || bestCycle.length < maxCount)) { + bestCycle.push(tripValue.tripID); + } else if (maxCount > 0 && bestCycle.length > maxCount) { + bestCycle.pop(); + } + } else { + adapter.log.warn("unknown tripType: " + tripValue.tripType); + adapter.log.debug(JSON.stringify(tripValue)); + } + } else { + adapter.log.warn("tripData has not tripType and tripID"); + adapter.log.debug(JSON.stringify(tripValue)); + } + }); + // build keys for tripData + result = new Array(tripJson.tripData.length); + tripJson.tripData.forEach(function(tripValue, tripIndex) { + if (tripValue && tripValue.tripType && tripValue.tripID) { + if (tripValue.tripType === "shortTerm") { + result[tripIndex] = bestShort.indexOf(tripValue.tripID); + } else if (tripValue.tripType === "cyclic") { + result[tripIndex] = bestCycle.indexOf(tripValue.tripID); + } else { + result[tripIndex] = null; + } + } else { + result[tripIndex] = null; + } + }); + + } else { + adapter.log.warn("tripData is not an array"); + adapter.log.debug(JSON.stringify(statusJson.tripData)); + } + } else { + adapter.log.warn("tripdata without tripData field"); + adapter.log.debug(JSON.stringify(tripJson)); + } + adapter.log.info(JSON.stringify(result)); + return result; } setVehicleStatus(vin, url, body, contentType, secToken) { From 7bfa117aad8568efdca14d16c2506b7bb8ed7ddf Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 19:32:03 +0100 Subject: [PATCH 103/729] fix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index d6504e5a..fbebc128 100644 --- a/main.js +++ b/main.js @@ -1671,7 +1671,7 @@ class VwWeconnect extends utils.Adapter { const maxCount = 10; // this.config.maxTrips; var result = null; if (tripJson && tripJson.tripData) { - if (Array.isArray(statusJson.tripData)) { + if (Array.isArray(tripJson.tripData)) { var bestShort = []; var bestCycle = []; // select and sort newest tripData @@ -1730,7 +1730,7 @@ class VwWeconnect extends utils.Adapter { } else { adapter.log.warn("tripData is not an array"); - adapter.log.debug(JSON.stringify(statusJson.tripData)); + adapter.log.debug(JSON.stringify(tripJson.tripData)); } } else { adapter.log.warn("tripdata without tripData field"); From 10b9988f325ae3052ffe1fc962bd1a65113128d9 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 19:33:55 +0100 Subject: [PATCH 104/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index fbebc128..2a6e3135 100644 --- a/main.js +++ b/main.js @@ -1687,7 +1687,7 @@ class VwWeconnect extends utils.Adapter { }); if ((! found) && (maxCount == 0 || bestShort.length < maxCount)) { bestShort.push(tripValue.tripID); - } else if (maxCount > 0 && bestSort.length > maxCount) { + } else if (maxCount > 0 && bestShort.length > maxCount) { bestShort.pop(); } } else if (tripValue.tripType === "cyclic") { From e8e6fe610c1d3866733ab5adcafb60f783ddc1b7 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 19:38:06 +0100 Subject: [PATCH 105/729] fix avaoid checksum error --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 2a6e3135..7a69528c 100644 --- a/main.js +++ b/main.js @@ -1736,7 +1736,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("tripdata without tripData field"); adapter.log.debug(JSON.stringify(tripJson)); } - adapter.log.info(JSON.stringify(result)); + adapter.log.info(JSON.stringify(result)) ; return result; } From 92c88f8510f50f5b6606f9875327b4c2a1da9f78 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 19:55:39 +0100 Subject: [PATCH 106/729] fix --- main.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 7a69528c..a49c376f 100644 --- a/main.js +++ b/main.js @@ -1715,16 +1715,23 @@ class VwWeconnect extends utils.Adapter { // build keys for tripData result = new Array(tripJson.tripData.length); tripJson.tripData.forEach(function(tripValue, tripIndex) { + result[tripIndex] = null; if (tripValue && tripValue.tripType && tripValue.tripID) { if (tripValue.tripType === "shortTerm") { - result[tripIndex] = bestShort.indexOf(tripValue.tripID); + var index = bestShort.indexOf(tripValue.tripID); + if (index >= 0) { + result[tripIndex] = index + 1; + while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; + result[tripIndex] = "short" + result[tripIndex]; + } } else if (tripValue.tripType === "cyclic") { - result[tripIndex] = bestCycle.indexOf(tripValue.tripID); - } else { - result[tripIndex] = null; + var index = bestCycle.indexOf(tripValue.tripID); + if (index >= 0) { + result[tripIndex] = index + 1; + while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; + result[tripIndex] = "cycle" + result[tripIndex]; + } } - } else { - result[tripIndex] = null; } }); From ac989cb1bfd00629e6630701d7dd52471420b50c Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Nov 2020 19:59:32 +0100 Subject: [PATCH 107/729] fix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index a49c376f..4e74bdb9 100644 --- a/main.js +++ b/main.js @@ -1720,14 +1720,14 @@ class VwWeconnect extends utils.Adapter { if (tripValue.tripType === "shortTerm") { var index = bestShort.indexOf(tripValue.tripID); if (index >= 0) { - result[tripIndex] = index + 1; + result[tripIndex] = index + 1 + ""; while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; result[tripIndex] = "short" + result[tripIndex]; } } else if (tripValue.tripType === "cyclic") { var index = bestCycle.indexOf(tripValue.tripID); if (index >= 0) { - result[tripIndex] = index + 1; + result[tripIndex] = index + 1 + ""; while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; result[tripIndex] = "cycle" + result[tripIndex]; } From 75f755145858e8984e4a4ce640bd6a8bec21546c Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 17:03:05 +0100 Subject: [PATCH 108/729] fix --- main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 4e74bdb9..ed239ec7 100644 --- a/main.js +++ b/main.js @@ -1690,7 +1690,7 @@ class VwWeconnect extends utils.Adapter { } else if (maxCount > 0 && bestShort.length > maxCount) { bestShort.pop(); } - } else if (tripValue.tripType === "cyclic") { + } else if (tripValue.tripType === "longTerm" || tripValue.tripType === "cyclic") { var found = false; bestCycle.forEach(function(value, index) { if ((! found) && tripValue.tripID > value) { @@ -1712,6 +1712,8 @@ class VwWeconnect extends utils.Adapter { adapter.log.debug(JSON.stringify(tripValue)); } }); + adapter.log.info("bestShort: " + JSON.stringify(bestShort)); + adapter.log.info("bestCycle: " + JSON.stringify(bestCycle)); // build keys for tripData result = new Array(tripJson.tripData.length); tripJson.tripData.forEach(function(tripValue, tripIndex) { @@ -1724,7 +1726,7 @@ class VwWeconnect extends utils.Adapter { while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; result[tripIndex] = "short" + result[tripIndex]; } - } else if (tripValue.tripType === "cyclic") { + } else if (tripValue.tripType === "longTerm" || tripValue.tripType === "cyclic") { var index = bestCycle.indexOf(tripValue.tripID); if (index >= 0) { result[tripIndex] = index + 1 + ""; From 64150559e377eca8bf43e0009d7f89b53bd301a0 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 17:19:38 +0100 Subject: [PATCH 109/729] fix --- main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index ed239ec7..dc564c76 100644 --- a/main.js +++ b/main.js @@ -1547,11 +1547,11 @@ class VwWeconnect extends utils.Adapter { // if (isStatusData) // adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); if (dataId == "0x030104FFFF" && fieldId == "0x0301040001" && this.key == "value") { - adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); + //adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } if (dataId == "0x030102FFFF" && fieldId == "0x0301020001" && this.key == "value") { - adapter.log.info('outside temp: ' + value); + //adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } @@ -1712,8 +1712,8 @@ class VwWeconnect extends utils.Adapter { adapter.log.debug(JSON.stringify(tripValue)); } }); - adapter.log.info("bestShort: " + JSON.stringify(bestShort)); - adapter.log.info("bestCycle: " + JSON.stringify(bestCycle)); + //adapter.log.info("bestShort: " + JSON.stringify(bestShort)); + //adapter.log.info("bestCycle: " + JSON.stringify(bestCycle)); // build keys for tripData result = new Array(tripJson.tripData.length); tripJson.tripData.forEach(function(tripValue, tripIndex) { @@ -1745,7 +1745,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("tripdata without tripData field"); adapter.log.debug(JSON.stringify(tripJson)); } - adapter.log.info(JSON.stringify(result)) ; + adapter.log.debug(JSON.stringify(result)) ; return result; } From 4f20a2d47fa22926dbc2f49020c73fbff3df9944 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 18:25:59 +0100 Subject: [PATCH 110/729] new modification of status keys --- main.js | 81 +++++++++++++++++++++++---------------------------------- 1 file changed, 32 insertions(+), 49 deletions(-) diff --git a/main.js b/main.js index dc564c76..a5a665e5 100644 --- a/main.js +++ b/main.js @@ -1497,42 +1497,38 @@ class VwWeconnect extends utils.Adapter { if (isTripData) { tripKeys = this.getTripKeys(result); } - var dataId = ""; - var dataLevel = 0; - var fieldId = ""; - var fieldLevel = 0; traverse(result).forEach(function (value) { - if (this.path.length > 0 && this.path.length <= dataLevel) { - dataId = ""; - dataLevel = 0; - } - if (this.path.length > 0 && this.path.length <= fieldLevel) { - fieldId = ""; - fieldLevel = 0; - } - if (isStatusData && this.key === "id") { - if (this.path[this.path.length -3] == 'data') { - dataId = this.node; - dataLevel = this.path.length -1; - } - if (this.path[this.path.length -3] == 'field') { - fieldId = this.node; - fieldLevel = this.path.length -1; - } - } + const modPath = this.path; + var dataId = null; + var dataIndex = -1; + var fieldId = null; + this.path.forEach((pathElement, pathIndex) => { + var key; + if (!isNaN(parseInt(pathElement))) { + if (isStatusData && this.path[pathIndex -1] === 'data') { + dataIndex = parseInt(pathElement); + dataId = statusKeys[dataIndex].dataId; + key = dataId; + } else if (isStatusData && this.path[pathIndex -1] === 'field') { + if (dataIndex >= 0) { + fieldId = statusKeys[dataIndex].fieldId[parseInt(pathElement)]; + key = fieldId; + } else { + adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); + key = parseInt(pathElement) + 1 + ""; + } + } else { + key = parseInt(pathElement) + 1 + ""; + while (key.length < 2) key = "0" + key; + } + key = parseInt(pathElement) + 1 + ""; + while (key.length < 2) key = "0" + key; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = this.path[pathIndex - 1] + key; + modPath.splice(parentIndex + 1, 1); + } + }); if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { type: "state", common: { @@ -1547,29 +1543,16 @@ class VwWeconnect extends utils.Adapter { // if (isStatusData) // adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); if (dataId == "0x030104FFFF" && fieldId == "0x0301040001" && this.key == "value") { - //adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); + adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } if (dataId == "0x030102FFFF" && fieldId == "0x0301020001" && this.key == "value") { - //adapter.log.info('outside temp: ' + value); + adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); } else if ((isStatusData || isTripData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - - modPath.splice(parentIndex + 1, 1); - } - }); - if (this.node.field && this.node.field[this.node.field.length - 1].textId) { adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { type: "state", From 1ccaedcf3e5b13127f6af29e485e15dd66379667 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 18:28:20 +0100 Subject: [PATCH 111/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index a5a665e5..14a4f35a 100644 --- a/main.js +++ b/main.js @@ -1511,7 +1511,7 @@ class VwWeconnect extends utils.Adapter { key = dataId; } else if (isStatusData && this.path[pathIndex -1] === 'field') { if (dataIndex >= 0) { - fieldId = statusKeys[dataIndex].fieldId[parseInt(pathElement)]; + fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)]; key = fieldId; } else { adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); From 4ef18a89d3b9b3612454c90099308c459ec3b9db Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 18:37:10 +0100 Subject: [PATCH 112/729] check for units --- main.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/main.js b/main.js index 14a4f35a..ead5c4f9 100644 --- a/main.js +++ b/main.js @@ -1508,11 +1508,11 @@ class VwWeconnect extends utils.Adapter { if (isStatusData && this.path[pathIndex -1] === 'data') { dataIndex = parseInt(pathElement); dataId = statusKeys[dataIndex].dataId; - key = dataId; + key = "_" + dataId; } else if (isStatusData && this.path[pathIndex -1] === 'field') { if (dataIndex >= 0) { fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)]; - key = fieldId; + key = "_" + fieldId; } else { adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); key = parseInt(pathElement) + 1 + ""; @@ -1540,17 +1540,19 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - // if (isStatusData) - // adapter.log.info(this.key + " value = " + value + " of: " + modPath.join(".") + " ID = " + dataId + "/" + fieldId); - if (dataId == "0x030104FFFF" && fieldId == "0x0301040001" && this.key == "value") { - adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); - adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); - } - if (dataId == "0x030102FFFF" && fieldId == "0x0301020001" && this.key == "value") { - adapter.log.info('outside temp: ' + value); - adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + if (isStatusData && this.key = "value") { + if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { + adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); + adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); + } + if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { + adapter.log.info('outside temp: ' + value); + adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + } + if (this.parent && this.parent.unit) { + adapter.log.info('unit for ' + dataId + '/' + fieldId + ' is: ' + this.parent.unit); + } } - adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); } else if ((isStatusData || isTripData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { if (this.node.field && this.node.field[this.node.field.length - 1].textId) { From 184942bc7f4e3e8069f6e051b8d8273dd7149dd5 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 18:40:30 +0100 Subject: [PATCH 113/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index ead5c4f9..13e49471 100644 --- a/main.js +++ b/main.js @@ -1540,7 +1540,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - if (isStatusData && this.key = "value") { + if (isStatusData && this.key == "value") { if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); From 44955e51e1297ddefb5fcd8ff01a89bffbd44a04 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 21:04:38 +0100 Subject: [PATCH 114/729] fix unit recognition --- main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 13e49471..a7d15678 100644 --- a/main.js +++ b/main.js @@ -1549,8 +1549,12 @@ class VwWeconnect extends utils.Adapter { adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } - if (this.parent && this.parent.unit) { - adapter.log.info('unit for ' + dataId + '/' + fieldId + ' is: ' + this.parent.unit); + if (this.path.length > 0) { + const unitPath = this.path; + unitPath[unitPath.length -1] = 'unit'; + if (this.has(unitPath)) { + adapter.log.info('unit for ' + dataId + '/' + fieldId + ' is: ' + this.get(unitPath)); + } } } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); From 40b64adcc3c10c1346855839e0a5f6844520e748 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 21:12:01 +0100 Subject: [PATCH 115/729] fix --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index a7d15678..91748d3c 100644 --- a/main.js +++ b/main.js @@ -1550,9 +1550,9 @@ class VwWeconnect extends utils.Adapter { adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } if (this.path.length > 0) { - const unitPath = this.path; - unitPath[unitPath.length -1] = 'unit'; - if (this.has(unitPath)) { + if (this.parent) + adapter.log.info('parent vorhanden: ' + JSON.stringify(this.parent)); + if (this.parent.unit) { adapter.log.info('unit for ' + dataId + '/' + fieldId + ' is: ' + this.get(unitPath)); } } From ac8328397f0717bd5d96a7f37eb63fc6610db4cc Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 21:16:58 +0100 Subject: [PATCH 116/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 91748d3c..f7960ec5 100644 --- a/main.js +++ b/main.js @@ -1551,7 +1551,7 @@ class VwWeconnect extends utils.Adapter { } if (this.path.length > 0) { if (this.parent) - adapter.log.info('parent vorhanden: ' + JSON.stringify(this.parent)); + adapter.log.info('parent vorhanden. Value = ' + this.parent.value + ' unit: ' + JSON.stringify(this.parent.unit)); if (this.parent.unit) { adapter.log.info('unit for ' + dataId + '/' + fieldId + ' is: ' + this.get(unitPath)); } From 9aaf0757dc654cef74b1f43d31c8c3647acbcc4d Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 21:19:39 +0100 Subject: [PATCH 117/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index f7960ec5..90bf2fd2 100644 --- a/main.js +++ b/main.js @@ -1551,7 +1551,7 @@ class VwWeconnect extends utils.Adapter { } if (this.path.length > 0) { if (this.parent) - adapter.log.info('parent vorhanden. Value = ' + this.parent.value + ' unit: ' + JSON.stringify(this.parent.unit)); + adapter.log.info('parent vorhanden. Value = ' + this.parent.value + ' unit: ' + this.parent.unit); if (this.parent.unit) { adapter.log.info('unit for ' + dataId + '/' + fieldId + ' is: ' + this.get(unitPath)); } From 9818b23446de68bc2aefd6ee4ece27b966fcea08 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Nov 2020 21:35:21 +0100 Subject: [PATCH 118/729] modifiy creation of channels --- main.js | 85 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/main.js b/main.js index 90bf2fd2..c05b03cc 100644 --- a/main.js +++ b/main.js @@ -1549,53 +1549,52 @@ class VwWeconnect extends utils.Adapter { adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } - if (this.path.length > 0) { - if (this.parent) - adapter.log.info('parent vorhanden. Value = ' + this.parent.value + ' unit: ' + this.parent.unit); - if (this.parent.unit) { - adapter.log.info('unit for ' + dataId + '/' + fieldId + ' is: ' + this.get(unitPath)); - } - } } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); } else if ((isStatusData || isTripData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { - if (this.node.field && this.node.field[this.node.field.length - 1].textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.field[this.node.field.length - 1].textId, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - } +// if (this.node.field && this.node.field[this.node.field.length - 1].textId) { +// adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { +// type: "state", +// common: { +// name: this.node.field[this.node.field.length - 1].textId, +// role: "indicator", +// type: "mixed", +// write: false, +// read: true, +// }, +// native: {}, +// }); +// } + var text = null; if (this.node.textId) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.textId, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - } else if (this.node.timestamp) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - type: "state", - common: { - name: this.node.timestamp, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); + text = this.node.textId; + } + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + if (this.node.value && this.node.unit) { + // set unit in value state + } +// } else if (this.node.timestamp) { +// adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { +// type: "state", +// common: { +// name: this.node.timestamp, +// role: "indicator", +// type: "mixed", +// write: false, +// read: true, +// }, +// native: {}, +// }); } } }); From 4e7a2a90009b0a4b8a87f81da1d36ff1933e9358 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 12 Nov 2020 07:40:11 +0100 Subject: [PATCH 119/729] split longTerm and Cycle --- main.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index c05b03cc..ba4a944c 100644 --- a/main.js +++ b/main.js @@ -1661,6 +1661,7 @@ class VwWeconnect extends utils.Adapter { if (tripJson && tripJson.tripData) { if (Array.isArray(tripJson.tripData)) { var bestShort = []; + var bestLong = []; var bestCycle = []; // select and sort newest tripData tripJson.tripData.forEach(function(tripValue, tripIndex) { @@ -1678,7 +1679,20 @@ class VwWeconnect extends utils.Adapter { } else if (maxCount > 0 && bestShort.length > maxCount) { bestShort.pop(); } - } else if (tripValue.tripType === "longTerm" || tripValue.tripType === "cyclic") { + } else if (tripValue.tripType === "longTerm") { + var found = false; + bestLong.forEach(function(value, index) { + if ((! found) && tripValue.tripID > value) { + bestLong.splice(index, 0, tripValue.tripID); + found = true; + } + }); + if ((! found) && (maxCount == 0 || bestLong.length < maxCount)) { + bestLong.push(tripValue.tripID); + } else if (maxCount > 0 && bestLong.length > maxCount) { + bestLong.pop(); + } + } else if (tripValue.tripType === "cyclic") { var found = false; bestCycle.forEach(function(value, index) { if ((! found) && tripValue.tripID > value) { From 9364ca3d706324a3393106d71a8676765a746205 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 12 Nov 2020 10:36:28 +0100 Subject: [PATCH 120/729] fix --- main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index ba4a944c..0e5d628a 100644 --- a/main.js +++ b/main.js @@ -1728,7 +1728,14 @@ class VwWeconnect extends utils.Adapter { while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; result[tripIndex] = "short" + result[tripIndex]; } - } else if (tripValue.tripType === "longTerm" || tripValue.tripType === "cyclic") { + } else if (tripValue.tripType === "longTerm") { + var index = bestLong.indexOf(tripValue.tripID); + if (index >= 0) { + result[tripIndex] = index + 1 + ""; + while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; + result[tripIndex] = "long" + result[tripIndex]; + } + } else if (tripValue.tripType === "cyclic") { var index = bestCycle.indexOf(tripValue.tripID); if (index >= 0) { result[tripIndex] = index + 1 + ""; From 52a978c6ece08734e34db78481abdf577765957c Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 10:32:00 +0100 Subject: [PATCH 121/729] split status and tripdata logic in separate blocks --- main.js | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/main.js b/main.js index 0e5d628a..9b482279 100644 --- a/main.js +++ b/main.js @@ -1444,7 +1444,6 @@ class VwWeconnect extends utils.Adapter { var isTripData = (path === "tripdata"); if (isTripData) { - // tripType = "shortTerm" or "cyclic" if (this.config.tripType === "none") { resolve(); return; @@ -1479,7 +1478,7 @@ class VwWeconnect extends utils.Adapter { type: "state", common: { name: "outside temperature", - role: "indicator.temperature", + role: "value.temperature", type: "number", unit: "°C", write: false, @@ -1583,19 +1582,22 @@ class VwWeconnect extends utils.Adapter { if (this.node.value && this.node.unit) { // set unit in value state } -// } else if (this.node.timestamp) { -// adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { -// type: "state", -// common: { -// name: this.node.timestamp, -// role: "indicator", -// type: "mixed", -// write: false, -// read: true, -// }, -// native: {}, -// }); - } + } else if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + var text = null; + if (this.node.timestamp) { + text = this.node.timestamp; + } + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); } }); resolve(); @@ -1715,6 +1717,7 @@ class VwWeconnect extends utils.Adapter { } }); //adapter.log.info("bestShort: " + JSON.stringify(bestShort)); + //adapter.log.info("bestLong: " + JSON.stringify(bestLong)); //adapter.log.info("bestCycle: " + JSON.stringify(bestCycle)); // build keys for tripData result = new Array(tripJson.tripData.length); From 144b0e8b518f0fa0e592af3bfedcbd7aeba01f1b Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 10:39:35 +0100 Subject: [PATCH 122/729] maintain unit via status crwaler --- main.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index 9b482279..2c463956 100644 --- a/main.js +++ b/main.js @@ -1501,6 +1501,7 @@ class VwWeconnect extends utils.Adapter { var dataId = null; var dataIndex = -1; var fieldId = null; + var fieldUnit = null; this.path.forEach((pathElement, pathIndex) => { var key; if (!isNaN(parseInt(pathElement))) { @@ -1510,8 +1511,11 @@ class VwWeconnect extends utils.Adapter { key = "_" + dataId; } else if (isStatusData && this.path[pathIndex -1] === 'field') { if (dataIndex >= 0) { - fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)]; + fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; key = "_" + fieldId; + if (statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { + fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit + } } else { adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); key = parseInt(pathElement) + 1 + ""; @@ -1550,7 +1554,7 @@ class VwWeconnect extends utils.Adapter { } } adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); - } else if ((isStatusData || isTripData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + } else if ((isStatusData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { // if (this.node.field && this.node.field[this.node.field.length - 1].textId) { // adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { // type: "state", @@ -1579,9 +1583,6 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - if (this.node.value && this.node.unit) { - // set unit in value state - } } else if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { var text = null; if (this.node.timestamp) { @@ -1628,7 +1629,7 @@ class VwWeconnect extends utils.Adapter { var newList = new Array(dataValue.field.length); dataValue.field.forEach(function(fieldValue, fieldIndex) { if (fieldValue && fieldValue.id) { - newList[fieldIndex] = fieldValue.id; + newList[fieldIndex] = {id: fieldValue.id, unit: fieldValue.unit}; } else { adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); adapter.log.debug(JSON.stringify(fieldValue)); @@ -1652,7 +1653,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("status data without status field"); adapter.log.debug(JSON.stringify(statusJson)); } - adapter.log.debug(JSON.stringify(result)); + adapter.log.info(JSON.stringify(result)); return result; } From a50af3d9dd9c2722b337c44ec726fca1ee76cf07 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 10:47:15 +0100 Subject: [PATCH 123/729] unse extendObject instead of setObjectNotExists --- main.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 2c463956..d901428f 100644 --- a/main.js +++ b/main.js @@ -1532,12 +1532,14 @@ class VwWeconnect extends utils.Adapter { } }); if (this.path.length > 0 && this.isLeaf) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + // adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "state", common: { name: this.key, role: "indicator", type: "mixed", + unit: fieldUnit, write: false, read: true, }, @@ -1572,7 +1574,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.textId) { text = this.node.textId; } - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + // adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, @@ -1588,7 +1591,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.timestamp) { text = this.node.timestamp; } - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, @@ -1653,7 +1657,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.warn("status data without status field"); adapter.log.debug(JSON.stringify(statusJson)); } - adapter.log.info(JSON.stringify(result)); + adapter.log.debug(JSON.stringify(result)); return result; } From 041434604a8029cff5a0749119963e4725f6021b Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 10:52:00 +0100 Subject: [PATCH 124/729] add unit only to "value" state --- main.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index d901428f..2f8d651c 100644 --- a/main.js +++ b/main.js @@ -1513,7 +1513,7 @@ class VwWeconnect extends utils.Adapter { if (dataIndex >= 0) { fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; key = "_" + fieldId; - if (statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { + if (this.key = "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit } } else { @@ -1532,8 +1532,8 @@ class VwWeconnect extends utils.Adapter { } }); if (this.path.length > 0 && this.isLeaf) { - // adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "state", common: { name: this.key, @@ -1574,8 +1574,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.textId) { text = this.node.textId; } - // adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, @@ -1591,8 +1591,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.timestamp) { text = this.node.timestamp; } - //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, From e0cd039d7bb9fa4eec6ec9fd63671913e37939bf Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 10:54:50 +0100 Subject: [PATCH 125/729] again setObjectNot Exist -> extendObject --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 2f8d651c..506896ed 100644 --- a/main.js +++ b/main.js @@ -1532,8 +1532,8 @@ class VwWeconnect extends utils.Adapter { } }); if (this.path.length > 0 && this.isLeaf) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "state", common: { name: this.key, @@ -1574,8 +1574,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.textId) { text = this.node.textId; } - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, @@ -1591,8 +1591,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.timestamp) { text = this.node.timestamp; } - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, From 36dfd53ce19b01fdbd1947d8bb7dbda9c50c1a33 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 11:01:31 +0100 Subject: [PATCH 126/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 506896ed..65204bfa 100644 --- a/main.js +++ b/main.js @@ -1513,7 +1513,7 @@ class VwWeconnect extends utils.Adapter { if (dataIndex >= 0) { fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; key = "_" + fieldId; - if (this.key = "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { + if (this.key == "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit } } else { From 157af75c95ab33347871dc3bb98acfa9404846fd Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 11:05:26 +0100 Subject: [PATCH 127/729] test setObjectNotExist/extendObject --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 65204bfa..13ba39fe 100644 --- a/main.js +++ b/main.js @@ -1514,7 +1514,7 @@ class VwWeconnect extends utils.Adapter { fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; key = "_" + fieldId; if (this.key == "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { - fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit + fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit + 'xx'; } } else { adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); @@ -1532,8 +1532,8 @@ class VwWeconnect extends utils.Adapter { } }); if (this.path.length > 0 && this.isLeaf) { - //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "state", common: { name: this.key, From fdbda86f8dd0334760bd285f4fd666925284bfca Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 11:08:49 +0100 Subject: [PATCH 128/729] test part 2 --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 13ba39fe..f4f9f137 100644 --- a/main.js +++ b/main.js @@ -1532,8 +1532,8 @@ class VwWeconnect extends utils.Adapter { } }); if (this.path.length > 0 && this.isLeaf) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "state", common: { name: this.key, From 8b30c6e714746d744783d373b366d4efd1452602 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 11:10:45 +0100 Subject: [PATCH 129/729] end test --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index f4f9f137..e8329cd3 100644 --- a/main.js +++ b/main.js @@ -1514,7 +1514,7 @@ class VwWeconnect extends utils.Adapter { fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; key = "_" + fieldId; if (this.key == "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { - fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit + 'xx'; + fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit; } } else { adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); From 21d1e46c03404da0d9387b2fb775da1b9b0c9a0f Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 12:42:01 +0100 Subject: [PATCH 130/729] back to setObejctNotExits --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index e8329cd3..be6d85fd 100644 --- a/main.js +++ b/main.js @@ -1532,8 +1532,8 @@ class VwWeconnect extends utils.Adapter { } }); if (this.path.length > 0 && this.isLeaf) { - //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "state", common: { name: this.key, @@ -1574,8 +1574,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.textId) { text = this.node.textId; } - //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, @@ -1591,8 +1591,8 @@ class VwWeconnect extends utils.Adapter { if (this.node.timestamp) { text = this.node.timestamp; } - //adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { + //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { type: "channel", common: { name: text, From 59b3d5599138937cf0d9026915faedb3c771cfdc Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 20:17:04 +0100 Subject: [PATCH 131/729] test read states at startup --- main.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index be6d85fd..327e81ab 100644 --- a/main.js +++ b/main.js @@ -31,7 +31,7 @@ class VwWeconnect extends utils.Adapter { this.on("unload", this.onUnload.bind(this)); this.jar = request.jar(); - + this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -93,6 +93,31 @@ class VwWeconnect extends utils.Adapter { path: "history", }, ]; + + this.idArray = []; + // save some state values into internal store + this.getStates('*', function (err, obj) { + if (err) { + this.log.error('error reading states: ' + err); + } else { + if (obj) { + for (var i in obj) { + if (! obj.hasOwnProperty(i) || obj[i] == null) continue; + if (typeof obj[i] == 'object') { + //setStateInternal(i, obj[i].val); + if ((i.indexOf('trip') > 0) || (i.indexOf('.id') > 0)) + this.log.info('state ' + i + ' name = ' + obj[i].name + ' value = ' + obj[i].value); + } else { + this.log.error('unexpected state value: ' + obj[i]); + } + } + } else { + this.log.error("not states found"); + } + } + }); + + } /** From e2e74abbd278ac71844fd32983fe7df960a36240 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 20:22:10 +0100 Subject: [PATCH 132/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 327e81ab..709d1e00 100644 --- a/main.js +++ b/main.js @@ -105,7 +105,7 @@ class VwWeconnect extends utils.Adapter { if (! obj.hasOwnProperty(i) || obj[i] == null) continue; if (typeof obj[i] == 'object') { //setStateInternal(i, obj[i].val); - if ((i.indexOf('trip') > 0) || (i.indexOf('.id') > 0)) + //if ((i.indexOf('trip') > 0) || (i.indexOf('.id') > 0)) this.log.info('state ' + i + ' name = ' + obj[i].name + ' value = ' + obj[i].value); } else { this.log.error('unexpected state value: ' + obj[i]); From 53842193abdcc3d8b830dcfa538408ecc6d9306a Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 20:26:34 +0100 Subject: [PATCH 133/729] fix --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 709d1e00..9ec3c220 100644 --- a/main.js +++ b/main.js @@ -100,7 +100,9 @@ class VwWeconnect extends utils.Adapter { if (err) { this.log.error('error reading states: ' + err); } else { + this.log.info('Jetzt!'); if (obj) { + this.log.info('states: ' + JSON.stringify(obj)); for (var i in obj) { if (! obj.hasOwnProperty(i) || obj[i] == null) continue; if (typeof obj[i] == 'object') { From 28162dba87e6318935bbb51952cf66de17b1e6af Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 20:33:26 +0100 Subject: [PATCH 134/729] fix --- main.js | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/main.js b/main.js index 9ec3c220..7610e239 100644 --- a/main.js +++ b/main.js @@ -95,30 +95,6 @@ class VwWeconnect extends utils.Adapter { ]; this.idArray = []; - // save some state values into internal store - this.getStates('*', function (err, obj) { - if (err) { - this.log.error('error reading states: ' + err); - } else { - this.log.info('Jetzt!'); - if (obj) { - this.log.info('states: ' + JSON.stringify(obj)); - for (var i in obj) { - if (! obj.hasOwnProperty(i) || obj[i] == null) continue; - if (typeof obj[i] == 'object') { - //setStateInternal(i, obj[i].val); - //if ((i.indexOf('trip') > 0) || (i.indexOf('.id') > 0)) - this.log.info('state ' + i + ' name = ' + obj[i].name + ' value = ' + obj[i].value); - } else { - this.log.error('unexpected state value: ' + obj[i]); - } - } - } else { - this.log.error("not states found"); - } - } - }); - } @@ -176,6 +152,29 @@ class VwWeconnect extends utils.Adapter { this.xappversion = ""; this.xappname = ""; } + // save some state values into internal store + this.getStates('*', function (err, obj) { + if (err) { + this.log.error('error reading states: ' + err); + } else { + this.log.info('Jetzt!'); + if (obj) { + this.log.info('states: ' + JSON.stringify(obj)); + for (var i in obj) { + if (! obj.hasOwnProperty(i) || obj[i] == null) continue; + if (typeof obj[i] == 'object') { + //setStateInternal(i, obj[i].val); + if ((i.indexOf('trip') > 0) || (i.indexOf('.id') > 0)) + this.log.info('state ' + i + ' name = ' + obj[i].name + ' value = ' + obj[i].value); + } else { + this.log.error('unexpected state value: ' + obj[i]); + } + } + } else { + this.log.error("not states found"); + } + } + }); this.login() .then(() => { this.log.debug("Login successful"); From 22be8aa509b9e0611f148b3b2cfaa8d221c87b85 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 20:37:09 +0100 Subject: [PATCH 135/729] fix --- main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 7610e239..c3073569 100644 --- a/main.js +++ b/main.js @@ -42,6 +42,7 @@ class VwWeconnect extends utils.Adapter { this.vinArray = []; this.etags = {}; + this.idArray = []; this.statesArray = [ { @@ -93,9 +94,6 @@ class VwWeconnect extends utils.Adapter { path: "history", }, ]; - - this.idArray = []; - } /** @@ -153,6 +151,7 @@ class VwWeconnect extends utils.Adapter { this.xappname = ""; } // save some state values into internal store + this.log.info('vor getStates'); this.getStates('*', function (err, obj) { if (err) { this.log.error('error reading states: ' + err); From 766a50725896ae617ba1cc3be08eb8766147ad26 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 20:41:31 +0100 Subject: [PATCH 136/729] fix --- main.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index c3073569..90836a99 100644 --- a/main.js +++ b/main.js @@ -150,27 +150,28 @@ class VwWeconnect extends utils.Adapter { this.xappversion = ""; this.xappname = ""; } - // save some state values into internal store - this.log.info('vor getStates'); + // save some state values into internal store + const adapter = this; + adapter.log.info('vor getStates'); this.getStates('*', function (err, obj) { if (err) { - this.log.error('error reading states: ' + err); + adapter.log.error('error reading states: ' + err); } else { - this.log.info('Jetzt!'); + adapter.log.info('Jetzt!'); if (obj) { - this.log.info('states: ' + JSON.stringify(obj)); + adapter.log.info('states: ' + JSON.stringify(obj)); for (var i in obj) { if (! obj.hasOwnProperty(i) || obj[i] == null) continue; if (typeof obj[i] == 'object') { //setStateInternal(i, obj[i].val); if ((i.indexOf('trip') > 0) || (i.indexOf('.id') > 0)) - this.log.info('state ' + i + ' name = ' + obj[i].name + ' value = ' + obj[i].value); + adapter.log.info('state ' + i + ' name = ' + obj[i].name + ' value = ' + obj[i].value); } else { - this.log.error('unexpected state value: ' + obj[i]); + adapter.log.error('unexpected state value: ' + obj[i]); } } } else { - this.log.error("not states found"); + adapter.log.error("not states found"); } } }); From 4fd93285aad6b94855d04e81a34870fae91114f4 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 21:33:42 +0100 Subject: [PATCH 137/729] update unit via getObject inplace --- main.js | 113 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 85 insertions(+), 28 deletions(-) diff --git a/main.js b/main.js index 90836a99..3517026a 100644 --- a/main.js +++ b/main.js @@ -42,7 +42,7 @@ class VwWeconnect extends utils.Adapter { this.vinArray = []; this.etags = {}; - this.idArray = []; + this.idValues = {}; this.statesArray = [ { @@ -151,30 +151,25 @@ class VwWeconnect extends utils.Adapter { this.xappname = ""; } // save some state values into internal store - const adapter = this; - adapter.log.info('vor getStates'); - this.getStates('*', function (err, obj) { - if (err) { - adapter.log.error('error reading states: ' + err); - } else { - adapter.log.info('Jetzt!'); - if (obj) { - adapter.log.info('states: ' + JSON.stringify(obj)); - for (var i in obj) { - if (! obj.hasOwnProperty(i) || obj[i] == null) continue; - if (typeof obj[i] == 'object') { - //setStateInternal(i, obj[i].val); - if ((i.indexOf('trip') > 0) || (i.indexOf('.id') > 0)) - adapter.log.info('state ' + i + ' name = ' + obj[i].name + ' value = ' + obj[i].value); - } else { - adapter.log.error('unexpected state value: ' + obj[i]); - } - } - } else { - adapter.log.error("not states found"); - } - } - }); +// const adapter = this; +// this.getObjects('*', function (err, obj) { +// if (err) { +// adapter.log.error('error reading states: ' + err); +// } else { +// if (obj) { +// for (var i in obj) { +// if (! obj.hasOwnProperty(i) || obj[i] == null) continue; +// if (typeof obj[i] == 'object') { +// this.saveObjectValue(i, obj[i]); +// } else { +// adapter.log.error('unexpected object value: ' + obj[i]); +// } +// } +// } else { +// adapter.log.error("not states found"); +// } +// } +// }); this.login() .then(() => { this.log.debug("Login successful"); @@ -1557,9 +1552,9 @@ class VwWeconnect extends utils.Adapter { modPath.splice(parentIndex + 1, 1); } }); + const newPath = vin + "." + path + "." + modPath.join("."); if (this.path.length > 0 && this.isLeaf) { - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(newPath, { type: "state", common: { name: this.key, @@ -1580,8 +1575,9 @@ class VwWeconnect extends utils.Adapter { adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } + updateUnit(newPath, fieldUnit); } - adapter.setState(vin + "." + path + "." + modPath.join("."), value || this.node, true); + adapter.setState(newPath, value || this.node, true); } else if ((isStatusData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { // if (this.node.field && this.node.field[this.node.field.length - 1].textId) { // adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { @@ -1792,6 +1788,67 @@ class VwWeconnect extends utils.Adapter { return result; } +// saveStateInfo(path, state) { +// var pathArray; +// if (typeof path == "string") { +// pathArray = path.split("."); +// } else { +// pathArray = path; +// } +// if (pathArray.length < 5) +// return; +// if (! isNaN(pathArray[1]))) +// return; +// const vin = pathArray[2]; +// var trip; +// var data; +// var field; +// var lastUndefined; +// pathArray.forEach(element => +// lastUndefined = false; +// if (element.startsWith("data_")) +// data = element; +// else if (element.startsWith("field_")) +// field = element; +// else if (element.startWith("short") || element.startsWith("long") || element.startsWith("cycle")) +// trip = element; +// else +// lastUndefined = true; +// ); +// if (pathArray[pathArray.length -1] = "id" && data && field) { +// this.saveIdValue(vin + '.' + data + '.' + field + '.id', state.unit); +// } else if (! lastUndefined) { +// if (data && field) { +// this.saveIdValue(vin + '.' + data + '.' + field, state.name); +// } else if (trip) { +// this.saveIdValue(vin + '.' + trip, state.name); +// } +// } +// +// } +// +// saveIdValue(key, value) { +// this.adapter.log(key + ' value: ' + value); +// this.idValues[key] = value; +// } + updateUnit(pathString, unit) { + this.getObject(pathString, function(err, obj) { + if (err) + this.log.error('Error "' + err + '" reading object ' + pathString); + else { + this.log.info('path: ' + pathString + ' current unit: ' + obj.unit + ' new: ' + unit); + if (obj.unit !== unit) { + this.extendObject(pathString, { + type: "channel", + common: { + unit: unit + } + }); + } + } + }); + } + setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); From 5fcd659abd0e75adaf6b56089ca8d53816adcf28 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 21:35:59 +0100 Subject: [PATCH 138/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 3517026a..b9c6dc3a 100644 --- a/main.js +++ b/main.js @@ -1575,7 +1575,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } - updateUnit(newPath, fieldUnit); + this.updateUnit(newPath, fieldUnit); } adapter.setState(newPath, value || this.node, true); } else if ((isStatusData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { From 041311348752d2432fe0f60768795cbebed131ca Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 22:18:38 +0100 Subject: [PATCH 139/729] fix --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index b9c6dc3a..d271ca5c 100644 --- a/main.js +++ b/main.js @@ -1575,7 +1575,7 @@ class VwWeconnect extends utils.Adapter { adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } - this.updateUnit(newPath, fieldUnit); + adapter.updateUnit(newPath, fieldUnit); } adapter.setState(newPath, value || this.node, true); } else if ((isStatusData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { @@ -1831,6 +1831,7 @@ class VwWeconnect extends utils.Adapter { // this.adapter.log(key + ' value: ' + value); // this.idValues[key] = value; // } + updateUnit(pathString, unit) { this.getObject(pathString, function(err, obj) { if (err) From f0e3bd656b217c7bb91f328e7f272d679d511cae Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 13 Nov 2020 22:21:27 +0100 Subject: [PATCH 140/729] fix --- main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index d271ca5c..a0cb911f 100644 --- a/main.js +++ b/main.js @@ -1833,13 +1833,14 @@ class VwWeconnect extends utils.Adapter { // } updateUnit(pathString, unit) { + const adapter = this; this.getObject(pathString, function(err, obj) { if (err) - this.log.error('Error "' + err + '" reading object ' + pathString); + adapter.log.error('Error "' + err + '" reading object ' + pathString); else { - this.log.info('path: ' + pathString + ' current unit: ' + obj.unit + ' new: ' + unit); + adapter.log.info('path: ' + pathString + ' current unit: ' + obj.unit + ' new: ' + unit); if (obj.unit !== unit) { - this.extendObject(pathString, { + adapter.extendObject(pathString, { type: "channel", common: { unit: unit From 916ced11861ebe09e51eaa5e987a610fb7603622 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 09:45:20 +0100 Subject: [PATCH 141/729] update channel nyme by callback --- main.js | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/main.js b/main.js index a0cb911f..3b5bce45 100644 --- a/main.js +++ b/main.js @@ -1566,6 +1566,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + adapter.setState(newPath, value || this.node, true); if (isStatusData && this.key == "value") { if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); @@ -1577,27 +1578,12 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } - adapter.setState(newPath, value || this.node, true); } else if ((isStatusData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { -// if (this.node.field && this.node.field[this.node.field.length - 1].textId) { -// adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { -// type: "state", -// common: { -// name: this.node.field[this.node.field.length - 1].textId, -// role: "indicator", -// type: "mixed", -// write: false, -// read: true, -// }, -// native: {}, -// }); -// } var text = null; if (this.node.textId) { text = this.node.textId; } - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(newPath, { type: "channel", common: { name: text, @@ -1608,13 +1594,13 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + adapter.updateName(newPath, text); } else if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { var text = null; if (this.node.timestamp) { text = this.node.timestamp; } - adapter.setObjectNotExists(vin + "." + path + "." + modPath.join("."), { - //adapter.extendObject(vin + "." + path + "." + modPath.join("."), { + adapter.setObjectNotExists(newPath, { type: "channel", common: { name: text, @@ -1625,6 +1611,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + adapter.updateName(newPath, text); } }); resolve(); @@ -1836,10 +1823,29 @@ class VwWeconnect extends utils.Adapter { const adapter = this; this.getObject(pathString, function(err, obj) { if (err) - adapter.log.error('Error "' + err + '" reading object ' + pathString); + adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for unit'); + else { + adapter.log.info('path: ' + pathString + ' current unit: ' + obj.common.unit + ' new: ' + unit); + if (obj.common && obj.common.unit !== unit) { + adapter.extendObject(pathString, { + type: "channel", + common: { + unit: unit + } + }); + } + } + }); + } + + updateName(pathString, name) { + const adapter = this; + this.getObject(pathString, function(err, obj) { + if (err) + adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for name'); else { - adapter.log.info('path: ' + pathString + ' current unit: ' + obj.unit + ' new: ' + unit); - if (obj.unit !== unit) { + adapter.log.info('path: ' + pathString + ' current name: ' + obj.common.name + ' new: ' + name); + if (obj.common && obj.common.name !== name) { adapter.extendObject(pathString, { type: "channel", common: { From cc6bdddf859301c7ba99ad4973f34f765dc44933 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 09:51:32 +0100 Subject: [PATCH 142/729] fix --- main.js | 66 --------------------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/main.js b/main.js index 3b5bce45..33a700c4 100644 --- a/main.js +++ b/main.js @@ -42,7 +42,6 @@ class VwWeconnect extends utils.Adapter { this.vinArray = []; this.etags = {}; - this.idValues = {}; this.statesArray = [ { @@ -150,26 +149,6 @@ class VwWeconnect extends utils.Adapter { this.xappversion = ""; this.xappname = ""; } - // save some state values into internal store -// const adapter = this; -// this.getObjects('*', function (err, obj) { -// if (err) { -// adapter.log.error('error reading states: ' + err); -// } else { -// if (obj) { -// for (var i in obj) { -// if (! obj.hasOwnProperty(i) || obj[i] == null) continue; -// if (typeof obj[i] == 'object') { -// this.saveObjectValue(i, obj[i]); -// } else { -// adapter.log.error('unexpected object value: ' + obj[i]); -// } -// } -// } else { -// adapter.log.error("not states found"); -// } -// } -// }); this.login() .then(() => { this.log.debug("Login successful"); @@ -1775,57 +1754,12 @@ class VwWeconnect extends utils.Adapter { return result; } -// saveStateInfo(path, state) { -// var pathArray; -// if (typeof path == "string") { -// pathArray = path.split("."); -// } else { -// pathArray = path; -// } -// if (pathArray.length < 5) -// return; -// if (! isNaN(pathArray[1]))) -// return; -// const vin = pathArray[2]; -// var trip; -// var data; -// var field; -// var lastUndefined; -// pathArray.forEach(element => -// lastUndefined = false; -// if (element.startsWith("data_")) -// data = element; -// else if (element.startsWith("field_")) -// field = element; -// else if (element.startWith("short") || element.startsWith("long") || element.startsWith("cycle")) -// trip = element; -// else -// lastUndefined = true; -// ); -// if (pathArray[pathArray.length -1] = "id" && data && field) { -// this.saveIdValue(vin + '.' + data + '.' + field + '.id', state.unit); -// } else if (! lastUndefined) { -// if (data && field) { -// this.saveIdValue(vin + '.' + data + '.' + field, state.name); -// } else if (trip) { -// this.saveIdValue(vin + '.' + trip, state.name); -// } -// } -// -// } -// -// saveIdValue(key, value) { -// this.adapter.log(key + ' value: ' + value); -// this.idValues[key] = value; -// } - updateUnit(pathString, unit) { const adapter = this; this.getObject(pathString, function(err, obj) { if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for unit'); else { - adapter.log.info('path: ' + pathString + ' current unit: ' + obj.common.unit + ' new: ' + unit); if (obj.common && obj.common.unit !== unit) { adapter.extendObject(pathString, { type: "channel", From 133d6f152b39369b5a7078f8c4bab226469b3094 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 10:02:25 +0100 Subject: [PATCH 143/729] fix --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 33a700c4..04e40207 100644 --- a/main.js +++ b/main.js @@ -1557,7 +1557,7 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } - } else if ((isStatusData) && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + } else if (isStatusData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { var text = null; if (this.node.textId) { text = this.node.textId; @@ -1575,6 +1575,7 @@ class VwWeconnect extends utils.Adapter { }); adapter.updateName(newPath, text); } else if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + adapter.log.info('tripdata checkpath ' + mewPath); var text = null; if (this.node.timestamp) { text = this.node.timestamp; @@ -1590,6 +1591,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + adapter.log.info('call with text: ' + text); adapter.updateName(newPath, text); } }); From 900ecf9598397d0f6d78b6024d20ccf30c9ef5ff Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 10:06:51 +0100 Subject: [PATCH 144/729] fix --- main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 04e40207..f64b27ee 100644 --- a/main.js +++ b/main.js @@ -1494,6 +1494,7 @@ class VwWeconnect extends utils.Adapter { } var tripKeys = null; if (isTripData) { + adapter.log.info("tripdata"); tripKeys = this.getTripKeys(result); } traverse(result).forEach(function (value) { @@ -1574,8 +1575,10 @@ class VwWeconnect extends utils.Adapter { native: {}, }); adapter.updateName(newPath, text); - } else if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { - adapter.log.info('tripdata checkpath ' + mewPath); + } else { + adapter.log.info('isTripdata: ' + isTripData + ' pathlen: ' + this.path.length + ' NaN ' + isNaN(this.path[this.path.length - 1])); + if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + var text = null; if (this.node.timestamp) { text = this.node.timestamp; @@ -1591,9 +1594,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - adapter.log.info('call with text: ' + text); adapter.updateName(newPath, text); - } + }} }); resolve(); } else { From abc836807ba6f15297bfcf6fef665ca3a7424422 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 10:12:07 +0100 Subject: [PATCH 145/729] fix --- main.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index f64b27ee..4be3ef3f 100644 --- a/main.js +++ b/main.js @@ -1494,7 +1494,7 @@ class VwWeconnect extends utils.Adapter { } var tripKeys = null; if (isTripData) { - adapter.log.info("tripdata"); + adapter.log.info("tripdata: " + JSON.stringify(result)); tripKeys = this.getTripKeys(result); } traverse(result).forEach(function (value) { @@ -1575,10 +1575,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); adapter.updateName(newPath, text); - } else { - adapter.log.info('isTripdata: ' + isTripData + ' pathlen: ' + this.path.length + ' NaN ' + isNaN(this.path[this.path.length - 1])); - if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { - + } else if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { var text = null; if (this.node.timestamp) { text = this.node.timestamp; @@ -1595,7 +1592,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); adapter.updateName(newPath, text); - }} + } }); resolve(); } else { From 3954d1115cf137a9fbac523fe5a9fd6b90bf1ff5 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 10:13:52 +0100 Subject: [PATCH 146/729] fix --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index 4be3ef3f..eba06fc4 100644 --- a/main.js +++ b/main.js @@ -1494,7 +1494,6 @@ class VwWeconnect extends utils.Adapter { } var tripKeys = null; if (isTripData) { - adapter.log.info("tripdata: " + JSON.stringify(result)); tripKeys = this.getTripKeys(result); } traverse(result).forEach(function (value) { From 72d51dabe19c82e0ed0b643e6bfdb79484fbba75 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 10:56:00 +0100 Subject: [PATCH 147/729] test --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index eba06fc4..55391b27 100644 --- a/main.js +++ b/main.js @@ -1592,6 +1592,7 @@ class VwWeconnect extends utils.Adapter { }); adapter.updateName(newPath, text); } + if (isTripData) adapter.log.info(this.path.join('..')); }); resolve(); } else { From 57b1e271c46c6c9162702f227d2668b7da11bf56 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 12:23:13 +0100 Subject: [PATCH 148/729] fix --- main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 55391b27..0a9cfffc 100644 --- a/main.js +++ b/main.js @@ -1524,11 +1524,13 @@ class VwWeconnect extends utils.Adapter { key = parseInt(pathElement) + 1 + ""; while (key.length < 2) key = "0" + key; } + adapter.log.info('vorher path = ' + this.path.join('.') + ' modpath: ' + modPath.join('.')); key = parseInt(pathElement) + 1 + ""; while (key.length < 2) key = "0" + key; const parentIndex = modPath.indexOf(pathElement) - 1; modPath[parentIndex] = this.path[pathIndex - 1] + key; modPath.splice(parentIndex + 1, 1); + adapter.log.info('nachher path = ' + this.path.join('.') + ' modpath: ' + modPath.join('.')); } }); const newPath = vin + "." + path + "." + modPath.join("."); @@ -1557,7 +1559,7 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } - } else if (isStatusData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + } else if (isStatusData && (this.path.length > 0) && !isNaN(this.path[this.path.length - 1])) { var text = null; if (this.node.textId) { text = this.node.textId; @@ -1574,7 +1576,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); adapter.updateName(newPath, text); - } else if (isTripData && this.path.length > 0 && !isNaN(this.path[this.path.length - 1])) { + } else if (isTripData && (this.path.length > 0) && !isNaN(this.path[this.path.length - 1])) { var text = null; if (this.node.timestamp) { text = this.node.timestamp; @@ -1592,7 +1594,6 @@ class VwWeconnect extends utils.Adapter { }); adapter.updateName(newPath, text); } - if (isTripData) adapter.log.info(this.path.join('..')); }); resolve(); } else { From 3b46670a39db148cd062e541adfea0dd2e9a55e4 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 12:27:01 +0100 Subject: [PATCH 149/729] fix --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 0a9cfffc..77a49273 100644 --- a/main.js +++ b/main.js @@ -1502,6 +1502,7 @@ class VwWeconnect extends utils.Adapter { var dataIndex = -1; var fieldId = null; var fieldUnit = null; + adapter.log.info('path = ' + path.join('.')); this.path.forEach((pathElement, pathIndex) => { var key; if (!isNaN(parseInt(pathElement))) { From d05d231fb7134c795efdb1768af62291b35153cf Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 12:49:19 +0100 Subject: [PATCH 150/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 77a49273..5c39abbc 100644 --- a/main.js +++ b/main.js @@ -1502,7 +1502,7 @@ class VwWeconnect extends utils.Adapter { var dataIndex = -1; var fieldId = null; var fieldUnit = null; - adapter.log.info('path = ' + path.join('.')); + adapter.log.info('path = ' + this.path.join('.')); this.path.forEach((pathElement, pathIndex) => { var key; if (!isNaN(parseInt(pathElement))) { From d0d05bb2448366a4b8fe9bc6739c610e774f80eb Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 13:02:34 +0100 Subject: [PATCH 151/729] fix --- main.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 5c39abbc..b5770d6f 100644 --- a/main.js +++ b/main.js @@ -1502,10 +1502,13 @@ class VwWeconnect extends utils.Adapter { var dataIndex = -1; var fieldId = null; var fieldUnit = null; - adapter.log.info('path = ' + this.path.join('.')); + var isNumberNode = false; this.path.forEach((pathElement, pathIndex) => { var key; - if (!isNaN(parseInt(pathElement))) { + if (isNaN(parseInt(pathElement))) { + isNumberNode = false; + } else { + isNumbernode = true; if (isStatusData && this.path[pathIndex -1] === 'data') { dataIndex = parseInt(pathElement); dataId = statusKeys[dataIndex].dataId; @@ -1525,13 +1528,11 @@ class VwWeconnect extends utils.Adapter { key = parseInt(pathElement) + 1 + ""; while (key.length < 2) key = "0" + key; } - adapter.log.info('vorher path = ' + this.path.join('.') + ' modpath: ' + modPath.join('.')); key = parseInt(pathElement) + 1 + ""; while (key.length < 2) key = "0" + key; const parentIndex = modPath.indexOf(pathElement) - 1; modPath[parentIndex] = this.path[pathIndex - 1] + key; modPath.splice(parentIndex + 1, 1); - adapter.log.info('nachher path = ' + this.path.join('.') + ' modpath: ' + modPath.join('.')); } }); const newPath = vin + "." + path + "." + modPath.join("."); @@ -1560,7 +1561,7 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } - } else if (isStatusData && (this.path.length > 0) && !isNaN(this.path[this.path.length - 1])) { + } else if (isStatusData && isNumberNode) { var text = null; if (this.node.textId) { text = this.node.textId; @@ -1577,7 +1578,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); adapter.updateName(newPath, text); - } else if (isTripData && (this.path.length > 0) && !isNaN(this.path[this.path.length - 1])) { + } else if (isTripData && isNumberNode) { var text = null; if (this.node.timestamp) { text = this.node.timestamp; @@ -1763,6 +1764,7 @@ class VwWeconnect extends utils.Adapter { if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for unit'); else { + adapter.log.info('path: ' + pathString + ' current unit: ' + obj.common.unit + ' new: ' + unit); if (obj.common && obj.common.unit !== unit) { adapter.extendObject(pathString, { type: "channel", From a342eb23a338c436c8afe7168b60b81d8ee70686 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 14:13:53 +0100 Subject: [PATCH 152/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b5770d6f..fa530d08 100644 --- a/main.js +++ b/main.js @@ -1508,7 +1508,7 @@ class VwWeconnect extends utils.Adapter { if (isNaN(parseInt(pathElement))) { isNumberNode = false; } else { - isNumbernode = true; + isNumberNode = true; if (isStatusData && this.path[pathIndex -1] === 'data') { dataIndex = parseInt(pathElement); dataId = statusKeys[dataIndex].dataId; From ebae7b8f1b40706faaee6e78fc0aecfe8d7493c1 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 14:53:14 +0100 Subject: [PATCH 153/729] fix --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.js b/main.js index fa530d08..b32dbaa2 100644 --- a/main.js +++ b/main.js @@ -1764,7 +1764,6 @@ class VwWeconnect extends utils.Adapter { if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for unit'); else { - adapter.log.info('path: ' + pathString + ' current unit: ' + obj.common.unit + ' new: ' + unit); if (obj.common && obj.common.unit !== unit) { adapter.extendObject(pathString, { type: "channel", @@ -1788,7 +1787,7 @@ class VwWeconnect extends utils.Adapter { adapter.extendObject(pathString, { type: "channel", common: { - unit: unit + name: name } }); } From 8e5d44cec93640f0bccd73d9f2b8ef6efbfe86b6 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 14 Nov 2020 19:08:06 +0100 Subject: [PATCH 154/729] fix --- main.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/main.js b/main.js index b32dbaa2..0be748a5 100644 --- a/main.js +++ b/main.js @@ -1552,11 +1552,9 @@ class VwWeconnect extends utils.Adapter { adapter.setState(newPath, value || this.node, true); if (isStatusData && this.key == "value") { if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { - adapter.log.info('is car locked: ' + value + " yes/no " + (value == 2)); adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); } if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { - adapter.log.info('outside temp: ' + value); adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } adapter.updateUnit(newPath, fieldUnit); @@ -1782,7 +1780,6 @@ class VwWeconnect extends utils.Adapter { if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for name'); else { - adapter.log.info('path: ' + pathString + ' current name: ' + obj.common.name + ' new: ' + name); if (obj.common && obj.common.name !== name) { adapter.extendObject(pathString, { type: "channel", From 1f614c4533a971a7244579ab1beda9425dfef830 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 11:54:58 +0100 Subject: [PATCH 155/729] calculate tripKey --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 0be748a5..a38c8398 100644 --- a/main.js +++ b/main.js @@ -1504,10 +1504,10 @@ class VwWeconnect extends utils.Adapter { var fieldUnit = null; var isNumberNode = false; this.path.forEach((pathElement, pathIndex) => { - var key; if (isNaN(parseInt(pathElement))) { isNumberNode = false; } else { + var key; isNumberNode = true; if (isStatusData && this.path[pathIndex -1] === 'data') { dataIndex = parseInt(pathElement); @@ -1524,10 +1524,13 @@ class VwWeconnect extends utils.Adapter { adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); key = parseInt(pathElement) + 1 + ""; } + } else if (isTripData && this.path[pathIndex -1]) { + key = "_" + tripKeys[parseInt(pathElement)]; } else { key = parseInt(pathElement) + 1 + ""; while (key.length < 2) key = "0" + key; } + adapter.log.info(dataId + "/" + fieldId + ": new Key would be " + this.path[pathIndex - 1] + key); key = parseInt(pathElement) + 1 + ""; while (key.length < 2) key = "0" + key; const parentIndex = modPath.indexOf(pathElement) - 1; From b58d865b25d28e4435fed5f350283702fe253480 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 12:24:26 +0100 Subject: [PATCH 156/729] skip unwanted trips --- main.js | 138 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 74 insertions(+), 64 deletions(-) diff --git a/main.js b/main.js index a38c8398..67210f42 100644 --- a/main.js +++ b/main.js @@ -1503,6 +1503,7 @@ class VwWeconnect extends utils.Adapter { var fieldId = null; var fieldUnit = null; var isNumberNode = false; + var skipNode = false; this.path.forEach((pathElement, pathIndex) => { if (isNaN(parseInt(pathElement))) { isNumberNode = false; @@ -1525,77 +1526,86 @@ class VwWeconnect extends utils.Adapter { key = parseInt(pathElement) + 1 + ""; } } else if (isTripData && this.path[pathIndex -1]) { - key = "_" + tripKeys[parseInt(pathElement)]; + var tripKey = tripKeys[parseInt(pathElement)]; + if (tripKey === null) { + skipNode = true; + } else { + key = "_" + tripKeys[parseInt(pathElement)]; + } } else { key = parseInt(pathElement) + 1 + ""; while (key.length < 2) key = "0" + key; } - adapter.log.info(dataId + "/" + fieldId + ": new Key would be " + this.path[pathIndex - 1] + key); - key = parseInt(pathElement) + 1 + ""; - while (key.length < 2) key = "0" + key; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = this.path[pathIndex - 1] + key; - modPath.splice(parentIndex + 1, 1); - } - }); - const newPath = vin + "." + path + "." + modPath.join("."); - if (this.path.length > 0 && this.isLeaf) { - adapter.setObjectNotExists(newPath, { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - unit: fieldUnit, - write: false, - read: true, - }, - native: {}, - }); - adapter.setState(newPath, value || this.node, true); - if (isStatusData && this.key == "value") { - if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { - adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); - } - if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { - adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + if (! skipNode) { + adapter.log.info(dataId + "/" + fieldId + ": new Key would be " + this.path[pathIndex - 1] + key); + key = parseInt(pathElement) + 1 + ""; + while (key.length < 2) key = "0" + key; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = this.path[pathIndex - 1] + key; + modPath.splice(parentIndex + 1, 1); } - adapter.updateUnit(newPath, fieldUnit); - } - } else if (isStatusData && isNumberNode) { - var text = null; - if (this.node.textId) { - text = this.node.textId; } - adapter.setObjectNotExists(newPath, { - type: "channel", - common: { - name: text, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - adapter.updateName(newPath, text); - } else if (isTripData && isNumberNode) { - var text = null; - if (this.node.timestamp) { - text = this.node.timestamp; + }); + if (! skipNode) { + const newPath = vin + "." + path + "." + modPath.join("."); + if (this.path.length > 0 && this.isLeaf) { + adapter.setObjectNotExists(newPath, { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + unit: fieldUnit, + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(newPath, value || this.node, true); + if (isStatusData && this.key == "value") { + if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { + adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); + } + if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { + adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + } + adapter.updateUnit(newPath, fieldUnit); + } + } else if (isStatusData && isNumberNode) { + var text = null; + if (this.node.textId) { + text = this.node.textId; + } + adapter.setObjectNotExists(newPath, { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.updateName(newPath, text); + } else if (isTripData && isNumberNode) { + var text = null; + if (this.node.timestamp) { + text = this.node.timestamp; + } + adapter.setObjectNotExists(newPath, { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.updateName(newPath, text); } - adapter.setObjectNotExists(newPath, { - type: "channel", - common: { - name: text, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - adapter.updateName(newPath, text); } }); resolve(); From 0afbd085a903129ea78ee7b736d6d25ee3876add Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 12:37:52 +0100 Subject: [PATCH 157/729] numberOfTrips as instance property --- admin/index_m.html | 10 ++++++++++ io-package.json | 6 ++++-- main.js | 2 +- package.json | 10 ++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 4e985124..c99f92ef 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -117,6 +117,16 @@
+
+ + +
Lizenzinformationen laden diff --git a/io-package.json b/io-package.json index 51c598ef..091d2865 100644 --- a/io-package.json +++ b/io-package.json @@ -81,7 +81,8 @@ "zh-cn": "大众我们连接的适配器" }, "authors": [ - "ta2k " + "ta2k ", + "Sneak-L8 " ], "keywords": [ "VW", @@ -131,7 +132,8 @@ "type": "vw", "reversePos": false, "rights": false, - "tripType": "none" + "tripType": "none", + "numberOfTrips": 1 }, "objects": [], "instanceObjects": [ diff --git a/main.js b/main.js index 67210f42..fb5d640b 100644 --- a/main.js +++ b/main.js @@ -1666,7 +1666,7 @@ class VwWeconnect extends utils.Adapter { getTripKeys(tripJson) { const adapter = this; - const maxCount = 10; // this.config.maxTrips; + const maxCount = this.config.numberOfTrips; var result = null; if (tripJson && tripJson.tripData) { if (Array.isArray(tripJson.tripData)) { diff --git a/package.json b/package.json index 4852876b..ce722878 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,16 @@ "name": "ta2k", "email": "tombox2020@gmail.com" }, + "contributors": [ + { + "name": "ta2k", + "email": "tombox2020@gmail.com" + }, + { + "name": "Sneak-L8", + "email": "git@sengler.de" + } + ], "bugs": { "url": "https://github.com/ta2k/ioBroker.vw-connect/issues" }, From 96f63f353e34d76a2e77f8813332a4ca850b0f8f Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 12:41:48 +0100 Subject: [PATCH 158/729] final v0.0.19 --- admin/index_m.html | 2 +- main.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index c99f92ef..793bf356 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -123,7 +123,7 @@ - +
diff --git a/main.js b/main.js index fb5d640b..dbfa5920 100644 --- a/main.js +++ b/main.js @@ -1537,9 +1537,6 @@ class VwWeconnect extends utils.Adapter { while (key.length < 2) key = "0" + key; } if (! skipNode) { - adapter.log.info(dataId + "/" + fieldId + ": new Key would be " + this.path[pathIndex - 1] + key); - key = parseInt(pathElement) + 1 + ""; - while (key.length < 2) key = "0" + key; const parentIndex = modPath.indexOf(pathElement) - 1; modPath[parentIndex] = this.path[pathIndex - 1] + key; modPath.splice(parentIndex + 1, 1); From 1ea457a8f6bf580b3a834941cbc16cad7cbbdae6 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 12:45:04 +0100 Subject: [PATCH 159/729] final v0.0.19 no. 2 --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index dbfa5920..da9208f4 100644 --- a/main.js +++ b/main.js @@ -1772,7 +1772,7 @@ class VwWeconnect extends utils.Adapter { if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for unit'); else { - if (obj.common && obj.common.unit !== unit) { + if (obj && obj.common && obj.common.unit !== unit) { adapter.extendObject(pathString, { type: "channel", common: { @@ -1790,7 +1790,7 @@ class VwWeconnect extends utils.Adapter { if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for name'); else { - if (obj.common && obj.common.name !== name) { + if (obj && obj.common && obj.common.name !== name) { adapter.extendObject(pathString, { type: "channel", common: { From e3413ba684ddc7513deda6498f2b7f90eb7844d8 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 19:05:06 +0100 Subject: [PATCH 160/729] last fix when update unit of value (must be state instead of channel) --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index da9208f4..e4fb5ef1 100644 --- a/main.js +++ b/main.js @@ -1774,7 +1774,7 @@ class VwWeconnect extends utils.Adapter { else { if (obj && obj.common && obj.common.unit !== unit) { adapter.extendObject(pathString, { - type: "channel", + type: "state", common: { unit: unit } From 50e9d2988dff481df23d908aa6411788b6ed0963 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 19:18:46 +0100 Subject: [PATCH 161/729] test --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index e4fb5ef1..12e572d5 100644 --- a/main.js +++ b/main.js @@ -1508,8 +1508,8 @@ class VwWeconnect extends utils.Adapter { if (isNaN(parseInt(pathElement))) { isNumberNode = false; } else { - var key; isNumberNode = true; + var key; if (isStatusData && this.path[pathIndex -1] === 'data') { dataIndex = parseInt(pathElement); dataId = statusKeys[dataIndex].dataId; @@ -1573,6 +1573,7 @@ class VwWeconnect extends utils.Adapter { if (this.node.textId) { text = this.node.textId; } + adapter.log.info("set status channel " + newPath); adapter.setObjectNotExists(newPath, { type: "channel", common: { @@ -1590,6 +1591,7 @@ class VwWeconnect extends utils.Adapter { if (this.node.timestamp) { text = this.node.timestamp; } + adapter.log.info("set trip channel " + newPath); adapter.setObjectNotExists(newPath, { type: "channel", common: { From b28db8f6dacf895b1f1ece8cbf186291b5b0be2d Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 19:30:30 +0100 Subject: [PATCH 162/729] fix "field" leaps --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 12e572d5..eb0b634e 100644 --- a/main.js +++ b/main.js @@ -1497,7 +1497,7 @@ class VwWeconnect extends utils.Adapter { tripKeys = this.getTripKeys(result); } traverse(result).forEach(function (value) { - const modPath = this.path; + const modPath = this.path.slice(); var dataId = null; var dataIndex = -1; var fieldId = null; From 16d2af72fa65e9a9dd7423c2f0921e96303a3748 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Nov 2020 19:33:23 +0100 Subject: [PATCH 163/729] final fix --- main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.js b/main.js index eb0b634e..ea7bb9ed 100644 --- a/main.js +++ b/main.js @@ -1573,7 +1573,6 @@ class VwWeconnect extends utils.Adapter { if (this.node.textId) { text = this.node.textId; } - adapter.log.info("set status channel " + newPath); adapter.setObjectNotExists(newPath, { type: "channel", common: { @@ -1591,7 +1590,6 @@ class VwWeconnect extends utils.Adapter { if (this.node.timestamp) { text = this.node.timestamp; } - adapter.log.info("set trip channel " + newPath); adapter.setObjectNotExists(newPath, { type: "channel", common: { From ea1df4b94697b9072dc1d410664b5e6aa6ba47be Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 21 Nov 2020 12:02:49 +0100 Subject: [PATCH 164/729] catch async errors --- main.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index ea7bb9ed..5e5a55f5 100644 --- a/main.js +++ b/main.js @@ -1930,8 +1930,8 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(body)); reject(); } - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -1941,10 +1941,13 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(body)); reject(); } - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } + } catch (err) { + this.log.error(err); + reject(); } ); }); @@ -2272,6 +2275,9 @@ class VwWeconnect extends utils.Adapter { // The state was deleted // this.log.info(`state ${id} deleted`); } + } catch (err) { + this.log.error('Error in OnStateChange:' + err); + reject(); } } From afbd3183593ca50f90cb4725a8bb05b500a5298d Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 21 Nov 2020 12:10:11 +0100 Subject: [PATCH 165/729] fix --- main.js | 485 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 243 insertions(+), 242 deletions(-) diff --git a/main.js b/main.js index 5e5a55f5..72d33284 100644 --- a/main.js +++ b/main.js @@ -219,7 +219,7 @@ class VwWeconnect extends utils.Adapter { }); }) .catch(() => { - this.log.error("Login Failed"); + this.log.error("Login Failed: " + err); }); this.subscribeStates("*"); } @@ -2029,255 +2029,256 @@ class VwWeconnect extends utils.Adapter { * @param {ioBroker.State | null | undefined} state */ async onStateChange(id, state) { - if (state) { - if (!state.ack) { - const vin = id.split(".")[2]; - let body = ""; - let contentType = ""; - if (id.indexOf("remote") !== -1) { - const action = id.split(".")[4]; - if (action === "batterycharge") { - body = '\n\n start\n'; - if (state.val === false) { - body = '\n\n stop\n'; - } - contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + try { + if (state) { + if (!state.ack) { + const vin = id.split(".")[2]; + let body = ""; + let contentType = ""; + if (id.indexOf("remote") !== -1) { + const action = id.split(".")[4]; + if (action === "batterycharge") { + body = '\n\n start\n'; + if (state.val === false) { + body = '\n\n stop\n'; + } + contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "climatisation") { - body = '\n\n startClimatisation\n'; - if (state.val === false) { - body = '\n\n stopClimatisation\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "climatisation") { + body = '\n\n startClimatisation\n'; + if (state.val === false) { + body = '\n\n stopClimatisation\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "ventilation") { - const idArray = id.split("."); - idArray.pop(); - idArray.push(action + "Duration"); - const ventilationDurationPath = idArray.join("."); - const durationState = await this.getStateAsync(ventilationDurationPath); - let duration = 30; - if (durationState && durationState.val) { - duration = durationState.val; - } - let body = - '\n\n \n true\n' + - duration + - "\n " + - action + - "\n"; - if (state.val === false) { - body = - '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "ventilation") { + const idArray = id.split("."); + idArray.pop(); + idArray.push(action + "Duration"); + const ventilationDurationPath = idArray.join("."); + const durationState = await this.getStateAsync(ventilationDurationPath); + let duration = 30; + if (durationState && durationState.val) { + duration = durationState.val; + } + let body = + '\n\n \n true\n' + + duration + + "\n " + + action + + "\n"; + if (state.val === false) { + body = + '\n\n \n false\n \n'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "climatisationTemperature") { - let temp = 2950; - if (state.val && !isNaN(state.val)) { - temp = (parseFloat(state.val) + 273, 6) * 10; - } - body = - '\n\n setSettings ' + - temp + - " false electric \n"; - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "climatisationTemperature") { + let temp = 2950; + if (state.val && !isNaN(state.val)) { + temp = (parseFloat(state.val) + 273, 6) * 10; + } + body = + '\n\n setSettings ' + + temp + + " false electric \n"; + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; - if (state.val === false) { - body = '\n\n stopWindowHeating\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "flash") { - //HONK_AND_FLASH - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - if (!longitude || !latitude) { - this.log.info("No Location available, location information needed for this action"); - return; - } - body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "windowheating") { + body = '\n\n startWindowHeating\n'; + if (state.val === false) { + body = '\n\n stopWindowHeating\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "flash") { + //HONK_AND_FLASH + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } + body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "honk") { - // - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - if (!longitude || !latitude) { - this.log.info("No Location available, location information needed for this action"); - return; - } - body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "standheizung") { - body = - '\n\n \n true\n \n'; - if (state.val === false) { - body = - '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "lock") { - body = '\n\n lock\n'; - let lockAction = "LOCK"; - if (state.val === false) { - body = '\n\n unlock\n'; - lockAction = "UNLOCK"; - } - contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } - } - } else { - if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - const vin = id.split(".")[2]; - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); + if (action === "honk") { + // + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } + body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "standheizung") { + body = + '\n\n \n true\n \n'; + if (state.val === false) { + body = + '\n\n \n false\n \n'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "lock") { + body = '\n\n lock\n'; + let lockAction = "LOCK"; + if (state.val === false) { + body = '\n\n unlock\n'; + lockAction = "UNLOCK"; + } + contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + } + } else { + if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { + const vin = id.split(".")[2]; + const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + const longitudeValue = parseFloat(longitude.val); - this.setObjectNotExists(vin + ".position.latitudeConv", { - type: "state", - common: { - name: "latitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); - this.setObjectNotExists(vin + ".position.longitudeConv", { - type: "state", - common: { - name: "longitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - if (!this.config.reversePos) { - this.log.debug("reverse pos deactivated"); - return; - } - this.log.debug("reverse pos started"); - request.get( - { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", + this.setObjectNotExists(vin + ".position.latitudeConv", { + type: "state", + common: { + name: "latitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); + this.setObjectNotExists(vin + ".position.longitudeConv", { + type: "state", + common: { + name: "longitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); + if (!this.config.reversePos) { + this.log.debug("reverse pos deactivated"); + return; + } + this.log.debug("reverse pos started"); + request.get( + { + url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", - headers: { - "User-Agent": "ioBroker/vw-connect", - }, - json: true, - followAllRedirects: true, - }, - (err, resp, body) => { - this.log.debug("reverse pos received"); - this.log.debug(JSON.stringify(body)); - if (err || resp.statusCode >= 400 || !body) { - body && this.log.error(JSON.stringify(body)); - resp && this.log.error(resp.statusCode); - err && this.log.error(err); - return; - } - if (body.display_name) { - try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - this.setObjectNotExists(vin + ".position.address.displayName", { - type: "state", - common: { - name: "displayName", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach((key) => { - this.setObjectNotExists(vin + ".position.address." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.address." + key, body.address[key], true); - }); - } catch (error) { - this.log.error(error); - } - } else { - this.log.error(JSON.stringify(body)); - } - } - ); - } - } - } else { - // The state was deleted - // this.log.info(`state ${id} deleted`); + headers: { + "User-Agent": "ioBroker/vw-connect", + }, + json: true, + followAllRedirects: true, + }, + (err, resp, body) => { + this.log.debug("reverse pos received"); + this.log.debug(JSON.stringify(body)); + if (err || resp.statusCode >= 400 || !body) { + body && this.log.error(JSON.stringify(body)); + resp && this.log.error(resp.statusCode); + err && this.log.error(err); + return; + } + if (body.display_name) { + try { + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + this.setObjectNotExists(vin + ".position.address.displayName", { + type: "state", + common: { + name: "displayName", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address.displayName", fullAdress, true); + Object.keys(body.address).forEach((key) => { + this.setObjectNotExists(vin + ".position.address." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address." + key, body.address[key], true); + }); + } catch (error) { + this.log.error(error); + } + } else { + this.log.error(JSON.stringify(body)); + } + } + ); + } + } + } else { + // The state was deleted + // this.log.info(`state ${id} deleted`); + } + } catch (err) { + this.log.error('Error in OnStateChange:' + err); } - } catch (err) { - this.log.error('Error in OnStateChange:' + err); - reject(); } } From 995c30b748a8caf260e952d06f4bea36df1f43bf Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 21 Nov 2020 12:23:48 +0100 Subject: [PATCH 166/729] fix --- main.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main.js b/main.js index 72d33284..b4164110 100644 --- a/main.js +++ b/main.js @@ -1945,10 +1945,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } catch (err) { - this.log.error(err); - reject(); - } + } ); }); } From 32f18cc904e841847c18ae3c1da3f16bebbf8950 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 21 Nov 2020 14:59:14 +0100 Subject: [PATCH 167/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b4164110..8bc503cf 100644 --- a/main.js +++ b/main.js @@ -219,7 +219,7 @@ class VwWeconnect extends utils.Adapter { }); }) .catch(() => { - this.log.error("Login Failed: " + err); + this.log.error("Login Failed"); }); this.subscribeStates("*"); } From 39d758531e3cb1e98f4263eec1704c4c4add73a9 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 22 Nov 2020 08:42:06 +0100 Subject: [PATCH 168/729] catch error in statusUpdate --- main.js | 151 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 73 deletions(-) diff --git a/main.js b/main.js index 8bc503cf..7ee09273 100644 --- a/main.js +++ b/main.js @@ -436,8 +436,8 @@ class VwWeconnect extends utils.Adapter { this.log.error("No Token received."); try { this.log.debug(body); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -446,23 +446,23 @@ class VwWeconnect extends utils.Adapter { } } ); - } catch (error) { + } catch (err2) { this.log.error("Login was not successful, please check your login credentials and selected type"); err && this.log.error(err); - this.log.error(error); - this.log.error(error.stack); + this.log.error(err2); + this.log.error(err2.stack); reject(); } } ); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } ); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -553,8 +553,8 @@ class VwWeconnect extends utils.Adapter { const tokens = JSON.parse(body); this.getVWToken(tokens, jwtid_token, reject, resolve); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -604,8 +604,8 @@ class VwWeconnect extends utils.Adapter { this.refreshToken(true).catch(() => {}); }, 0.9 * 60 * 60 * 1000); //0.9hours resolve(); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -691,12 +691,12 @@ class VwWeconnect extends utils.Adapter { } } resolve(); - } catch (error) { + } catch (err) { this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); - this.log.error(error); + this.log.error(err); this.log.error(JSON.stringify(body)); this.log.error(resp.statusCode); - this.log.error(error.stack); + this.log.error(err.stack); this.restart(); } } @@ -755,8 +755,8 @@ class VwWeconnect extends utils.Adapter { }); resolve(); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -800,8 +800,8 @@ class VwWeconnect extends utils.Adapter { } } resolve(); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -854,8 +854,8 @@ class VwWeconnect extends utils.Adapter { }); resolve(); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -1098,9 +1098,9 @@ class VwWeconnect extends utils.Adapter { }); }); resolve(); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); this.log.error("Not able to find vehicle, did you choose the correct type?"); reject(); } @@ -1196,8 +1196,8 @@ class VwWeconnect extends utils.Adapter { }); resolve(); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -1272,8 +1272,8 @@ class VwWeconnect extends utils.Adapter { }); resolve(); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); reject(); } } @@ -1283,43 +1283,48 @@ class VwWeconnect extends utils.Adapter { requestStatusUpdate(vin) { return new Promise((resolve, reject) => { - const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); - let accept = "application/json"; - if (this.config.type === "vw") { - accept = - "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + try { + const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + let accept = "application/json"; + if (this.config.type === "vw") { + accept = + "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + } + request.post( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: accept, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + } catch (err) { + this.log.error(err); + reject(); } - request.post( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: accept, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - resolve(); - } catch (error) { - this.log.error(error); - reject(); - } - } - ); }); } @@ -1611,9 +1616,9 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(body)); reject(); } - } catch (error) { - this.log.error(error); - this.log.error(error.stack); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); reject(); } } @@ -1846,9 +1851,9 @@ class VwWeconnect extends utils.Adapter { return; } this.log.info(body); - } catch (error) { - this.log.error(error); - this.log.error(error.stack); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); reject(); } } @@ -2259,8 +2264,8 @@ class VwWeconnect extends utils.Adapter { }); this.setState(vin + ".position.address." + key, body.address[key], true); }); - } catch (error) { - this.log.error(error); + } catch (err) { + this.log.error(err); } } else { this.log.error(JSON.stringify(body)); From b60ca0c551f5feac736a547f7f36eda88b5df6dc Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 22 Nov 2020 22:06:06 +0100 Subject: [PATCH 169/729] catch rejected status update --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 7ee09273..897f2c29 100644 --- a/main.js +++ b/main.js @@ -205,7 +205,10 @@ class VwWeconnect extends utils.Adapter { return; } this.vinArray.forEach((vin) => { - this.requestStatusUpdate(vin); + this.requestStatusUpdate(vin) + .catch(() => { + this.log.error("force status update Failed"); + });; }); }, this.config.forceinterval * 60 * 1000); } From 92a7f902ff596fbb6c7b2161b4b193ec31da0051 Mon Sep 17 00:00:00 2001 From: TA2K Date: Mon, 30 Nov 2020 00:57:16 +0100 Subject: [PATCH 170/729] reformating --- main.js | 1172 +++++++++++++++++++++++++++---------------------------- 1 file changed, 584 insertions(+), 588 deletions(-) diff --git a/main.js b/main.js index 897f2c29..2ea1d586 100644 --- a/main.js +++ b/main.js @@ -31,7 +31,7 @@ class VwWeconnect extends utils.Adapter { this.on("unload", this.onUnload.bind(this)); this.jar = request.jar(); - + this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -205,10 +205,9 @@ class VwWeconnect extends utils.Adapter { return; } this.vinArray.forEach((vin) => { - this.requestStatusUpdate(vin) - .catch(() => { - this.log.error("force status update Failed"); - });; + this.requestStatusUpdate(vin).catch(() => { + this.log.error("force status update Failed"); + }); }); }, this.config.forceinterval * 60 * 1000); } @@ -1286,45 +1285,45 @@ class VwWeconnect extends utils.Adapter { requestStatusUpdate(vin) { return new Promise((resolve, reject) => { - try { - const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); - let accept = "application/json"; - if (this.config.type === "vw") { - accept = - "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; - } - request.post( - { - url: url, - headers: { - "User-Agent": "okhttp/3.7.0", - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: accept, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - } catch (err) { + try { + const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + let accept = "application/json"; + if (this.config.type === "vw") { + accept = + "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + } + request.post( + { + url: url, + headers: { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: accept, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + } catch (err) { this.log.error(err); reject(); } @@ -1448,9 +1447,9 @@ class VwWeconnect extends utils.Adapter { if (element4 && result[element4]) { result = result[element4]; } - var isStatusData = (path === "status"); - var isTripData = (path === "tripdata"); - + var isStatusData = path === "status"; + var isTripData = path === "tripdata"; + if (isTripData) { if (this.config.tripType === "none") { resolve(); @@ -1471,146 +1470,146 @@ class VwWeconnect extends utils.Adapter { } if (isStatusData) { - this.setObjectNotExists(vin + ".status.isCarLocked", { - type: "state", - common: { - name: "is car locked", - role: "indicator", - type: "boolean", - write: false, - read: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".status.outsideTemperature", { - type: "state", - common: { - name: "outside temperature", - role: "value.temperature", - type: "number", - unit: "°C", - write: false, - read: true, - }, - native: {}, - }); + this.setObjectNotExists(vin + ".status.isCarLocked", { + type: "state", + common: { + name: "is car locked", + role: "indicator", + type: "boolean", + write: false, + read: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".status.outsideTemperature", { + type: "state", + common: { + name: "outside temperature", + role: "value.temperature", + type: "number", + unit: "°C", + write: false, + read: true, + }, + native: {}, + }); } - + var statusKeys = null; if (isStatusData) { - statusKeys = this.getStatusKeys(result); + statusKeys = this.getStatusKeys(result); } var tripKeys = null; if (isTripData) { - tripKeys = this.getTripKeys(result); + tripKeys = this.getTripKeys(result); } traverse(result).forEach(function (value) { const modPath = this.path.slice(); - var dataId = null; - var dataIndex = -1; - var fieldId = null; - var fieldUnit = null; - var isNumberNode = false; - var skipNode = false; + var dataId = null; + var dataIndex = -1; + var fieldId = null; + var fieldUnit = null; + var isNumberNode = false; + var skipNode = false; this.path.forEach((pathElement, pathIndex) => { if (isNaN(parseInt(pathElement))) { - isNumberNode = false; + isNumberNode = false; } else { - isNumberNode = true; - var key; - if (isStatusData && this.path[pathIndex -1] === 'data') { - dataIndex = parseInt(pathElement); - dataId = statusKeys[dataIndex].dataId; + isNumberNode = true; + var key; + if (isStatusData && this.path[pathIndex - 1] === "data") { + dataIndex = parseInt(pathElement); + dataId = statusKeys[dataIndex].dataId; key = "_" + dataId; - } else if (isStatusData && this.path[pathIndex -1] === 'field') { - if (dataIndex >= 0) { - fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; - key = "_" + fieldId; - if (this.key == "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { - fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit; - } - } else { - adapter.log.error('no data entry found for field (path = ' + this.path.join(".")); - key = parseInt(pathElement) + 1 + ""; - } - } else if (isTripData && this.path[pathIndex -1]) { - var tripKey = tripKeys[parseInt(pathElement)]; - if (tripKey === null) { - skipNode = true; - } else { - key = "_" + tripKeys[parseInt(pathElement)]; - } - } else { - key = parseInt(pathElement) + 1 + ""; - while (key.length < 2) key = "0" + key; - } - if (! skipNode) { - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = this.path[pathIndex - 1] + key; - modPath.splice(parentIndex + 1, 1); - } + } else if (isStatusData && this.path[pathIndex - 1] === "field") { + if (dataIndex >= 0) { + fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; + key = "_" + fieldId; + if (this.key == "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { + fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit; + } + } else { + adapter.log.error("no data entry found for field (path = " + this.path.join(".")); + key = parseInt(pathElement) + 1 + ""; + } + } else if (isTripData && this.path[pathIndex - 1]) { + var tripKey = tripKeys[parseInt(pathElement)]; + if (tripKey === null) { + skipNode = true; + } else { + key = "_" + tripKeys[parseInt(pathElement)]; + } + } else { + key = parseInt(pathElement) + 1 + ""; + while (key.length < 2) key = "0" + key; + } + if (!skipNode) { + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = this.path[pathIndex - 1] + key; + modPath.splice(parentIndex + 1, 1); + } } }); - if (! skipNode) { - const newPath = vin + "." + path + "." + modPath.join("."); - if (this.path.length > 0 && this.isLeaf) { - adapter.setObjectNotExists(newPath, { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - unit: fieldUnit, - write: false, - read: true, - }, - native: {}, - }); - adapter.setState(newPath, value || this.node, true); - if (isStatusData && this.key == "value") { - if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { - adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); - } - if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { - adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); - } - adapter.updateUnit(newPath, fieldUnit); - } - } else if (isStatusData && isNumberNode) { - var text = null; - if (this.node.textId) { - text = this.node.textId; - } - adapter.setObjectNotExists(newPath, { - type: "channel", - common: { - name: text, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - adapter.updateName(newPath, text); - } else if (isTripData && isNumberNode) { - var text = null; - if (this.node.timestamp) { - text = this.node.timestamp; - } - adapter.setObjectNotExists(newPath, { - type: "channel", - common: { - name: text, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - adapter.updateName(newPath, text); - } + if (!skipNode) { + const newPath = vin + "." + path + "." + modPath.join("."); + if (this.path.length > 0 && this.isLeaf) { + adapter.setObjectNotExists(newPath, { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + unit: fieldUnit, + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(newPath, value || this.node, true); + if (isStatusData && this.key == "value") { + if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { + adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); + } + if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { + adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + } + adapter.updateUnit(newPath, fieldUnit); + } + } else if (isStatusData && isNumberNode) { + var text = null; + if (this.node.textId) { + text = this.node.textId; + } + adapter.setObjectNotExists(newPath, { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.updateName(newPath, text); + } else if (isTripData && isNumberNode) { + var text = null; + if (this.node.timestamp) { + text = this.node.timestamp; + } + adapter.setObjectNotExists(newPath, { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.updateName(newPath, text); + } } }); resolve(); @@ -1630,186 +1629,183 @@ class VwWeconnect extends utils.Adapter { } getStatusKeys(statusJson) { - const adapter = this; - var result = null; - if (statusJson && statusJson.data) { - if (Array.isArray(statusJson.data)) { - result = new Array(statusJson.data.length); - statusJson.data.forEach(function(dataValue, dataIndex) { - if (dataValue && dataValue.id) { - if (dataValue.field && Array.isArray(dataValue.field)) { - var newList = new Array(dataValue.field.length); - dataValue.field.forEach(function(fieldValue, fieldIndex) { - if (fieldValue && fieldValue.id) { - newList[fieldIndex] = {id: fieldValue.id, unit: fieldValue.unit}; - } else { - adapter.log.warn("status[" + dataIndex + "," + fieldIndex+ "] has no id"); - adapter.log.debug(JSON.stringify(fieldValue)); - } - }); - result[dataIndex] = {dataId: dataValue.id, fieldIds: newList}; - } else { - adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); - adapter.log.debug(JSON.stringify(dataValue)); - } - } else { - adapter.log.warn("status[" + dataIndex + "] has no id"); - adapter.log.debug(JSON.stringify(dataValue)); - } - }); - } else { - adapter.log.warn("status is not an array"); - adapter.log.debug(JSON.stringify(statusJson.data)); - } - } else { - adapter.log.warn("status data without status field"); - adapter.log.debug(JSON.stringify(statusJson)); - } - adapter.log.debug(JSON.stringify(result)); - return result; + const adapter = this; + var result = null; + if (statusJson && statusJson.data) { + if (Array.isArray(statusJson.data)) { + result = new Array(statusJson.data.length); + statusJson.data.forEach(function (dataValue, dataIndex) { + if (dataValue && dataValue.id) { + if (dataValue.field && Array.isArray(dataValue.field)) { + var newList = new Array(dataValue.field.length); + dataValue.field.forEach(function (fieldValue, fieldIndex) { + if (fieldValue && fieldValue.id) { + newList[fieldIndex] = { id: fieldValue.id, unit: fieldValue.unit }; + } else { + adapter.log.warn("status[" + dataIndex + "," + fieldIndex + "] has no id"); + adapter.log.debug(JSON.stringify(fieldValue)); + } + }); + result[dataIndex] = { dataId: dataValue.id, fieldIds: newList }; + } else { + adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); + adapter.log.debug(JSON.stringify(dataValue)); + } + } else { + adapter.log.warn("status[" + dataIndex + "] has no id"); + adapter.log.debug(JSON.stringify(dataValue)); + } + }); + } else { + adapter.log.warn("status is not an array"); + adapter.log.debug(JSON.stringify(statusJson.data)); + } + } else { + adapter.log.warn("status data without status field"); + adapter.log.debug(JSON.stringify(statusJson)); + } + adapter.log.debug(JSON.stringify(result)); + return result; } - + getTripKeys(tripJson) { - const adapter = this; - const maxCount = this.config.numberOfTrips; - var result = null; - if (tripJson && tripJson.tripData) { - if (Array.isArray(tripJson.tripData)) { - var bestShort = []; - var bestLong = []; - var bestCycle = []; - // select and sort newest tripData - tripJson.tripData.forEach(function(tripValue, tripIndex) { - if (tripValue && tripValue.tripType && tripValue.tripID) { - if (tripValue.tripType === "shortTerm") { - var found = false; - bestShort.forEach(function(value, index) { - if ((! found) && tripValue.tripID > value) { - bestShort.splice(index, 0, tripValue.tripID); - found = true; - } - }); - if ((! found) && (maxCount == 0 || bestShort.length < maxCount)) { - bestShort.push(tripValue.tripID); - } else if (maxCount > 0 && bestShort.length > maxCount) { - bestShort.pop(); - } - } else if (tripValue.tripType === "longTerm") { - var found = false; - bestLong.forEach(function(value, index) { - if ((! found) && tripValue.tripID > value) { - bestLong.splice(index, 0, tripValue.tripID); - found = true; - } - }); - if ((! found) && (maxCount == 0 || bestLong.length < maxCount)) { - bestLong.push(tripValue.tripID); - } else if (maxCount > 0 && bestLong.length > maxCount) { - bestLong.pop(); - } - } else if (tripValue.tripType === "cyclic") { - var found = false; - bestCycle.forEach(function(value, index) { - if ((! found) && tripValue.tripID > value) { - bestCycle.splice(index, 0, tripValue.tripID); - found = true; - } - }); - if ((! found) && (maxCount == 0 || bestCycle.length < maxCount)) { - bestCycle.push(tripValue.tripID); - } else if (maxCount > 0 && bestCycle.length > maxCount) { - bestCycle.pop(); - } - } else { - adapter.log.warn("unknown tripType: " + tripValue.tripType); - adapter.log.debug(JSON.stringify(tripValue)); - } - } else { - adapter.log.warn("tripData has not tripType and tripID"); - adapter.log.debug(JSON.stringify(tripValue)); - } - }); - //adapter.log.info("bestShort: " + JSON.stringify(bestShort)); - //adapter.log.info("bestLong: " + JSON.stringify(bestLong)); - //adapter.log.info("bestCycle: " + JSON.stringify(bestCycle)); - // build keys for tripData - result = new Array(tripJson.tripData.length); - tripJson.tripData.forEach(function(tripValue, tripIndex) { - result[tripIndex] = null; - if (tripValue && tripValue.tripType && tripValue.tripID) { - if (tripValue.tripType === "shortTerm") { - var index = bestShort.indexOf(tripValue.tripID); - if (index >= 0) { - result[tripIndex] = index + 1 + ""; - while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; - result[tripIndex] = "short" + result[tripIndex]; - } - } else if (tripValue.tripType === "longTerm") { - var index = bestLong.indexOf(tripValue.tripID); - if (index >= 0) { - result[tripIndex] = index + 1 + ""; - while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; - result[tripIndex] = "long" + result[tripIndex]; - } - } else if (tripValue.tripType === "cyclic") { - var index = bestCycle.indexOf(tripValue.tripID); - if (index >= 0) { - result[tripIndex] = index + 1 + ""; - while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; - result[tripIndex] = "cycle" + result[tripIndex]; - } - } - } - }); - - } else { - adapter.log.warn("tripData is not an array"); - adapter.log.debug(JSON.stringify(tripJson.tripData)); - } - } else { - adapter.log.warn("tripdata without tripData field"); - adapter.log.debug(JSON.stringify(tripJson)); - } - adapter.log.debug(JSON.stringify(result)) ; - return result; + const adapter = this; + const maxCount = this.config.numberOfTrips; + var result = null; + if (tripJson && tripJson.tripData) { + if (Array.isArray(tripJson.tripData)) { + var bestShort = []; + var bestLong = []; + var bestCycle = []; + // select and sort newest tripData + tripJson.tripData.forEach(function (tripValue, tripIndex) { + if (tripValue && tripValue.tripType && tripValue.tripID) { + if (tripValue.tripType === "shortTerm") { + var found = false; + bestShort.forEach(function (value, index) { + if (!found && tripValue.tripID > value) { + bestShort.splice(index, 0, tripValue.tripID); + found = true; + } + }); + if (!found && (maxCount == 0 || bestShort.length < maxCount)) { + bestShort.push(tripValue.tripID); + } else if (maxCount > 0 && bestShort.length > maxCount) { + bestShort.pop(); + } + } else if (tripValue.tripType === "longTerm") { + var found = false; + bestLong.forEach(function (value, index) { + if (!found && tripValue.tripID > value) { + bestLong.splice(index, 0, tripValue.tripID); + found = true; + } + }); + if (!found && (maxCount == 0 || bestLong.length < maxCount)) { + bestLong.push(tripValue.tripID); + } else if (maxCount > 0 && bestLong.length > maxCount) { + bestLong.pop(); + } + } else if (tripValue.tripType === "cyclic") { + var found = false; + bestCycle.forEach(function (value, index) { + if (!found && tripValue.tripID > value) { + bestCycle.splice(index, 0, tripValue.tripID); + found = true; + } + }); + if (!found && (maxCount == 0 || bestCycle.length < maxCount)) { + bestCycle.push(tripValue.tripID); + } else if (maxCount > 0 && bestCycle.length > maxCount) { + bestCycle.pop(); + } + } else { + adapter.log.warn("unknown tripType: " + tripValue.tripType); + adapter.log.debug(JSON.stringify(tripValue)); + } + } else { + adapter.log.warn("tripData has not tripType and tripID"); + adapter.log.debug(JSON.stringify(tripValue)); + } + }); + //adapter.log.info("bestShort: " + JSON.stringify(bestShort)); + //adapter.log.info("bestLong: " + JSON.stringify(bestLong)); + //adapter.log.info("bestCycle: " + JSON.stringify(bestCycle)); + // build keys for tripData + result = new Array(tripJson.tripData.length); + tripJson.tripData.forEach(function (tripValue, tripIndex) { + result[tripIndex] = null; + if (tripValue && tripValue.tripType && tripValue.tripID) { + if (tripValue.tripType === "shortTerm") { + var index = bestShort.indexOf(tripValue.tripID); + if (index >= 0) { + result[tripIndex] = index + 1 + ""; + while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; + result[tripIndex] = "short" + result[tripIndex]; + } + } else if (tripValue.tripType === "longTerm") { + var index = bestLong.indexOf(tripValue.tripID); + if (index >= 0) { + result[tripIndex] = index + 1 + ""; + while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; + result[tripIndex] = "long" + result[tripIndex]; + } + } else if (tripValue.tripType === "cyclic") { + var index = bestCycle.indexOf(tripValue.tripID); + if (index >= 0) { + result[tripIndex] = index + 1 + ""; + while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; + result[tripIndex] = "cycle" + result[tripIndex]; + } + } + } + }); + } else { + adapter.log.warn("tripData is not an array"); + adapter.log.debug(JSON.stringify(tripJson.tripData)); + } + } else { + adapter.log.warn("tripdata without tripData field"); + adapter.log.debug(JSON.stringify(tripJson)); + } + adapter.log.debug(JSON.stringify(result)); + return result; } - + updateUnit(pathString, unit) { - const adapter = this; - this.getObject(pathString, function(err, obj) { - if (err) - adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for unit'); - else { - if (obj && obj.common && obj.common.unit !== unit) { - adapter.extendObject(pathString, { - type: "state", - common: { - unit: unit - } - }); - } - } - }); + const adapter = this; + this.getObject(pathString, function (err, obj) { + if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + " for unit"); + else { + if (obj && obj.common && obj.common.unit !== unit) { + adapter.extendObject(pathString, { + type: "state", + common: { + unit: unit, + }, + }); + } + } + }); } - + updateName(pathString, name) { - const adapter = this; - this.getObject(pathString, function(err, obj) { - if (err) - adapter.log.error('Error "' + err + '" reading object ' + pathString + ' for name'); - else { - if (obj && obj.common && obj.common.name !== name) { - adapter.extendObject(pathString, { - type: "channel", - common: { - name: name - } - }); - } - } - }); + const adapter = this; + this.getObject(pathString, function (err, obj) { + if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + " for name"); + else { + if (obj && obj.common && obj.common.name !== name) { + adapter.extendObject(pathString, { + type: "channel", + common: { + name: name, + }, + }); + } + } + }); } - + setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); @@ -1953,7 +1949,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + } ); }); } @@ -2034,255 +2030,255 @@ class VwWeconnect extends utils.Adapter { * @param {ioBroker.State | null | undefined} state */ async onStateChange(id, state) { - try { - if (state) { - if (!state.ack) { - const vin = id.split(".")[2]; - let body = ""; - let contentType = ""; - if (id.indexOf("remote") !== -1) { - const action = id.split(".")[4]; - if (action === "batterycharge") { - body = '\n\n start\n'; - if (state.val === false) { - body = '\n\n stop\n'; - } - contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + try { + if (state) { + if (!state.ack) { + const vin = id.split(".")[2]; + let body = ""; + let contentType = ""; + if (id.indexOf("remote") !== -1) { + const action = id.split(".")[4]; + if (action === "batterycharge") { + body = '\n\n start\n'; + if (state.val === false) { + body = '\n\n stop\n'; + } + contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "climatisation") { - body = '\n\n startClimatisation\n'; - if (state.val === false) { - body = '\n\n stopClimatisation\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "climatisation") { + body = '\n\n startClimatisation\n'; + if (state.val === false) { + body = '\n\n stopClimatisation\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "ventilation") { - const idArray = id.split("."); - idArray.pop(); - idArray.push(action + "Duration"); - const ventilationDurationPath = idArray.join("."); - const durationState = await this.getStateAsync(ventilationDurationPath); - let duration = 30; - if (durationState && durationState.val) { - duration = durationState.val; - } - let body = - '\n\n \n true\n' + - duration + - "\n " + - action + - "\n"; - if (state.val === false) { - body = - '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "ventilation") { + const idArray = id.split("."); + idArray.pop(); + idArray.push(action + "Duration"); + const ventilationDurationPath = idArray.join("."); + const durationState = await this.getStateAsync(ventilationDurationPath); + let duration = 30; + if (durationState && durationState.val) { + duration = durationState.val; + } + let body = + '\n\n \n true\n' + + duration + + "\n " + + action + + "\n"; + if (state.val === false) { + body = + '\n\n \n false\n \n'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "climatisationTemperature") { - let temp = 2950; - if (state.val && !isNaN(state.val)) { - temp = (parseFloat(state.val) + 273, 6) * 10; - } - body = - '\n\n setSettings ' + - temp + - " false electric \n"; - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "climatisationTemperature") { + let temp = 2950; + if (state.val && !isNaN(state.val)) { + temp = (parseFloat(state.val) + 273, 6) * 10; + } + body = + '\n\n setSettings ' + + temp + + " false electric \n"; + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; - if (state.val === false) { - body = '\n\n stopWindowHeating\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "flash") { - //HONK_AND_FLASH - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - if (!longitude || !latitude) { - this.log.info("No Location available, location information needed for this action"); - return; - } - body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "windowheating") { + body = '\n\n startWindowHeating\n'; + if (state.val === false) { + body = '\n\n stopWindowHeating\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "flash") { + //HONK_AND_FLASH + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } + body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "honk") { - // - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - if (!longitude || !latitude) { - this.log.info("No Location available, location information needed for this action"); - return; - } - body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "standheizung") { - body = - '\n\n \n true\n \n'; - if (state.val === false) { - body = - '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "lock") { - body = '\n\n lock\n'; - let lockAction = "LOCK"; - if (state.val === false) { - body = '\n\n unlock\n'; - lockAction = "UNLOCK"; - } - contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } - } - } else { - if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - const vin = id.split(".")[2]; - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); + if (action === "honk") { + // + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } + body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "standheizung") { + body = + '\n\n \n true\n \n'; + if (state.val === false) { + body = + '\n\n \n false\n \n'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "lock") { + body = '\n\n lock\n'; + let lockAction = "LOCK"; + if (state.val === false) { + body = '\n\n unlock\n'; + lockAction = "UNLOCK"; + } + contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + } + } else { + if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { + const vin = id.split(".")[2]; + const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + const longitudeValue = parseFloat(longitude.val); - this.setObjectNotExists(vin + ".position.latitudeConv", { - type: "state", - common: { - name: "latitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); - this.setObjectNotExists(vin + ".position.longitudeConv", { - type: "state", - common: { - name: "longitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - if (!this.config.reversePos) { - this.log.debug("reverse pos deactivated"); - return; - } - this.log.debug("reverse pos started"); - request.get( - { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", + this.setObjectNotExists(vin + ".position.latitudeConv", { + type: "state", + common: { + name: "latitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); + this.setObjectNotExists(vin + ".position.longitudeConv", { + type: "state", + common: { + name: "longitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); + if (!this.config.reversePos) { + this.log.debug("reverse pos deactivated"); + return; + } + this.log.debug("reverse pos started"); + request.get( + { + url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", - headers: { - "User-Agent": "ioBroker/vw-connect", - }, - json: true, - followAllRedirects: true, - }, - (err, resp, body) => { - this.log.debug("reverse pos received"); - this.log.debug(JSON.stringify(body)); - if (err || resp.statusCode >= 400 || !body) { - body && this.log.error(JSON.stringify(body)); - resp && this.log.error(resp.statusCode); - err && this.log.error(err); - return; - } - if (body.display_name) { - try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - this.setObjectNotExists(vin + ".position.address.displayName", { - type: "state", - common: { - name: "displayName", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach((key) => { - this.setObjectNotExists(vin + ".position.address." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.address." + key, body.address[key], true); - }); - } catch (err) { - this.log.error(err); - } - } else { - this.log.error(JSON.stringify(body)); - } - } - ); - } - } - } else { - // The state was deleted - // this.log.info(`state ${id} deleted`); - } - } catch (err) { - this.log.error('Error in OnStateChange:' + err); + headers: { + "User-Agent": "ioBroker/vw-connect", + }, + json: true, + followAllRedirects: true, + }, + (err, resp, body) => { + this.log.debug("reverse pos received"); + this.log.debug(JSON.stringify(body)); + if (err || resp.statusCode >= 400 || !body) { + body && this.log.error(JSON.stringify(body)); + resp && this.log.error(resp.statusCode); + err && this.log.error(err); + return; + } + if (body.display_name) { + try { + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + this.setObjectNotExists(vin + ".position.address.displayName", { + type: "state", + common: { + name: "displayName", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address.displayName", fullAdress, true); + Object.keys(body.address).forEach((key) => { + this.setObjectNotExists(vin + ".position.address." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address." + key, body.address[key], true); + }); + } catch (err) { + this.log.error(err); + } + } else { + this.log.error(JSON.stringify(body)); + } + } + ); + } + } + } else { + // The state was deleted + // this.log.info(`state ${id} deleted`); + } + } catch (err) { + this.log.error("Error in OnStateChange:" + err); } } } From 768ea35abe19023884cf599e6ddbaa582206197d Mon Sep 17 00:00:00 2001 From: TA2K Date: Mon, 30 Nov 2020 00:57:32 +0100 Subject: [PATCH 171/729] fix audi login --- main.js | 104 +++++++++++++++++++++++++------------------------------- 1 file changed, 47 insertions(+), 57 deletions(-) diff --git a/main.js b/main.js index 2ea1d586..1665a166 100644 --- a/main.js +++ b/main.js @@ -128,13 +128,14 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "audi") { this.type = "Audi"; this.country = "DE"; - this.clientId = "mmiconnect_android"; + this.clientId = "09b6cbec-cd19-4589-82fd-363dfa8c24da@apps_vw-dilab_com"; this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; - this.scope = "openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write"; - this.redirect = ""; - this.xrequest = ""; - this.responseType = "token id_token"; - this.xappversion = "3.14.0"; + this.scope = "address profile badge birthdate birthplace nationalIdentifier nationality profession email vin phone nickname name picture mbb gallery openid"; + this.redirect = "myaudi:///"; + this.xrequest = "de.myaudi.mobile.assistant"; + this.responseType = "token%20id_token"; + // this.responseType = "code"; + this.xappversion = "3.22.0"; this.xappname = "myAudi"; } if (this.config.type === "go") { @@ -246,22 +247,14 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "go") { - url += "&code_challenge=" + codeChallenge + "&code_challenge_method=s256"; + if (this.config.type === "vw" || this.config.type === "go" || this.config.type === "audi2") { + url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } if (this.config.type === "audi") { - url = "https://id.audi.com/v1/token"; - method = "POST"; - form = { - client_id: this.clientId, - scope: this.scope, - response_type: this.responseType, - grant_type: "password", - username: this.config.user, - password: this.config.password, - }; + url += "&ui_locales=de-DE%20de&prompt=login"; } - request( + + const loginRequest = request( { method: method, url: url, @@ -275,10 +268,12 @@ class VwWeconnect extends utils.Adapter { }, jar: this.jar, form: form, + gzip: true, followAllRedirects: true, }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + loginRequest.uri && this.log.debug(loginRequest.uri.query); this.log.error("Failed in first login step "); err && this.log.error(err); resp && this.log.error(resp.statusCode); @@ -288,12 +283,6 @@ class VwWeconnect extends utils.Adapter { } try { - if (this.config.type === "audi") { - const tokens = JSON.parse(body); - this.getVWToken(tokens, tokens.id_token, reject, resolve); - return; - } - const dom = new JSDOM(body); const form = {}; const formLogin = dom.window.document.querySelector("#emailPasswordForm"); @@ -324,6 +313,7 @@ class VwWeconnect extends utils.Adapter { }, form: form, jar: this.jar, + gzip: true, followAllRedirects: true, }, (err, resp, body) => { @@ -366,6 +356,7 @@ class VwWeconnect extends utils.Adapter { }, form: form, jar: this.jar, + gzip: true, followAllRedirects: false, }, (err, resp, body) => { @@ -398,6 +389,7 @@ class VwWeconnect extends utils.Adapter { "x-requested-with": this.xrequest, }, jar: this.jar, + gzip: true, followAllRedirects: true, }, (err, resp, body) => { @@ -429,6 +421,7 @@ class VwWeconnect extends utils.Adapter { }, form: form, jar: this.jar, + gzip: true, followAllRedirects: true, }, (err, resp, body) => { @@ -513,6 +506,13 @@ class VwWeconnect extends utils.Adapter { // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; + let headers = { + // "user-agent": "okhttp/3.7.0", + "X-App-version": this.xappversion, + "content-type": "application/x-www-form-urlencoded", + "x-app-name": this.xappname, + accept: "application/json", + }; if (this.config.type === "vw") { body += "&code_verifier=" + code_verifier; } else { @@ -528,18 +528,17 @@ class VwWeconnect extends utils.Adapter { "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + code_verifier; } + if (this.config.type === "audi") { + this.getVWToken({}, jwtid_token, reject, resolve); + return; + } request.post( { url: url, - headers: { - // "user-agent": "okhttp/3.7.0", - "X-App-version": this.xappversion, - "content-type": "application/x-www-form-urlencoded", - "x-app-name": this.xappname, - accept: "application/json", - }, + headers: headers, body: body, jar: this.jar, + gzip: true, followAllRedirects: false, }, (err, resp, body) => { @@ -564,11 +563,13 @@ class VwWeconnect extends utils.Adapter { } getVWToken(tokens, jwtid_token, reject, resolve) { - this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; - this.refreshTokenInterval = setInterval(() => { - this.refreshToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours + if (this.config.type !== "audi") { + this.config.atoken = tokens.access_token; + this.config.rtoken = tokens.refresh_token; + this.refreshTokenInterval = setInterval(() => { + this.refreshToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + } if (this.config.type === "go") { resolve(); return; @@ -589,6 +590,7 @@ class VwWeconnect extends utils.Adapter { scope: "sc2:fal", }, jar: this.jar, + gzip: true, followAllRedirects: true, }, (err, resp, body) => { @@ -623,16 +625,8 @@ class VwWeconnect extends utils.Adapter { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; - } else if (this.config.type === "audi") { - url = "https://id.audi.com/v1/token"; - body = ""; - form = { - client_id: this.clientId, - grant_type: "refresh_token", - response_type: "token id_token", - refresh_token: rtoken, - }; - } else if (this.config.type === "go") { + } + else if (this.config.type === "go") { url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; body = ""; form = { @@ -886,6 +880,7 @@ class VwWeconnect extends utils.Adapter { accept: "application/json;charset=UTF-8", }; } + request.get( { url: url, @@ -1119,16 +1114,12 @@ class VwWeconnect extends utils.Adapter { } let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw") { + if (this.config.type !== "vw" && this.config.type !== "audi") { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); accept = "application/json"; } let atoken = this.config.vwatoken; - if (this.config.type === "audi") { - url = "https://msg.audi.de/myaudi/vehicle-management/v1/vehicles"; - atoken = this.config.atoken; - accept = "application/json"; - } + request.get( { url: url, @@ -1157,9 +1148,8 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); const adapter = this; let result = body.vehicleData; - if (this.config.type === "audi") { - const index = body.vehicles.findIndex((vehicle) => vehicle.vin === vin); - result = body.vehicles[index]; + if (!result) { + result = body.vehicleDataDetail } if (resp) { this.etags[url] = resp.headers.etag; @@ -1288,7 +1278,7 @@ class VwWeconnect extends utils.Adapter { try { const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); let accept = "application/json"; - if (this.config.type === "vw") { + if (this.config.type === "vw" || this.config.type === "audi") { accept = "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; } From bcbeec4d00783eceb38d8b2a7366ce77a1fc1a4d Mon Sep 17 00:00:00 2001 From: TA2K Date: Mon, 30 Nov 2020 02:12:35 +0100 Subject: [PATCH 172/729] 0.0.20 --- README.md | 40 ++++++++++++++++++++++------------------ admin/index_m.html | 1 + io-package.json | 5 ++++- main.js | 18 +++++++++++++++++- package.json | 2 +- 5 files changed, 45 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index bbd30c61..61c7a5ba 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ Use the state under remote control to control your car remotely. Door and window states: -- open: 1 -- locked: 2 -- closed: 3 +- open: 1 +- locked: 2 +- closed: 3 ### List of entries @@ -112,59 +112,63 @@ Door and window states: ## Changelog +### 0.0.20 + +- fix audi login, add ID login + ### 0.0.19 -- save status objects in state by id instead of consecutive numbers +- save status objects in state by id instead of consecutive numbers ### 0.0.18 -- fix battery status for 2020 models +- fix battery status for 2020 models ### 0.0.17 -- add support for 2020 models +- add support for 2020 models ### 0.0.16 -- fix js.controller 3 problems +- fix js.controller 3 problems ### 0.0.11 -- fix audi bug with multiple vehicles -- hide status update error if feature is not available +- fix audi bug with multiple vehicles +- hide status update error if feature is not available ### 0.0.9 -- set default trip type to none +- set default trip type to none ### 0.0.7 -- add we connect go and remote standheizung and lock/unlock +- add we connect go and remote standheizung and lock/unlock ### 0.0.6 -- add audi +- add audi ### 0.0.5 -- add honk and flash, fix address format +- add honk and flash, fix address format ### 0.0.4 -- add Skoda support +- add Skoda support ### 0.0.3 -- (ta2k) add more information -- (ta2k) add remote controls +- (ta2k) add more information +- (ta2k) add remote controls ### 0.0.2 -- (ta2k) add car status capturing +- (ta2k) add car status capturing ### 0.0.1 -- (ta2k) initial release +- (ta2k) initial release ## License diff --git a/admin/index_m.html b/admin/index_m.html index 793bf356..29c51acf 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -82,6 +82,7 @@
- + diff --git a/main.js b/main.js index 988880f0..c0903d7c 100644 --- a/main.js +++ b/main.js @@ -113,7 +113,7 @@ class VwWeconnect extends utils.Adapter { this.responseType = "id_token%20token%20code"; this.xappversion = "5.1.2"; this.xappname = "eRemote"; - if (this.config.type === "ID") { + if (this.config.type === "id") { this.type = "Id"; this.country = "DE"; this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; @@ -259,7 +259,7 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "go" || this.config.type === "audi2") { + if (this.config.type === "vw" || this.config.type === "go") { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } if (this.config.type === "audi") { @@ -1126,7 +1126,7 @@ class VwWeconnect extends utils.Adapter { } let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw" && this.config.type !== "audi") { + if (this.config.type !== "vw" && this.config.type !== "audi" && this.config.type !== "id") { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); accept = "application/json"; } From e150d2818d436660c3c6e02075dcf5caf317bdc0 Mon Sep 17 00:00:00 2001 From: TA2K Date: Mon, 30 Nov 2020 11:47:51 +0100 Subject: [PATCH 174/729] add error logging --- main.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index c0903d7c..25bc00d7 100644 --- a/main.js +++ b/main.js @@ -388,7 +388,19 @@ class VwWeconnect extends utils.Adapter { this.log.error("No userId found, please check your account"); return; } - this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; + this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; + if (!this.stringIsAValidUrl(resp.headers.location)) { + if (resp.headers.location.indexOf("&error=") !== -1){ + const location= resp.headers.location + this.log.error("Error: " +location.substring(location.indexOf("error=") ,location.length-1)) + + } else { + this.log.error("No valid login url, please download the log and visit:") + this.log.error("http://"+resp.request.host+resp.headers.location) + } + reject(); + return; + } let getRequest = request.get( { url: resp.headers.location, @@ -2011,7 +2023,15 @@ class VwWeconnect extends utils.Adapter { result.push(parseInt(hexString.substr(i, 2), 16)); } return result; - } + } + stringIsAValidUrl (s) { + try { + new URL(s); + return true; + } catch (err) { + return false; + } + }; /** * Is called when adapter shuts down - callback has to be called under any circumstances! * @param {() => void} callback From d66e1085d98c97fcc9229ec5a33a65a7b24e92b4 Mon Sep 17 00:00:00 2001 From: TA2K Date: Wed, 2 Dec 2020 01:21:30 +0100 Subject: [PATCH 175/729] fixed id login --- main.js | 384 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 322 insertions(+), 62 deletions(-) diff --git a/main.js b/main.js index 25bc00d7..dfc066b1 100644 --- a/main.js +++ b/main.js @@ -14,6 +14,7 @@ const { Crypto } = require("@peculiar/webcrypto"); const uuidv4 = require("uuid/v4"); const traverse = require("traverse"); const jsdom = require("jsdom"); +const { resolve } = require("path"); const { JSDOM } = jsdom; class VwWeconnect extends utils.Adapter { /** @@ -119,7 +120,7 @@ class VwWeconnect extends utils.Adapter { this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; this.xclientId = ""; this.scope = "openid profile badge cars dealers birthdate vin"; - this.redirect = "https://login.apps.emea.vwapps.io/authorize/v2/callback"; + this.redirect = "weconnect://authenticated"; this.xrequest = "com.volkswagen.weconnect"; this.responseType = "code id_token token"; this.xappversion = ""; @@ -172,29 +173,35 @@ class VwWeconnect extends utils.Adapter { .then(() => { if (this.config.type !== "go") { this.vinArray.forEach((vin) => { - this.getHomeRegion(vin) - .catch(() => { - this.log.debug("get home region Failed"); - }) - .finally(() => { - this.getVehicleData(vin).catch(() => { - this.log.error("get vehicle data Failed"); - }); - this.getVehicleRights(vin).catch(() => { - this.log.error("get vehicle rights Failed"); - }); - this.requestStatusUpdate(vin) - .then(() => { - this.statesArray.forEach((state) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { - this.log.debug("error while getting " + state.url); + if (this.config.type === "id") { + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + }); + } else { + this.getHomeRegion(vin) + .catch(() => { + this.log.debug("get home region Failed"); + }) + .finally(() => { + this.getVehicleData(vin).catch(() => { + this.log.error("get vehicle data Failed"); + }); + this.getVehicleRights(vin).catch(() => { + this.log.error("get vehicle rights Failed"); + }); + this.requestStatusUpdate(vin) + .then(() => { + this.statesArray.forEach((state) => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { + this.log.debug("error while getting " + state.url); + }); }); + }) + .catch(() => { + this.log.error("status update Failed"); }); - }) - .catch(() => { - this.log.error("status update Failed"); - }); - }); + }); + } }); } @@ -202,7 +209,15 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "go") { this.getVehicles(); return; - } + }else + if (this.config.type === "id") { + this.vinArray.forEach((vin) => { + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + this.refreshIDToken(); + }); + }); + } else { this.vinArray.forEach((vin) => { this.statesArray.forEach((state) => { this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { @@ -210,7 +225,9 @@ class VwWeconnect extends utils.Adapter { }); }); }); - }, this.config.interval * 60 * 1000); + } + }, this.config.interval *60* 1000); + if (this.config.forceinterval > 0) { this.fupdateInterval = setInterval(() => { if (this.config.type === "go") { @@ -239,9 +256,10 @@ class VwWeconnect extends utils.Adapter { this.subscribeStates("*"); } login() { - return new Promise((resolve, reject) => { - const nonce = this.getNonce(); - const state = uuidv4(); + return new Promise(async (resolve, reject) => { + let nonce = this.getNonce(); + let state = uuidv4(); + const [code_verifier, codeChallenge] = this.getCodeChallenge(); let method = "GET"; @@ -265,7 +283,9 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "audi") { url += "&ui_locales=de-DE%20de&prompt=login"; } - + if (this.config.type === "id") { + url = await this.receiveLoginUrl(); + } const loginRequest = request( { method: method, @@ -388,19 +408,18 @@ class VwWeconnect extends utils.Adapter { this.log.error("No userId found, please check your account"); return; } - this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; - if (!this.stringIsAValidUrl(resp.headers.location)) { - if (resp.headers.location.indexOf("&error=") !== -1){ - const location= resp.headers.location - this.log.error("Error: " +location.substring(location.indexOf("error=") ,location.length-1)) - - } else { - this.log.error("No valid login url, please download the log and visit:") - this.log.error("http://"+resp.request.host+resp.headers.location) - } - reject(); - return; - } + this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; + if (!this.stringIsAValidUrl(resp.headers.location)) { + if (resp.headers.location.indexOf("&error=") !== -1) { + const location = resp.headers.location; + this.log.error("Error: " + location.substring(location.indexOf("error="), location.length - 1)); + } else { + this.log.error("No valid login url, please download the log and visit:"); + this.log.error("http://" + resp.request.host + resp.headers.location); + } + reject(); + return; + } let getRequest = request.get( { url: resp.headers.location, @@ -488,7 +507,36 @@ class VwWeconnect extends utils.Adapter { ); }); } - + receiveLoginUrl() { + return new Promise((resolve, reject) => { + request( + { + method: "GET", + url: "https://login.apps.emea.vwapps.io/authorize?nonce=NZ2Q3T6jak0E5pDh&redirect_uri=weconnect://authenticated", + headers: { + Host: "login.apps.emea.vwapps.io", + "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1", + accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "accept-language": "de-de", + }, + jar: this.jar, + gzip: true, + followAllRedirects: false, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed in receive login url "); + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + resolve(resp.request.href); + } + ); + }); + } replaceVarInUrl(url, vin) { return url .replace("/$vin/", "/" + vin + "/") @@ -509,6 +557,7 @@ class VwWeconnect extends utils.Adapter { let jwtauth_code; let jwtaccess_token; let jwtid_token; + let jwtstate; hashArray.forEach((hash) => { const harray = hash.split("="); if (harray[0] === "#state" || harray[0] === "state") { @@ -523,6 +572,9 @@ class VwWeconnect extends utils.Adapter { if (harray[0] === "id_token") { jwtid_token = harray[1]; } + if (harray[0] === "#state") { + jwtstate = harray[1]; + } }); // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); @@ -552,6 +604,25 @@ class VwWeconnect extends utils.Adapter { "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + code_verifier; } + if (this.config.type === "id") { + url = "https://login.apps.emea.vwapps.io/login/v1"; + body = JSON.stringify({ + state: jwtstate, + id_token: jwtid_token, + redirect_uri: "weconnect://authenticated", + region: "emea", + access_token: jwtaccess_token, + authorizationCode: jwtauth_code, + }); + headers = { + Host: "login.apps.emea.vwapps.io", + accept: "*/*", + "content-type": "application/json", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "accept-language": "de-de", + }; + } if (this.config.type === "audi") { this.getVWToken({}, jwtid_token, reject, resolve); return; @@ -590,11 +661,20 @@ class VwWeconnect extends utils.Adapter { if (this.config.type !== "audi") { this.config.atoken = tokens.access_token; this.config.rtoken = tokens.refresh_token; + if (this.config.type === "id") { + this.config.atoken = tokens.accessToken; + this.config.rtoken = tokens.refreshToken; + this.refreshTokenInterval = setInterval(() => { + this.refreshIDToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + resolve(); + return; + } this.refreshTokenInterval = setInterval(() => { this.refreshToken().catch(() => {}); }, 0.9 * 60 * 60 * 1000); // 0.9hours } - if (this.config.type === "go") { + if (this.config.type === "go" || this.config.type === "id") { resolve(); return; } @@ -649,8 +729,7 @@ class VwWeconnect extends utils.Adapter { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; - } - else if (this.config.type === "go") { + } else if (this.config.type === "go") { url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; body = ""; form = { @@ -709,6 +788,10 @@ class VwWeconnect extends utils.Adapter { if (tokens.refresh_token) { this.config.rtoken = tokens.refresh_token; } + if (tokens.accessToken) { + this.config.atoken = tokens.accessToken; + this.config.rtoken = tokens.refreshToken; + } } resolve(); } catch (err) { @@ -726,7 +809,7 @@ class VwWeconnect extends utils.Adapter { getPersonalData() { return new Promise((resolve, reject) => { - if (this.config.type === "audi" || this.config.type === "go") { + if (this.config.type === "audi" || this.config.type === "go" || this.config.type === "id") { resolve(); return; } @@ -904,7 +987,18 @@ class VwWeconnect extends utils.Adapter { accept: "application/json;charset=UTF-8", }; } - + if (this.config.type === "id") { + url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; + headers = { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }; + } request.get( { url: url, @@ -926,6 +1020,56 @@ class VwWeconnect extends utils.Adapter { return; } this.log.debug(JSON.stringify(body)); + if (this.config.type === "id") { + body.data.forEach((element) => { + const vin = element.vin; + + this.vinArray.push(vin); + this.setObjectNotExists(element.vin, { + type: "device", + common: { + name: element.nickname, + role: "indicator", + type: "mixed", + write: false, + + read: true, + }, + native: {}, + }); + const adapter = this; + + traverse(element).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); + } + }); + }); + resolve(); + return; + } if (this.config.type === "go") { body.forEach((element) => { const vin = element.vehicle.vin; @@ -1129,7 +1273,114 @@ class VwWeconnect extends utils.Adapter { ); }); } + getIdStatus(vin) { + return new Promise((resolve, reject) => { + request.get( + { + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/status", + + headers: { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + + reject(); + return; + } + try { + const adapter = this; + traverse(body.data).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + if (modPath[modPath.length - 1] !== "$") { + adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + } + } + }); + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + refreshIDToken() { + return new Promise((resolve, reject) => { + request.get( + { + url: "https://login.apps.emea.vwapps.io/refresh/v1", + headers: { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "accept-language": "de-de", + authorization: "Bearer " + this.config.rtoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + + reject(); + return; + } + try { + this.config.atoken = body.accessToken; + this.config.rtoken = body.refreshToken; + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } getVehicleData(vin) { return new Promise((resolve, reject) => { if (this.config.type === "go") { @@ -1143,7 +1394,7 @@ class VwWeconnect extends utils.Adapter { accept = "application/json"; } let atoken = this.config.vwatoken; - + request.get( { url: url, @@ -1173,7 +1424,7 @@ class VwWeconnect extends utils.Adapter { const adapter = this; let result = body.vehicleData; if (!result) { - result = body.vehicleDataDetail + result = body.vehicleDataDetail; } if (resp) { this.etags[url] = resp.headers.etag; @@ -1300,10 +1551,10 @@ class VwWeconnect extends utils.Adapter { requestStatusUpdate(vin) { return new Promise((resolve, reject) => { try { - if (this.config.type === "audi" ){ - resolve(); - return; - } + if (this.config.type === "audi") { + resolve(); + return; + } const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); let accept = "application/json"; if (this.config.type === "vw") { @@ -2023,15 +2274,24 @@ class VwWeconnect extends utils.Adapter { result.push(parseInt(hexString.substr(i, 2), 16)); } return result; - } - stringIsAValidUrl (s) { - try { - new URL(s); - return true; - } catch (err) { - return false; - } - }; + } + stringIsAValidUrl(s) { + try { + new URL(s); + return true; + } catch (err) { + return false; + } + } + randomString(length) { + var result = ""; + var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + var charactersLength = characters.length; + for (var i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; + } /** * Is called when adapter shuts down - callback has to be called under any circumstances! * @param {() => void} callback From e66f1b9d2ca4e18a78c58a2068d40bef9e29758b Mon Sep 17 00:00:00 2001 From: TA2K Date: Wed, 2 Dec 2020 12:03:28 +0100 Subject: [PATCH 176/729] 0.0.21 --- README.md | 4 ++ io-package.json | 5 +- main.js | 141 ++++++++++++++++++++++++++++++++++++++++-------- package.json | 2 +- 4 files changed, 128 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 61c7a5ba..c6d162fc 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.21 + +- add remotes for id + ### 0.0.20 - fix audi login, add ID login diff --git a/io-package.json b/io-package.json index c7fd782c..94ab8565 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.20", + "version": "0.0.21", "news": { + "0.0.21": { + "en": "add remotes for id" + }, "0.0.20": { "en": "fix audi login, add ID login" }, diff --git a/main.js b/main.js index dfc066b1..1556f09e 100644 --- a/main.js +++ b/main.js @@ -209,8 +209,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "go") { this.getVehicles(); return; - }else - if (this.config.type === "id") { + } else if (this.config.type === "id") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); @@ -218,16 +217,16 @@ class VwWeconnect extends utils.Adapter { }); }); } else { - this.vinArray.forEach((vin) => { - this.statesArray.forEach((state) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); + this.vinArray.forEach((vin) => { + this.statesArray.forEach((state) => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); }); }); - }); - } - }, this.config.interval *60* 1000); - + } + }, this.config.interval * 60 * 1000); + if (this.config.forceinterval > 0) { this.fupdateInterval = setInterval(() => { if (this.config.type === "go") { @@ -1066,6 +1065,35 @@ class VwWeconnect extends utils.Adapter { adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); } }); + + this.setObjectNotExists(vin + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.charging", { + type: "state", + common: { + name: "Start/Stop Battery Charge", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.climatisation", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); }); resolve(); return; @@ -1167,7 +1195,7 @@ class VwWeconnect extends utils.Adapter { type: "state", common: { name: "Temperature in °C", - type: "boolean", + type: "number", role: "number", write: true, }, @@ -1296,7 +1324,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); resp && this.log.error(resp.statusCode); - + reject(); return; } @@ -1322,7 +1350,7 @@ class VwWeconnect extends utils.Adapter { name: this.key, role: "indicator", type: "mixed", - write: false, + write: true, read: true, }, native: {}, @@ -1341,6 +1369,61 @@ class VwWeconnect extends utils.Adapter { ); }); } + async setIdRemote(vin, action, bool) { + return new Promise(async (resolve, reject) => { + const pre = this.name + "." + this.instance; + const startstop = bool ? "start" : "stop"; + let body = {}; + if (action === "climatisation" && bool) { + const climateStates = await this.getStatesAsync(pre + "." + vin + ".status.climatisationSettings.*"); + body = {}; + const allIds = Object.keys(climateStates); + allIds.forEach((keyName) => { + const key = keyName.split(".").splice(-1)[0]; + if (key.indexOf("Timestamp") === -1 ) { + body[key] = climateStates[keyName].val; + } + }); + + // body = JSON.stringify(body); + } + + request.post( + { + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/WVWZZZE1ZLP009119/climatisation/stop",//"https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + startstop, + + headers: { + "content-type": "application/json", + "accept": "*/*", + "accept-language": "de-de", + "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + authorization: "Bearer " + this.config.atoken, + }, + body:body, + followAllRedirects: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } refreshIDToken() { return new Promise((resolve, reject) => { request.get( @@ -1364,7 +1447,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); resp && this.log.error(resp.statusCode); - + reject(); return; } @@ -2334,16 +2417,30 @@ class VwWeconnect extends utils.Adapter { this.log.error("failed set state"); }); } - + if (action === "charging") { + if (this.config.type === "id") { + this.setIdRemote(vin, action, state.val).catch(() => { + this.log.error("failed set state " +action); + }); + return; + } + } if (action === "climatisation") { - body = '\n\n startClimatisation\n'; - if (state.val === false) { - body = '\n\n stopClimatisation\n'; + if (this.config.type === "id") { + this.setIdRemote(vin, action, state.val).catch(() => { + this.log.error("failed set state " +action); + });; + return; + } else { + body = '\n\n startClimatisation\n'; + if (state.val === false) { + body = '\n\n stopClimatisation\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { + this.log.error("failed set state"); + }); } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); } if (action === "ventilation") { diff --git a/package.json b/package.json index 01b7ddec..f8f945ae 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.20" + "version": "0.0.21" } \ No newline at end of file From 1e067d48397358943d3d10cf8ae741e3d0135f43 Mon Sep 17 00:00:00 2001 From: TA2K Date: Wed, 2 Dec 2020 13:28:13 +0100 Subject: [PATCH 177/729] add id in readme --- README.md | 2 +- io-package.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c6d162fc..b1bf98e2 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## vw-connect adapter for ioBroker -Adapter for VW We Connect, myAudi, Skoda Connect and We Connect Go +Adapter for VW We Connect, We Connect ID, myAudi, Skoda Connect and We Connect Go Please update your system on Node 10. diff --git a/io-package.json b/io-package.json index 94ab8565..063fe106 100644 --- a/io-package.json +++ b/io-package.json @@ -98,6 +98,8 @@ "Skoda", "Skoda Connect", "VW Connect", + "VW Connect ID", + "ID.3", "VW Connect Go" ], "license": "MIT", From 27db43cf617d6434bd0dc66bb292de970b8e6723 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 6 Dec 2020 20:00:17 +0100 Subject: [PATCH 178/729] Update io-package.json --- io-package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io-package.json b/io-package.json index 063fe106..1e678bd4 100644 --- a/io-package.json +++ b/io-package.json @@ -113,6 +113,8 @@ "mode": "daemon", "type": "vehicle", "compact": true, + "connectionType": "cloud", + "dataSource": "poll", "materialize": true, "plugins": { "sentry": { @@ -167,4 +169,4 @@ "native": {} } ] -} \ No newline at end of file +} From 7bb12c2095f5c14ea898090ecb384ae1d8a869d9 Mon Sep 17 00:00:00 2001 From: TA2K Date: Sun, 13 Dec 2020 00:09:17 +0100 Subject: [PATCH 179/729] add id settings --- main.js | 154 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 136 insertions(+), 18 deletions(-) diff --git a/main.js b/main.js index 1556f09e..aacfd331 100644 --- a/main.js +++ b/main.js @@ -1094,6 +1094,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.targetSOC", { + type: "state", + common: { + name: "Target SOC, Ladegrenze", + type: "number", + role: "number", + write: true, + }, + native: {}, + }); }); resolve(); return; @@ -1251,6 +1261,26 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.standheizungv2", { + type: "state", + common: { + name: "Standheizung aktiviert", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.lockv2", { + type: "state", + common: { + name: "Verriegeln (true) / Entriegeln (false)", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vehicle + ".remote.ventilation", { type: "state", common: { @@ -1369,39 +1399,42 @@ class VwWeconnect extends utils.Adapter { ); }); } - async setIdRemote(vin, action, bool) { + async setIdRemote(vin, action, value, bodyContent) { return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; - const startstop = bool ? "start" : "stop"; - let body = {}; - if (action === "climatisation" && bool) { + let body = bodyContent || {}; + if (action === "climatisation" && value === "start") { const climateStates = await this.getStatesAsync(pre + "." + vin + ".status.climatisationSettings.*"); body = {}; const allIds = Object.keys(climateStates); allIds.forEach((keyName) => { const key = keyName.split(".").splice(-1)[0]; - if (key.indexOf("Timestamp") === -1 ) { + if (key.indexOf("Timestamp") === -1) { body[key] = climateStates[keyName].val; } }); // body = JSON.stringify(body); } - - request.post( + let method = "POST"; + if (value === "settings") { + method = "PUT"; + } + request( { - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/WVWZZZE1ZLP009119/climatisation/stop",//"https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + startstop, + method: method, + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value, headers: { "content-type": "application/json", - "accept": "*/*", + accept: "*/*", "accept-language": "de-de", "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", "content-version": "1", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", authorization: "Bearer " + this.config.atoken, }, - body:body, + body: body, followAllRedirects: true, json: true, }, @@ -2211,6 +2244,59 @@ class VwWeconnect extends utils.Adapter { ); }); } + setVehicleStatusv2(vin, url, body, contentType, secToken) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + this.log.debug(body); + this.log.debug(contentType); + const headers = { + "User-Agent": "okhttp/3.7.0", + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + "Content-Type": contentType, + Accept: + "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*", + }; + if (secToken) { + headers["x-mbbSecToken"] = secToken; + } + + request.post( + { + url: url, + headers: headers, + body: body, + followAllRedirects: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + reject(); + return; + } + try { + this.log.debug(body); + if (body.indexOf("") !== -1) { + this.log.error("Error response try to refresh token " + url); + this.log.error(JSON.stringify(body)); + this.refreshToken(true); + reject(); + return; + } + this.log.info(body); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); + reject(); + } + } + ); + }); + } requestSecToken(vin, service) { return new Promise((resolve, reject) => { request.get( @@ -2419,17 +2505,38 @@ class VwWeconnect extends utils.Adapter { } if (action === "charging") { if (this.config.type === "id") { - this.setIdRemote(vin, action, state.val).catch(() => { - this.log.error("failed set state " +action); + const value = state.val ? "start" : "stop"; + this.setIdRemote(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } + if (action === "targetSOC") { + if (this.config.type === "id") { + const pre = this.name + "." + this.instance; + const climateStates = await this.getStatesAsync(pre + "." + vin + ".status.chargingSettings.*"); + let body = {}; + const allIds = Object.keys(climateStates); + allIds.forEach((keyName) => { + const key = keyName.split(".").splice(-1)[0]; + if (key.indexOf("Timestamp") === -1) { + body[key] = climateStates[keyName].val; + } + }); + body["targetSOC_pct"] = state.val; + this.setIdRemote(vin, "charging", "settings", body).catch(() => { + this.log.error("failed set state " + action); }); return; } } if (action === "climatisation") { if (this.config.type === "id") { - this.setIdRemote(vin, action, state.val).catch(() => { - this.log.error("failed set state " +action); - });; + const value = state.val ? "start" : "stop"; + this.setIdRemote(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); return; } else { body = '\n\n startClimatisation\n'; @@ -2534,7 +2641,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("failed set state"); }); } - if (action === "standheizung") { + if (action === "standheizung" || action === "standheizungv2") { body = '\n\n \n true\n \n'; if (state.val === false) { @@ -2542,12 +2649,20 @@ class VwWeconnect extends utils.Adapter { '\n\n \n false\n \n'; } contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + if (action === "standheizungv2") { + body = '{"performAction":{"quickstart":{"startMode":"heating","active":true,"climatisationDuration":30}}}'; + if (state.val === false) { + body = '{"performAction":{"quickstop":{"active":false}}}'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; + } + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { this.log.error("failed set state"); }); } - if (action === "lock") { + if (action === "lock" || action === "lockv2") { body = '\n\n lock\n'; let lockAction = "LOCK"; if (state.val === false) { @@ -2562,8 +2677,11 @@ class VwWeconnect extends utils.Adapter { } } } else { + const vin = id.split(".")[2]; + if (id.indexOf("targetSOC_pct") !== -1) { + this.setState(vin + ".remote.targetSOC", state.val, true); + } if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - const vin = id.split(".")[2]; const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); const longitudeValue = parseFloat(longitude.val); From 562d1a8321ae986cfcb1dda232fe66533fa0b632 Mon Sep 17 00:00:00 2001 From: TA2K Date: Sun, 13 Dec 2020 14:13:23 +0100 Subject: [PATCH 180/729] add ventilation --- main.js | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index aacfd331..af05d084 100644 --- a/main.js +++ b/main.js @@ -1062,6 +1062,9 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + if (typeof value === "object") { + value = JSON.stringify(value); + } adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); } }); @@ -1151,6 +1154,10 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + + if (typeof value === "object") { + value = JSON.stringify(value); + } adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); } }); @@ -1261,10 +1268,20 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.ventilation", { + type: "state", + common: { + name: "Ventilation aktiviert/deaktivieren", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vehicle + ".remote.standheizungv2", { type: "state", common: { - name: "Standheizung aktiviert", + name: "Standheizung aktiviert/deaktivieren", type: "boolean", role: "switch", write: true, @@ -1385,6 +1402,10 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + + if (typeof value === "object") { + value = JSON.stringify(value); + } adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); } } @@ -1574,6 +1595,10 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + + if (typeof value === "object") { + value = JSON.stringify(value); + } adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); } }); @@ -1649,6 +1674,10 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + + if (typeof value === "object") { + value = JSON.stringify(value); + } adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); } } @@ -1950,6 +1979,10 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + + if (typeof value === "object") { + value = JSON.stringify(value); + } adapter.setState(newPath, value || this.node, true); if (isStatusData && this.key == "value") { if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { @@ -2641,6 +2674,18 @@ class VwWeconnect extends utils.Adapter { this.log.error("failed set state"); }); } + if (action === "ventilation") { + body = '{"performAction":{"quickstart":{"startMode":"ventilation","active":true,"climatisationDuration":30}}}'; + if (state.val === false) { + body = '{"performAction":{"quickstop":{"active":false}}}'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "standheizung" || action === "standheizungv2") { body = '\n\n \n true\n \n'; From abe7ad97301ba929480308fe070fb852754ae2ce Mon Sep 17 00:00:00 2001 From: TA2K Date: Sun, 13 Dec 2020 14:17:09 +0100 Subject: [PATCH 181/729] Update main.js --- main.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/main.js b/main.js index af05d084..934bf3d2 100644 --- a/main.js +++ b/main.js @@ -1268,7 +1268,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.ventilation", { + this.setObjectNotExists(vehicle + ".remote.ventilationv2", { type: "state", common: { name: "Ventilation aktiviert/deaktivieren", @@ -2583,7 +2583,7 @@ class VwWeconnect extends utils.Adapter { } } - if (action === "ventilation") { + if (action === "ventilation" || action === "ventilationv2") { const idArray = id.split("."); idArray.pop(); idArray.push(action + "Duration"); @@ -2604,6 +2604,18 @@ class VwWeconnect extends utils.Adapter { '\n\n \n false\n \n'; } contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; + if (action === "ventilationv2") { + body = '{"performAction":{"quickstart":{"startMode":"ventilation","active":true,"climatisationDuration":' + duration + "}}}"; + if (state.val === false) { + body = '{"performAction":{"quickstop":{"active":false}}}'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; + } + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { this.log.error("failed set state"); @@ -2674,17 +2686,6 @@ class VwWeconnect extends utils.Adapter { this.log.error("failed set state"); }); } - if (action === "ventilation") { - body = '{"performAction":{"quickstart":{"startMode":"ventilation","active":true,"climatisationDuration":30}}}'; - if (state.val === false) { - body = '{"performAction":{"quickstop":{"active":false}}}'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } if (action === "standheizung" || action === "standheizungv2") { body = From 7ffea6574e503ffcc19dde42deda2ce81e98aac9 Mon Sep 17 00:00:00 2001 From: TA2K Date: Sun, 13 Dec 2020 14:24:48 +0100 Subject: [PATCH 182/729] Update main.js --- main.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/main.js b/main.js index 934bf3d2..db2cd38d 100644 --- a/main.js +++ b/main.js @@ -2611,10 +2611,6 @@ class VwWeconnect extends utils.Adapter { } contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; } - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { From 36230c91f6da01366901f84081748714e0b8b89f Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 18 Dec 2020 22:38:06 +0100 Subject: [PATCH 183/729] add debug --- main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.js b/main.js index db2cd38d..19dd7afa 100644 --- a/main.js +++ b/main.js @@ -216,6 +216,7 @@ class VwWeconnect extends utils.Adapter { this.refreshIDToken(); }); }); + return; } else { this.vinArray.forEach((vin) => { this.statesArray.forEach((state) => { @@ -1375,6 +1376,7 @@ class VwWeconnect extends utils.Adapter { reject(); return; } + this.log.debug(JSON.stringify(body)); try { const adapter = this; traverse(body.data).forEach(function (value) { @@ -1441,6 +1443,8 @@ class VwWeconnect extends utils.Adapter { if (value === "settings") { method = "PUT"; } + this.log.debug("https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value); + this.log.debug(JSON.stringify(body)); request( { method: method, @@ -1458,6 +1462,7 @@ class VwWeconnect extends utils.Adapter { body: body, followAllRedirects: true, json: true, + gzip: true, }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { From 38821e5584003ba8b8b704efc4ab06137e63e38b Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 09:55:45 +0100 Subject: [PATCH 184/729] =?UTF-8?q?v0.0.22=20calculate=20outside=20tempera?= =?UTF-8?q?tur=20in=20=C2=B0C=20also=20for=20Skoda=20and=20Audi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ io-package.json | 5 ++++- main.js | 2 ++ package.json | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b1bf98e2..4f12c99b 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.22 + +- calculate outside temperatur in °C also for Skoda and Audi + ### 0.0.21 - add remotes for id diff --git a/io-package.json b/io-package.json index 1e678bd4..39151c8c 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.21", + "version": "0.0.22", "news": { + "0.0.22": { + "en": "calculate outside temperatur in °C also for Skoda and Audi" + }, "0.0.21": { "en": "add remotes for id" }, diff --git a/main.js b/main.js index 19dd7afa..e906442e 100644 --- a/main.js +++ b/main.js @@ -1998,6 +1998,8 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } + if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) + adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } else if (isStatusData && isNumberNode) { var text = null; if (this.node.textId) { diff --git a/package.json b/package.json index f8f945ae..7c4a9594 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.21" + "version": "0.0.22" } \ No newline at end of file From f44d5b945ceb9653743ffef037d2d9667ad89d4a Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 14:52:20 +0100 Subject: [PATCH 185/729] create CarLocked and Temperature state only if value are present --- main.js | 64 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/main.js b/main.js index e906442e..e8654768 100644 --- a/main.js +++ b/main.js @@ -1888,32 +1888,6 @@ class VwWeconnect extends utils.Adapter { adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); } - if (isStatusData) { - this.setObjectNotExists(vin + ".status.isCarLocked", { - type: "state", - common: { - name: "is car locked", - role: "indicator", - type: "boolean", - write: false, - read: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".status.outsideTemperature", { - type: "state", - common: { - name: "outside temperature", - role: "value.temperature", - type: "number", - unit: "°C", - write: false, - read: true, - }, - native: {}, - }); - } - var statusKeys = null; if (isStatusData) { statusKeys = this.getStatusKeys(result); @@ -1991,15 +1965,16 @@ class VwWeconnect extends utils.Adapter { adapter.setState(newPath, value || this.node, true); if (isStatusData && this.key == "value") { if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { - adapter.setState(vin + "." + path + ".isCarLocked", value == 2, true); + setIsCarLocked(vin, value); } if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { - adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + setOutsideTemperature(von, value); } adapter.updateUnit(newPath, fieldUnit); } + adapter.log(newPath); if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) - adapter.setState(vin + "." + path + ".outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + setOutsideTemperature(vin, value); } else if (isStatusData && isNumberNode) { var text = null; if (this.node.textId) { @@ -2053,6 +2028,37 @@ class VwWeconnect extends utils.Adapter { }); } + setIsCarLocked(vin, value) { + this.setObjectNotExists(vin + ".status.isCarLocked", { + type: "state", + common: { + name: "is car locked", + role: "indicator", + type: "boolean", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + ".status.isCarLocked", value == 2, true); + } + + setOutsideTemperature(vin, value) { + this.setObjectNotExists(vin + ".status.outsideTemperature", { + type: "state", + common: { + name: "outside temperature", + role: "value.temperature", + type: "number", + unit: "°C", + write: false, + read: true, + }, + native: {}, + }); + adapter.setState(vin + ".status.outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + } + getStatusKeys(statusJson) { const adapter = this; var result = null; From e80005f5731fe205d315fcce3df7729b5f91c969 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 15:04:09 +0100 Subject: [PATCH 186/729] test --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index e8654768..a2f36365 100644 --- a/main.js +++ b/main.js @@ -1943,6 +1943,7 @@ class VwWeconnect extends utils.Adapter { } } }); + adapter.log.info("-->" + path + '/' + modPath.join(".")); if (!skipNode) { const newPath = vin + "." + path + "." + modPath.join("."); if (this.path.length > 0 && this.isLeaf) { @@ -1972,7 +1973,7 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } - adapter.log(newPath); + adapter.log.info("newPath =" + newPath); if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) setOutsideTemperature(vin, value); } else if (isStatusData && isNumberNode) { From 60a1cad6b1d07dc5debf2714ed566f4c3281238f Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 15:22:52 +0100 Subject: [PATCH 187/729] drop log messages --- main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index a2f36365..dd6a4b8b 100644 --- a/main.js +++ b/main.js @@ -1943,7 +1943,6 @@ class VwWeconnect extends utils.Adapter { } } }); - adapter.log.info("-->" + path + '/' + modPath.join(".")); if (!skipNode) { const newPath = vin + "." + path + "." + modPath.join("."); if (this.path.length > 0 && this.isLeaf) { @@ -1973,9 +1972,9 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } - adapter.log.info("newPath =" + newPath); - if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) + if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { setOutsideTemperature(vin, value); + } } else if (isStatusData && isNumberNode) { var text = null; if (this.node.textId) { From 03e014e8304b7696596223bfa5395c4d4e0c8a69 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 16:01:00 +0100 Subject: [PATCH 188/729] bugifx --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index dd6a4b8b..d2af2f84 100644 --- a/main.js +++ b/main.js @@ -1963,6 +1963,9 @@ class VwWeconnect extends utils.Adapter { value = JSON.stringify(value); } adapter.setState(newPath, value || this.node, true); + if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { + setOutsideTemperature(vin, value); + } if (isStatusData && this.key == "value") { if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { setIsCarLocked(vin, value); @@ -1972,9 +1975,6 @@ class VwWeconnect extends utils.Adapter { } adapter.updateUnit(newPath, fieldUnit); } - if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { - setOutsideTemperature(vin, value); - } } else if (isStatusData && isNumberNode) { var text = null; if (this.node.textId) { From 6b2a50ef5abdeecfe6aaef121261ef66804ebf27 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 16:24:42 +0100 Subject: [PATCH 189/729] alternative dataIds for Skoda and Audi --- main.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index d2af2f84..68354783 100644 --- a/main.js +++ b/main.js @@ -1963,14 +1963,15 @@ class VwWeconnect extends utils.Adapter { value = JSON.stringify(value); } adapter.setState(newPath, value || this.node, true); - if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { - setOutsideTemperature(vin, value); - } + //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { + // setOutsideTemperature(vin, value); + //} if (isStatusData && this.key == "value") { - if (dataId == "0x030104FFFF" && fieldId == "0x0301040001") { + // Audi and Skoda have different (shorter) dataId + if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { setIsCarLocked(vin, value); } - if (dataId == "0x030102FFFF" && fieldId == "0x0301020001") { + if ((dataId == "0x030102FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301020001") { setOutsideTemperature(von, value); } adapter.updateUnit(newPath, fieldUnit); From 0321309f83c0a4905d8ef901e152c2e74795c566 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 18:49:36 +0100 Subject: [PATCH 190/729] bugifx --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 68354783..c7872991 100644 --- a/main.js +++ b/main.js @@ -1969,10 +1969,10 @@ class VwWeconnect extends utils.Adapter { if (isStatusData && this.key == "value") { // Audi and Skoda have different (shorter) dataId if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { - setIsCarLocked(vin, value); + adapter.setIsCarLocked(vin, value); } if ((dataId == "0x030102FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301020001") { - setOutsideTemperature(von, value); + adapter.setOutsideTemperature(von, value); } adapter.updateUnit(newPath, fieldUnit); } From 344a10aedbe08f21fb24a3df136a84f16b663ccd Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 19:14:23 +0100 Subject: [PATCH 191/729] bugfix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index c7872991..151db0bd 100644 --- a/main.js +++ b/main.js @@ -1972,7 +1972,7 @@ class VwWeconnect extends utils.Adapter { adapter.setIsCarLocked(vin, value); } if ((dataId == "0x030102FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301020001") { - adapter.setOutsideTemperature(von, value); + adapter.setOutsideTemperature(vin, value); } adapter.updateUnit(newPath, fieldUnit); } From 135f689d6525e9f95af8b7db99d95e8ed6747fab Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 1 Jan 2021 22:35:06 +0100 Subject: [PATCH 192/729] bigfix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 151db0bd..77edc4f7 100644 --- a/main.js +++ b/main.js @@ -2041,7 +2041,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - adapter.setState(vin + ".status.isCarLocked", value == 2, true); + this.setState(vin + ".status.isCarLocked", value == 2, true); } setOutsideTemperature(vin, value) { @@ -2057,7 +2057,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - adapter.setState(vin + ".status.outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + this.setState(vin + ".status.outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } getStatusKeys(statusJson) { From d55a5c154d9130ec2bcb475c387d03701a0ab717 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 3 Jan 2021 00:15:24 +0100 Subject: [PATCH 193/729] change travers for id add write to settings --- main.js | 204 +++++++++++++++++++++++++++----------------------------- 1 file changed, 98 insertions(+), 106 deletions(-) diff --git a/main.js b/main.js index 77edc4f7..7daaf074 100644 --- a/main.js +++ b/main.js @@ -1038,37 +1038,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); const adapter = this; - - traverse(element).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); - } - }); + this.extractKeys(vin + ".general", element); this.setObjectNotExists(vin + ".remote", { type: "state", @@ -1098,16 +1068,6 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.targetSOC", { - type: "state", - common: { - name: "Target SOC, Ladegrenze", - type: "number", - role: "number", - write: true, - }, - native: {}, - }); }); resolve(); return; @@ -1144,6 +1104,7 @@ class VwWeconnect extends utils.Adapter { modPath.splice(parentIndex + 1, 1); } }); + adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { type: "state", common: { @@ -1378,41 +1339,7 @@ class VwWeconnect extends utils.Adapter { } this.log.debug(JSON.stringify(body)); try { - const adapter = this; - traverse(body.data).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - if (modPath[modPath.length - 1] !== "$") { - adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: true, - read: true, - }, - native: {}, - }); - - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); - } - } - }); - + this.extractKeys(vin + ".status", body.data); resolve(); } catch (err) { this.log.error(err); @@ -1422,7 +1349,7 @@ class VwWeconnect extends utils.Adapter { ); }); } - async setIdRemote(vin, action, value, bodyContent) { + setIdRemote(vin, action, value, bodyContent) { return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; let body = bodyContent || {}; @@ -1967,12 +1894,12 @@ class VwWeconnect extends utils.Adapter { // setOutsideTemperature(vin, value); //} if (isStatusData && this.key == "value") { - // Audi and Skoda have different (shorter) dataId + // Audi and Skoda have different (shorter) dataId if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { - adapter.setIsCarLocked(vin, value); + adapter.setIsCarLocked(vin, value); } if ((dataId == "0x030102FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301020001") { - adapter.setOutsideTemperature(vin, value); + adapter.setOutsideTemperature(vin, value); } adapter.updateUnit(newPath, fieldUnit); } @@ -2041,9 +1968,9 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".status.isCarLocked", value == 2, true); + this.setState(vin + ".status.isCarLocked", value == 2, true); } - + setOutsideTemperature(vin, value) { this.setObjectNotExists(vin + ".status.outsideTemperature", { type: "state", @@ -2059,7 +1986,7 @@ class VwWeconnect extends utils.Adapter { }); this.setState(vin + ".status.outsideTemperature", Math.round(value - 2731.5) / 10.0, true); } - + getStatusKeys(statusJson) { const adapter = this; var result = null; @@ -2508,6 +2435,69 @@ class VwWeconnect extends utils.Adapter { } return result; } + extractKeys(path, element) { + //v1 + const objectKeys = Object.keys(element); + let write = false; + if (path.endsWith("Settings")) { + this.setObjectNotExists(path, { + type: "state", + common: { + name: "Einstellungen sind hier änderbar / You can change the settings here", + role: "indicator", + write: false, + read: true, + }, + native: {}, + }); + write = true; + } + objectKeys.forEach(async (key) => { + if (this.isJsonString(element[key])) { + element[key] = JSON.parse(element[key]); + } + + if (Array.isArray(element[key])) { + element[key].forEach((arrayElement, index) => { + index = index + 1; + if (index < 10) { + index = "0" + index; + } + let arrayPath = key + index; + if (arrayElement.id) { + arrayPath = arrayElement.id; + } + if (arrayElement.name) { + arrayPath = arrayElement.name; + } + this.extractKeys(path + "." + arrayPath, arrayElement); + }); + } else if (typeof element[key] === "object") { + this.extractKeys(path + "." + key, element[key]); + } else { + this.setObjectNotExists(path + "." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: typeof element[key], + write: write, + read: true, + }, + native: {}, + }); + this.setState(path + "." + key, element[key], true); + } + }); + } + isJsonString(str) { + try { + JSON.parse(str); + } catch (e) { + return false; + } + return true; + } /** * Is called when adapter shuts down - callback has to be called under any circumstances! * @param {() => void} callback @@ -2538,7 +2528,29 @@ class VwWeconnect extends utils.Adapter { const vin = id.split(".")[2]; let body = ""; let contentType = ""; - if (id.indexOf("remote") !== -1) { + if (id.indexOf("Settings.") != -1) { + if (this.config.type === "id") { + const action = id.split(".")[5]; + const settingsPath = id.split(".")[4]; + const pre = this.name + "." + this.instance; + const states = await this.getStatesAsync(pre + "." + vin + ".status." + settingsPath + ".*"); + let body = {}; + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + const key = keyName.split(".").splice(-1)[0]; + if (key.indexOf("Timestamp") === -1) { + body[key] = states[keyName].val; + } + }); + body[action] = state.val; + const firstPart = settingsPath.split("Settings")[0]; + this.setIdRemote(vin, firstPart, "settings", body).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } + if (id.indexOf("remote.") !== -1) { const action = id.split(".")[4]; if (action === "batterycharge") { body = '\n\n start\n'; @@ -2559,25 +2571,7 @@ class VwWeconnect extends utils.Adapter { return; } } - if (action === "targetSOC") { - if (this.config.type === "id") { - const pre = this.name + "." + this.instance; - const climateStates = await this.getStatesAsync(pre + "." + vin + ".status.chargingSettings.*"); - let body = {}; - const allIds = Object.keys(climateStates); - allIds.forEach((keyName) => { - const key = keyName.split(".").splice(-1)[0]; - if (key.indexOf("Timestamp") === -1) { - body[key] = climateStates[keyName].val; - } - }); - body["targetSOC_pct"] = state.val; - this.setIdRemote(vin, "charging", "settings", body).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } - } + if (action === "climatisation") { if (this.config.type === "id") { const value = state.val ? "start" : "stop"; @@ -2734,9 +2728,7 @@ class VwWeconnect extends utils.Adapter { } } else { const vin = id.split(".")[2]; - if (id.indexOf("targetSOC_pct") !== -1) { - this.setState(vin + ".remote.targetSOC", state.val, true); - } + if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); const longitudeValue = parseFloat(longitude.val); From 5604f15872ece98e289f4f1c860ba232d31f3410 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 8 Jan 2021 23:01:48 +0100 Subject: [PATCH 194/729] add seat --- admin/index_m.html | 7 +++--- main.js | 54 ++++++++++++++++++---------------------------- 2 files changed, 25 insertions(+), 36 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index adb2e194..c4772d06 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -20,7 +20,7 @@ function load(settings, onChange) { // example: select elements with id=key and class=value and insert value if (!settings) return; - $(".value").each(function() { + $(".value").each(function () { var $key = $(this); var id = $key.attr("id"); if ($key.attr("type") === "checkbox") { @@ -42,7 +42,7 @@ function save(callback) { // example: select elements with class=value and build settings object var obj = {}; - $(".value").each(function() { + $(".value").each(function () { var $this = $(this); if ($this.attr("type") === "checkbox") { obj[$this.attr("id")] = $this.prop("checked"); @@ -85,6 +85,7 @@ + @@ -113,7 +114,7 @@ diff --git a/main.js b/main.js index 7daaf074..fe03fc39 100644 --- a/main.js +++ b/main.js @@ -138,6 +138,18 @@ class VwWeconnect extends utils.Adapter { this.xappversion = "3.2.6"; this.xappname = "cz.skodaauto.connect"; } + if (this.config.type === "seat") { + this.type = "Seat"; + this.country = "ES"; + this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; + this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; + this.scope = "openid profile mbb cars birthdate nickname address phone"; + this.redirect = "seatconnect://identity-kit/login"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "1.1.29"; + this.xappname = "SEATConnect"; + } if (this.config.type === "audi") { this.type = "Audi"; this.country = "DE"; @@ -1458,7 +1470,7 @@ class VwWeconnect extends utils.Adapter { } let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw" && this.config.type !== "audi" && this.config.type !== "id") { + if (this.config.type !== "vw" && this.config.type !== "audi" && this.config.type !== "id" && this.config.type !== "seat") { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); accept = "application/json"; } @@ -1503,37 +1515,10 @@ class VwWeconnect extends utils.Adapter { return; } } - traverse(result).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - adapter.setObjectNotExists(vin + ".general." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(vin + ".general." + modPath.join("."), value || this.node, true); - } - }); + if (result && result.carportData && result.carportData.modelName) { + this.updateName(vin, result.carportData.modelName); + } + this.extractKeys(vin + ".general", result); resolve(); } catch (err) { @@ -2436,7 +2421,7 @@ class VwWeconnect extends utils.Adapter { return result; } extractKeys(path, element) { - //v1 + //v1.1 const objectKeys = Object.keys(element); let write = false; if (path.endsWith("Settings")) { @@ -2470,6 +2455,9 @@ class VwWeconnect extends utils.Adapter { if (arrayElement.name) { arrayPath = arrayElement.name; } + if (typeof Object.keys(arrayElement)[0] === "string") { + arrayPath = arrayElement[Object.keys(arrayElement)[0]]; + } this.extractKeys(path + "." + arrayPath, arrayElement); }); } else if (typeof element[key] === "object") { From 67d35bd54367b053cafba5885553dba9ca46d6c7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 8 Jan 2021 23:33:56 +0100 Subject: [PATCH 195/729] 0.0.23 --- README.md | 4 ++++ io-package.json | 7 +++++-- main.js | 40 ++++++++++++++++++---------------------- package.json | 2 +- 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 4f12c99b..e34dd49a 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.23 + +- add Seat + ### 0.0.22 - calculate outside temperatur in °C also for Skoda and Audi diff --git a/io-package.json b/io-package.json index 39151c8c..3771c39b 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.22", + "version": "0.0.23", "news": { + "0.0.23": { + "en": "add Seat" + }, "0.0.22": { "en": "calculate outside temperatur in °C also for Skoda and Audi" }, @@ -172,4 +175,4 @@ "native": {} } ] -} +} \ No newline at end of file diff --git a/main.js b/main.js index fe03fc39..de7e7623 100644 --- a/main.js +++ b/main.js @@ -1197,7 +1197,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Start Windowheating", type: "boolean", - role: "button", + role: "switch", write: true, }, native: {}, @@ -1291,25 +1291,6 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.heating", { - type: "state", - common: { - name: "Start Heizung", - type: "boolean", - role: "button", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.heatingDuration", { - type: "state", - common: { - name: "Dauer Heizung in min", - role: "number", - write: true, - }, - native: {}, - }); }); resolve(); } catch (err) { @@ -2617,12 +2598,27 @@ class VwWeconnect extends utils.Adapter { if (action === "climatisationTemperature") { let temp = 2950; if (state.val && !isNaN(state.val)) { - temp = (parseFloat(state.val) + 273, 6) * 10; + temp = (parseFloat(state.val) + 273) * 10; + } + + const climatisationWithoutHVpowerState = await this.getStateAsync(vin + ".climater.settings.climatisationWithoutHVpower.content"); + let climatisationWithoutHVpower = false; + if (climatisationWithoutHVpowerState.val) { + climatisationWithoutHVpower = climatisationWithoutHVpowerState.val; + } + const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); + let heaterSource = "electric"; + if (heaterSourceState.val) { + heaterSource = heaterSourceState.val; } body = '\n\n setSettings ' + temp + - " false electric \n"; + " " + + climatisationWithoutHVpower + + " " + + heaterSource + + " \n"; contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { this.log.error("failed set state"); diff --git a/package.json b/package.json index 7c4a9594..6aa2d7b6 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.22" + "version": "0.0.23" } \ No newline at end of file From 79d310ddb9afddbeb2030de7708d9657b7a9eb98 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 8 Jan 2021 23:43:02 +0100 Subject: [PATCH 196/729] add keywords --- README.md | 2 +- io-package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e34dd49a..42b24765 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## vw-connect adapter for ioBroker -Adapter for VW We Connect, We Connect ID, myAudi, Skoda Connect and We Connect Go +Adapter for VW We Connect, We Connect ID, myAudi, Skoda Connect, Seat Connect and We Connect Go Please update your system on Node 10. diff --git a/io-package.json b/io-package.json index 3771c39b..755b0fe3 100644 --- a/io-package.json +++ b/io-package.json @@ -106,7 +106,8 @@ "VW Connect", "VW Connect ID", "ID.3", - "VW Connect Go" + "VW Connect Go", + "Seat" ], "license": "MIT", "platform": "Javascript/Node.js", From 4bcf14cf8294e62dca95a2c55c5b57567a9af196 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 9 Jan 2021 22:44:06 +0100 Subject: [PATCH 197/729] add climatastion v2 --- main.js | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index de7e7623..cb7d52fe 100644 --- a/main.js +++ b/main.js @@ -1167,7 +1167,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Start Battery Charge", type: "boolean", - role: "button", + role: "switch", write: true, }, native: {}, @@ -1175,9 +1175,19 @@ class VwWeconnect extends utils.Adapter { this.setObjectNotExists(vehicle + ".remote.climatisation", { type: "state", common: { - name: "Start Climatisation", + name: "Start/Stop Climatisation", type: "boolean", - role: "button", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.climatisationv2", { + type: "state", + common: { + name: "Start/Stop Climatisation v2", + type: "boolean", + role: "switch", write: true, }, native: {}, @@ -2162,6 +2172,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); resp && this.log.error(resp.statusCode); + body && this.log.error(body); reject(); return; } @@ -2541,7 +2552,7 @@ class VwWeconnect extends utils.Adapter { } } - if (action === "climatisation") { + if (action === "climatisation" || action === "climatisationv2") { if (this.config.type === "id") { const value = state.val ? "start" : "stop"; this.setIdRemote(vin, action, value).catch(() => { @@ -2550,6 +2561,17 @@ class VwWeconnect extends utils.Adapter { return; } else { body = '\n\n startClimatisation\n'; + if (action === "climatisationv2") { + const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); + let heaterSource = "electric"; + if (heaterSourceState.val) { + heaterSource = heaterSourceState.val; + } + body = + '\n\n startClimatisation ' + + heaterSource + + " \n"; + } if (state.val === false) { body = '\n\n stopClimatisation\n'; } From af3cedef3dae4cb66f73277e26deba1d0a21866c Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 9 Jan 2021 22:45:11 +0100 Subject: [PATCH 198/729] 0.0.23 --- README.md | 2 +- io-package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42b24765..96c888ab 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Door and window states: ### 0.0.23 -- add Seat +- add Seat and new climatisation v2 ### 0.0.22 diff --git a/io-package.json b/io-package.json index 755b0fe3..052758fe 100644 --- a/io-package.json +++ b/io-package.json @@ -4,7 +4,7 @@ "version": "0.0.23", "news": { "0.0.23": { - "en": "add Seat" + "en": "add Seat and new climatisation v2" }, "0.0.22": { "en": "calculate outside temperatur in °C also for Skoda and Audi" From 02f80ccbeed016acf6f0fc8c88163e6b28308c99 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 10 Jan 2021 10:03:19 +0100 Subject: [PATCH 199/729] add remote state updates --- README.md | 4 ++++ io-package.json | 3 +++ main.js | 27 ++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 96c888ab..3851c469 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.24 + +- add remote state update + ### 0.0.23 - add Seat and new climatisation v2 diff --git a/io-package.json b/io-package.json index 052758fe..45378b31 100644 --- a/io-package.json +++ b/io-package.json @@ -3,6 +3,9 @@ "name": "vw-connect", "version": "0.0.23", "news": { + "0.0.24": { + "en": "add remote state update" + }, "0.0.23": { "en": "add Seat and new climatisation v2" }, diff --git a/main.js b/main.js index cb7d52fe..39e4bfc2 100644 --- a/main.js +++ b/main.js @@ -1287,7 +1287,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Start Ventilation", type: "boolean", - role: "button", + role: "switch", write: true, }, native: {}, @@ -1691,6 +1691,14 @@ class VwWeconnect extends utils.Adapter { body && this.log.debug(JSON.stringify(body)); resolve(); return; + } else if (resp && resp.statusCode === 401) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode); + body && this.log.error(JSON.stringify(body)); + this.refreshToken(); + this.refreshToken(true); + reject(); + return; } else { err && this.log.error(err); resp && this.log.error(resp.statusCode); @@ -2734,6 +2742,23 @@ class VwWeconnect extends utils.Adapter { } } else { const vin = id.split(".")[2]; + if (id.indexOf("climatisationState.content") !== -1) { + this.setState(vin + ".remote.climatisation", state.val ? true : false, true); + this.setState(vin + ".remote.climatisationv2", state.val ? true : false, true); + } + if (id.indexOf("climatisationStatus.climatisationState") !== -1) { + this.setState(vin + ".remote.climatisation", state.val === "on" ? true : false, true); + } + if (id.indexOf("chargingStatus.chargingState") !== -1) { + if (this.config.type === "id") { + this.setState(vin + ".remote.charging", state.val !== "readyForCharging" ? true : false, true); + } else { + this.setState(vin + ".remote.batterycharge", state.val !== "readyForCharging" ? true : false, true); + } + } + if (id.indexOf(".status.isCarLocked") !== -1) { + this.setState(vin + ".remote.lock", state.val, true); + } if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); From 8f017a3723022406f42468f41f56f7c1ae6f67f9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 10 Jan 2021 16:31:57 +0100 Subject: [PATCH 200/729] update state --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 39e4bfc2..f25a64df 100644 --- a/main.js +++ b/main.js @@ -2743,8 +2743,8 @@ class VwWeconnect extends utils.Adapter { } else { const vin = id.split(".")[2]; if (id.indexOf("climatisationState.content") !== -1) { - this.setState(vin + ".remote.climatisation", state.val ? true : false, true); - this.setState(vin + ".remote.climatisationv2", state.val ? true : false, true); + this.setState(vin + ".remote.climatisation", state.val === "on" ? true : false, true); + this.setState(vin + ".remote.climatisationv2", state.val === "on" ? true : false, true); } if (id.indexOf("climatisationStatus.climatisationState") !== -1) { this.setState(vin + ".remote.climatisation", state.val === "on" ? true : false, true); From d1858045d728953b28cc3e92691add0f4a7a8f52 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 11 Jan 2021 11:25:50 +0100 Subject: [PATCH 201/729] relogin after refresh token failed --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index f25a64df..7ab3dc90 100644 --- a/main.js +++ b/main.js @@ -774,6 +774,8 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failing to refresh token."); err && this.log.error(err); resp && this.log.error(resp.statusCode); + this.log.error("Relogin"); + this.login(); reject(); return; } From 30aa0c2e04c06ee916af45f4367ee2e535d45329 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 11 Jan 2021 15:54:52 +0100 Subject: [PATCH 202/729] fix remote update states --- main.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 7ab3dc90..0add87b2 100644 --- a/main.js +++ b/main.js @@ -2745,11 +2745,19 @@ class VwWeconnect extends utils.Adapter { } else { const vin = id.split(".")[2]; if (id.indexOf("climatisationState.content") !== -1) { - this.setState(vin + ".remote.climatisation", state.val === "on" ? true : false, true); - this.setState(vin + ".remote.climatisationv2", state.val === "on" ? true : false, true); + let value = false; + if (state.val === "on" || state.val === "heating") { + value = true; + } + this.setState(vin + ".remote.climatisation", value, true); + this.setState(vin + ".remote.climatisationv2", value, true); } if (id.indexOf("climatisationStatus.climatisationState") !== -1) { - this.setState(vin + ".remote.climatisation", state.val === "on" ? true : false, true); + let value = false; + if (state.val === "on" || state.val === "heating") { + value = true; + } + this.setState(vin + ".remote.climatisation", value, true); } if (id.indexOf("chargingStatus.chargingState") !== -1) { if (this.config.type === "id") { From 8c92cdfdb2cf809a78cd71f602c378b925ea1d49 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 11 Jan 2021 16:03:10 +0100 Subject: [PATCH 203/729] add text for 429 --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index 0add87b2..4ed35a2e 100644 --- a/main.js +++ b/main.js @@ -1702,6 +1702,9 @@ class VwWeconnect extends utils.Adapter { reject(); return; } else { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests"); + } err && this.log.error(err); resp && this.log.error(resp.statusCode); body && this.log.error(JSON.stringify(body)); From 71b2b986c549c706cfe2835cbbe88cef57a57736 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 12 Jan 2021 11:33:15 +0100 Subject: [PATCH 204/729] extract lib --- lib/extractKeys.js | 126 +++++++++++++++++++++++++++++++++++++++++++++ main.js | 100 +++++++---------------------------- 2 files changed, 144 insertions(+), 82 deletions(-) create mode 100644 lib/extractKeys.js diff --git a/lib/extractKeys.js b/lib/extractKeys.js new file mode 100644 index 00000000..1013b4f5 --- /dev/null +++ b/lib/extractKeys.js @@ -0,0 +1,126 @@ +//v2.0 +async function extractKeys(adapter, path, element) { + try { + if (element === null) { + adapter.log.debug("Cannot extract empty: " + path); + return; + } + const objectKeys = Object.keys(element); + let write = false; + if (Array.isArray(element)) { + extractArray(adapter, element, "", path, write); + return; + } + if (path.endsWith("Settings")) { + await adapter.setObjectNotExistsAsync(path, { + type: "state", + common: { + name: "Einstellungen sind hier änderbar / You can change the settings here", + role: "indicator", + write: false, + read: true, + }, + native: {}, + }); + write = true; + } + objectKeys.forEach(async (key) => { + if (isJsonString(element[key])) { + element[key] = JSON.parse(element[key]); + } + + if (Array.isArray(element[key])) { + extractArray(adapter, element, key, path, write); + } else if (element[key] !== null && typeof element[key] === "object") { + extractKeys(adapter, path + "." + key, element[key]); + } else { + await adapter.setObjectNotExistsAsync(path + "." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: typeof element[key], + write: write, + read: true, + }, + native: {}, + }); + adapter.setState(path + "." + key, element[key], true); + } + }); + } catch (error) { + adapter.log.error("Error extract keys: " + path + " " + JSON.stringify(element)); + adapter.log.error(error); + } +} +function extractArray(adapter, element, key, path, write) { + try { + if (key) { + element = element[key]; + } + element.forEach(async (arrayElement, index) => { + index = index + 1; + if (index < 10) { + index = "0" + index; + } + let arrayPath = key + index; + + if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { + arrayPath = arrayElement[Object.keys(arrayElement)[0]]; + } + Object.keys(arrayElement).forEach((keyName) => { + if (keyName.endsWith("Id")) { + arrayPath = arrayElement[keyName]; + } + }); + Object.keys(arrayElement).forEach((keyName) => { + if (keyName.endsWith("Name")) { + arrayPath = arrayElement[keyName]; + } + }); + if (arrayElement.id) { + arrayPath = arrayElement.id; + } + if (arrayElement.name) { + arrayPath = arrayElement.name; + } + //special case array with 2 string objects + if (Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string") { + let subKey = arrayElement[Object.keys(arrayElement)[0]]; + let subValue = arrayElement[Object.keys(arrayElement)[1]]; + let subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; + if (key) { + subKey = key + "." + subKey; + } + await adapter.setObjectNotExistsAsync(path + "." + subKey, { + type: "state", + common: { + name: subName, + role: "indicator", + type: typeof subValue, + write: write, + read: true, + }, + native: {}, + }); + adapter.setState(path + "." + subKey, subValue, true); + return; + } + extractKeys(adapter, path + "." + arrayPath, arrayElement); + }); + } catch (error) { + adapter.log.error("Cannot extract array " + path); + adapter.log.error(error); + } +} +function isJsonString(str) { + try { + JSON.parse(str); + } catch (e) { + return false; + } + return true; +} +module.exports = { + extractKeys, +}; diff --git a/main.js b/main.js index 4ed35a2e..50444d8d 100644 --- a/main.js +++ b/main.js @@ -14,7 +14,7 @@ const { Crypto } = require("@peculiar/webcrypto"); const uuidv4 = require("uuid/v4"); const traverse = require("traverse"); const jsdom = require("jsdom"); -const { resolve } = require("path"); +const { extractKeys } = require("./lib/extractKeys"); const { JSDOM } = jsdom; class VwWeconnect extends utils.Adapter { /** @@ -30,6 +30,7 @@ class VwWeconnect extends utils.Adapter { this.on("stateChange", this.onStateChange.bind(this)); // this.on("message", this.onMessage.bind(this)); this.on("unload", this.onUnload.bind(this)); + this.extractKeys = extractKeys; this.jar = request.jar(); @@ -340,7 +341,7 @@ class VwWeconnect extends utils.Adapter { form["email"] = this.config.user; } else { this.log.error("No Login Form found"); - this.log.debug(body); + this.log.debug(JSON.stringify(body)); reject(); return; } @@ -383,7 +384,7 @@ class VwWeconnect extends utils.Adapter { form["password"] = this.config.password; } else { this.log.error("No Login Form found. Please check your E-Mail in the app."); - this.log.debug(body); + this.log.debug(JSON.stringify(body)); reject(); return; } @@ -485,7 +486,7 @@ class VwWeconnect extends utils.Adapter { } else { this.log.error("No Token received."); try { - this.log.debug(body); + this.log.debug(JSON.stringify(body)); } catch (err) { this.log.error(err); reject(); @@ -780,7 +781,7 @@ class VwWeconnect extends utils.Adapter { return; } try { - this.log.debug(body); + this.log.debug(JSON.stringify(body)); const tokens = JSON.parse(body); if (tokens.error) { this.log.error(JSON.stringify(body)); @@ -853,7 +854,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(body.error)); reject(); } - this.log.debug(body); + this.log.debug(JSON.stringify(body)); const data = JSON.parse(body); this.config.identifier = data.businessIdentifierValue; Object.keys(data).forEach((key) => { @@ -909,7 +910,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(body.error)); reject(); } - this.log.debug(body); + this.log.debug(JSON.stringify(body)); if (body.homeRegion && body.homeRegion.baseUri && body.homeRegion.baseUri.content) { if (body.homeRegion.baseUri.content !== "https://mal-1a.prd.ece.vwg-connect.com/api") { this.homeRegion = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); @@ -953,7 +954,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(body.error)); reject(); } - this.log.debug(body); + this.log.debug(JSON.stringify(body)); const data = JSON.parse(body); Object.keys(data).forEach((key) => { this.setObjectNotExists("car." + key, { @@ -1052,7 +1053,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); const adapter = this; - this.extractKeys(vin + ".general", element); + this.extractKeys(this, vin + ".general", element); this.setObjectNotExists(vin + ".remote", { type: "state", @@ -1344,7 +1345,7 @@ class VwWeconnect extends utils.Adapter { } this.log.debug(JSON.stringify(body)); try { - this.extractKeys(vin + ".status", body.data); + this.extractKeys(this, vin + ".status", body.data); resolve(); } catch (err) { this.log.error(err); @@ -1511,7 +1512,7 @@ class VwWeconnect extends utils.Adapter { if (result && result.carportData && result.carportData.modelName) { this.updateName(vin, result.carportData.modelName); } - this.extractKeys(vin + ".general", result); + this.extractKeys(this, vin + ".general", result); resolve(); } catch (err) { @@ -1757,7 +1758,7 @@ class VwWeconnect extends utils.Adapter { } else { this.log.debug("Not able to get " + path); } - this.log.debug(body); + this.log.debug(JSON.stringify(body)); reject(); return; } @@ -2157,7 +2158,7 @@ class VwWeconnect extends utils.Adapter { setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); - this.log.debug(body); + this.log.debug(JSON.stringify(body)); this.log.debug(contentType); const headers = { "User-Agent": "okhttp/3.7.0", @@ -2190,7 +2191,7 @@ class VwWeconnect extends utils.Adapter { return; } try { - this.log.debug(body); + this.log.debug(JSON.stringify(body)); if (body.indexOf("") !== -1) { this.log.error("Error response try to refresh token " + url); this.log.error(JSON.stringify(body)); @@ -2211,7 +2212,7 @@ class VwWeconnect extends utils.Adapter { setVehicleStatusv2(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { url = this.replaceVarInUrl(url, vin); - this.log.debug(body); + this.log.debug(JSON.stringify(body)); this.log.debug(contentType); const headers = { "User-Agent": "okhttp/3.7.0", @@ -2243,7 +2244,7 @@ class VwWeconnect extends utils.Adapter { return; } try { - this.log.debug(body); + this.log.debug(JSON.stringify(body)); if (body.indexOf("") !== -1) { this.log.error("Error response try to refresh token " + url); this.log.error(JSON.stringify(body)); @@ -2328,7 +2329,7 @@ class VwWeconnect extends utils.Adapter { return; } try { - this.log.debug(body); + this.log.debug(JSON.stringify(body)); if (body.securityToken) { resolve(body.securityToken); } else { @@ -2425,72 +2426,7 @@ class VwWeconnect extends utils.Adapter { } return result; } - extractKeys(path, element) { - //v1.1 - const objectKeys = Object.keys(element); - let write = false; - if (path.endsWith("Settings")) { - this.setObjectNotExists(path, { - type: "state", - common: { - name: "Einstellungen sind hier änderbar / You can change the settings here", - role: "indicator", - write: false, - read: true, - }, - native: {}, - }); - write = true; - } - objectKeys.forEach(async (key) => { - if (this.isJsonString(element[key])) { - element[key] = JSON.parse(element[key]); - } - if (Array.isArray(element[key])) { - element[key].forEach((arrayElement, index) => { - index = index + 1; - if (index < 10) { - index = "0" + index; - } - let arrayPath = key + index; - if (arrayElement.id) { - arrayPath = arrayElement.id; - } - if (arrayElement.name) { - arrayPath = arrayElement.name; - } - if (typeof Object.keys(arrayElement)[0] === "string") { - arrayPath = arrayElement[Object.keys(arrayElement)[0]]; - } - this.extractKeys(path + "." + arrayPath, arrayElement); - }); - } else if (typeof element[key] === "object") { - this.extractKeys(path + "." + key, element[key]); - } else { - this.setObjectNotExists(path + "." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: typeof element[key], - write: write, - read: true, - }, - native: {}, - }); - this.setState(path + "." + key, element[key], true); - } - }); - } - isJsonString(str) { - try { - JSON.parse(str); - } catch (e) { - return false; - } - return true; - } /** * Is called when adapter shuts down - callback has to be called under any circumstances! * @param {() => void} callback From 57031c1bf3a240f6bcebef982fc5e1fed2002e34 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 12 Jan 2021 20:41:08 +0100 Subject: [PATCH 205/729] clean problems --- main.js | 70 +++++++++++++++++++++++++++++++-------------------- tsconfig.json | 7 ++++-- 2 files changed, 48 insertions(+), 29 deletions(-) diff --git a/main.js b/main.js index 50444d8d..ab94c5d8 100644 --- a/main.js +++ b/main.js @@ -126,6 +126,14 @@ class VwWeconnect extends utils.Adapter { this.responseType = "code id_token token"; this.xappversion = ""; this.xappname = ""; + this.weChargeClientId = "0fa5ae01-ebc0-4901-a2aa-4dd60572ea0e@apps_vw-dilab_com"; + this.xclientId = ""; + this.weChargeScope = "openid profile address email"; + this.weChargeRedirect = "wecharge://authenticated"; + this.weChargeXrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + this.xappversion = ""; + this.xappname = ""; } if (this.config.type === "skoda") { this.type = "Skoda"; @@ -318,10 +326,10 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - loginRequest.uri && this.log.debug(loginRequest.uri.query); + loginRequest.uri && this.log.debug(loginRequest.uri.query.toString()); this.log.error("Failed in first login step "); err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -365,7 +373,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failed to get login identifier"); err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -408,7 +416,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failed to get login authenticate"); err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -417,6 +425,7 @@ class VwWeconnect extends utils.Adapter { try { this.log.debug(JSON.stringify(body)); this.log.debug(JSON.stringify(resp.headers)); + if (resp.headers.location.split("&").length <= 1) { this.log.error("No userId found, please check your account"); return; @@ -433,9 +442,10 @@ class VwWeconnect extends utils.Adapter { reject(); return; } + let getRequest = request.get( { - url: resp.headers.location, + url: resp.headers.location || "", headers: { "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", @@ -540,7 +550,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failed in receive login url "); err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -627,6 +637,7 @@ class VwWeconnect extends utils.Adapter { access_token: jwtaccess_token, authorizationCode: jwtauth_code, }); + // @ts-ignore headers = { Host: "login.apps.emea.vwapps.io", accept: "*/*", @@ -653,7 +664,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failed to get token"); err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -713,7 +724,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -745,6 +756,7 @@ class VwWeconnect extends utils.Adapter { } else if (this.config.type === "go") { url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; body = ""; + // @ts-ignore form = { scope: "openid+profile+address+email+phone", client_id: this.clientId, @@ -774,7 +786,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failing to refresh token."); err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); this.log.error("Relogin"); this.login(); reject(); @@ -813,7 +825,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); this.log.error(err); this.log.error(JSON.stringify(body)); - this.log.error(resp.statusCode); + this.log.error(resp.statusCode.toString()); this.log.error(err.stack); this.restart(); } @@ -845,7 +857,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -901,7 +913,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -945,7 +957,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -993,6 +1005,7 @@ class VwWeconnect extends utils.Adapter { }; if (this.config.type === "go") { url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + // @ts-ignore headers = { "user-agent": "okhttp/3.9.1", authorization: "Bearer " + this.config.atoken, @@ -1004,6 +1017,7 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "id") { url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; + // @ts-ignore headers = { accept: "*/*", "content-type": "application/json", @@ -1025,7 +1039,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); } try { @@ -1338,7 +1352,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; @@ -1400,7 +1414,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -1438,7 +1452,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; @@ -1489,7 +1503,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -1554,7 +1568,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -1635,7 +1649,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -1696,7 +1710,7 @@ class VwWeconnect extends utils.Adapter { return; } else if (resp && resp.statusCode === 401) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); this.refreshToken(); this.refreshToken(true); @@ -1707,7 +1721,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Too many requests. Please turn on your car to send new requests"); } err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; @@ -2126,6 +2140,7 @@ class VwWeconnect extends utils.Adapter { this.getObject(pathString, function (err, obj) { if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + " for unit"); else { + // @ts-ignore if (obj && obj.common && obj.common.unit !== unit) { adapter.extendObject(pathString, { type: "state", @@ -2185,7 +2200,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); body && this.log.error(body); reject(); return; @@ -2239,7 +2254,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -2281,7 +2296,7 @@ class VwWeconnect extends utils.Adapter { async (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -2324,7 +2339,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failing to get sec token."); err && this.log.error(err); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); reject(); return; } @@ -2574,6 +2589,7 @@ class VwWeconnect extends utils.Adapter { const climatisationWithoutHVpowerState = await this.getStateAsync(vin + ".climater.settings.climatisationWithoutHVpower.content"); let climatisationWithoutHVpower = false; + if (climatisationWithoutHVpowerState.val) { climatisationWithoutHVpower = climatisationWithoutHVpowerState.val; } @@ -2757,7 +2773,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); if (err || resp.statusCode >= 400 || !body) { body && this.log.error(JSON.stringify(body)); - resp && this.log.error(resp.statusCode); + resp && this.log.error(resp.statusCode.toString()); err && this.log.error(err); return; } diff --git a/tsconfig.json b/tsconfig.json index 8dc229fb..ea169f58 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,10 +16,13 @@ // Set this to false if you want to disable the very strict rules (not recommended) "strict": true, // Or enable some of those features for more fine-grained control - // "strictNullChecks": true, + "strictNullChecks": false, + "noImplicitThis":false, + // "strictPropertyInitialization": true, - // "strictBindCallApply": true, + "strictBindCallApply": false, "noImplicitAny": false, + "strictFunctionTypes":false, // "noUnusedLocals": true, // "noUnusedParameters": true, From 45a3a22d3d0551dc348d74be50078e32a85af6c5 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 12 Jan 2021 23:58:26 +0100 Subject: [PATCH 206/729] first support for wallcharger --- io-package.json | 2 + lib/extractKeys.js | 7 ++- main.js | 148 ++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 141 insertions(+), 16 deletions(-) diff --git a/io-package.json b/io-package.json index 45378b31..1ec9b30e 100644 --- a/io-package.json +++ b/io-package.json @@ -144,6 +144,8 @@ "rtoken": "", "vwatoken": "", "vwrtoken": "", + "wc_access_token": "", + "wc_refresh_token": "", "userid": "", "pin": "", "identifier": "", diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 1013b4f5..4bc25fa6 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -78,11 +78,14 @@ function extractArray(adapter, element, key, path, write) { arrayPath = arrayElement[keyName]; } }); + if (arrayElement.start_date_time) { + arrayPath = arrayElement.start_date_time.replace(/\./g, ""); + } if (arrayElement.id) { - arrayPath = arrayElement.id; + arrayPath = arrayElement.id.replace(/\./g, ""); } if (arrayElement.name) { - arrayPath = arrayElement.name; + arrayPath = arrayElement.name.replace(/\./g, ""); } //special case array with 2 string objects if (Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string") { diff --git a/main.js b/main.js index ab94c5d8..90377442 100644 --- a/main.js +++ b/main.js @@ -126,14 +126,6 @@ class VwWeconnect extends utils.Adapter { this.responseType = "code id_token token"; this.xappversion = ""; this.xappname = ""; - this.weChargeClientId = "0fa5ae01-ebc0-4901-a2aa-4dd60572ea0e@apps_vw-dilab_com"; - this.xclientId = ""; - this.weChargeScope = "openid profile address email"; - this.weChargeRedirect = "wecharge://authenticated"; - this.weChargeXrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - this.xappversion = ""; - this.xappname = ""; } if (this.config.type === "skoda") { this.type = "Skoda"; @@ -236,6 +228,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get id status Failed"); this.refreshIDToken(); }); + this.getWcData(); }); return; } else { @@ -304,7 +297,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "audi") { url += "&ui_locales=de-DE%20de&prompt=login"; } - if (this.config.type === "id") { + if (this.config.type === "id" && this.type !== "Wc") { url = await this.receiveLoginUrl(); } const loginRequest = request( @@ -326,7 +319,11 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - loginRequest.uri && this.log.debug(loginRequest.uri.query.toString()); + if (this.type === "Wc") { + this.getTokens(loginRequest, code_verifier, reject, resolve); + return; + } + loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); this.log.error("Failed in first login step "); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -603,6 +600,7 @@ class VwWeconnect extends utils.Adapter { // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); + let method = "POST"; let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; let headers = { @@ -629,30 +627,38 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "id") { url = "https://login.apps.emea.vwapps.io/login/v1"; + let redirerctUri = "weconnect://authenticated"; + body = JSON.stringify({ state: jwtstate, id_token: jwtid_token, - redirect_uri: "weconnect://authenticated", + redirect_uri: redirerctUri, region: "emea", access_token: jwtaccess_token, authorizationCode: jwtauth_code, }); // @ts-ignore headers = { - Host: "login.apps.emea.vwapps.io", accept: "*/*", "content-type": "application/json", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", "accept-language": "de-de", }; + if (this.type === "Wc") { + method = "GET"; + url = "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + jwtauth_code; + redirerctUri = "wecharge://authenticated"; + headers["x-api-key"] = "yabajourasW9N8sm+9F/oP=="; + } } if (this.config.type === "audi") { this.getVWToken({}, jwtid_token, reject, resolve); return; } - request.post( + request( { + method: method, url: url, headers: headers, body: body, @@ -686,8 +692,33 @@ class VwWeconnect extends utils.Adapter { this.config.atoken = tokens.access_token; this.config.rtoken = tokens.refresh_token; if (this.config.type === "id") { + if (this.type === "Wc") { + this.config.wc_access_token = tokens.wc_access_token; + this.config.wc_refresh_token = tokens.refresh_token; + this.log.debug("Wallcharging login successfull"); + this.getWcData(); + resolve(); + return; + } this.config.atoken = tokens.accessToken; this.config.rtoken = tokens.refreshToken; + + //configure for wallcharging login + + //this.config.type === "wc" + this.type = "Wc"; + this.country = "DE"; + this.clientId = "0fa5ae01-ebc0-4901-a2aa-4dd60572ea0e@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile address email"; + this.redirect = "wecharge://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + this.xappversion = ""; + this.xappname = ""; + this.login().catch(() => { + this.log.warn("Failled wall charger login"); + }); this.refreshTokenInterval = setInterval(() => { this.refreshIDToken().catch(() => {}); }, 0.9 * 60 * 60 * 1000); // 0.9hours @@ -1369,6 +1400,94 @@ class VwWeconnect extends utils.Adapter { ); }); } + getWcData() { + const header = { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + wc_access_token: this.config.wc_access_token, + }; + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", header, "wallcharger.chargeandpay.subscriptions", "result") + .then((body) => { + body.forEach((subs) => { + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wallcharger.chargeandpay.tariffs." + subs.tariff_id).catch( + () => { + this.log.error("Failed to get tariff"); + } + ); + }); + }) + .catch(() => { + this.log.error("Failed to get subscription"); + }); + this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=25", header, "wallcharger.homecharging.stations", "result", "stations") + .then((body) => { + body.forEach((station) => { + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=100", + header, + "wallcharger.homecharging.stations." + station.name + ".sessions", + "charging_sessions" + ).catch(() => { + this.log.error("Failed to get sessions"); + }); + }); + }) + .catch(() => { + this.log.error("Failed to get stations"); + }); + var dt = new Date(); + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-10-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=25", + header, + "wallcharger.homecharging.records", + "charging_records" + ).catch(() => { + this.log.error("Failed to get records"); + }); + //Pay + //Home + } + genericRequest(url, header, path, selector1, selector2) { + return new Promise(async (resolve, reject) => { + request.get( + { + url: url, + headers: header, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + try { + if (selector1) { + body = body[selector1]; + if (selector2) { + body = body[selector2]; + } + } + this.extractKeys(this, path, body); + resolve(body); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } setIdRemote(vin, action, value, bodyContent) { return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; @@ -1460,7 +1579,8 @@ class VwWeconnect extends utils.Adapter { try { this.config.atoken = body.accessToken; this.config.rtoken = body.refreshToken; - + //wallcharging relogin no refresh token available + this.login(); resolve(); } catch (err) { this.log.error(err); From e8a29ceaa92460506eca7d8e6b79f559a2ede88c Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 13 Jan 2021 00:00:05 +0100 Subject: [PATCH 207/729] rename dp --- main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 90377442..1fb4e033 100644 --- a/main.js +++ b/main.js @@ -1411,10 +1411,10 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, wc_access_token: this.config.wc_access_token, }; - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", header, "wallcharger.chargeandpay.subscriptions", "result") + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", header, "wecharge.chargeandpay.subscriptions", "result") .then((body) => { body.forEach((subs) => { - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wallcharger.chargeandpay.tariffs." + subs.tariff_id).catch( + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wecharge.chargeandpay.tariffs." + subs.tariff_id).catch( () => { this.log.error("Failed to get tariff"); } @@ -1424,13 +1424,13 @@ class VwWeconnect extends utils.Adapter { .catch(() => { this.log.error("Failed to get subscription"); }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=25", header, "wallcharger.homecharging.stations", "result", "stations") + this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=25", header, "wecharge.homecharging.stations", "result", "stations") .then((body) => { body.forEach((station) => { this.genericRequest( "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=100", header, - "wallcharger.homecharging.stations." + station.name + ".sessions", + "wecharge.homecharging.stations." + station.name + ".sessions", "charging_sessions" ).catch(() => { this.log.error("Failed to get sessions"); @@ -1444,7 +1444,7 @@ class VwWeconnect extends utils.Adapter { this.genericRequest( "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-10-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=25", header, - "wallcharger.homecharging.records", + "wecharge.homecharging.records", "charging_records" ).catch(() => { this.log.error("Failed to get records"); From cd0e2198aeb0596b9b0a206d21366d03aea6f56b Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 10:22:08 +0100 Subject: [PATCH 208/729] small fixes --- main.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 1fb4e033..c4eb2e1e 100644 --- a/main.js +++ b/main.js @@ -783,7 +783,7 @@ class VwWeconnect extends utils.Adapter { if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; - body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; + body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; //+ "&vin=" + vin; } else if (this.config.type === "go") { url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; body = ""; @@ -796,7 +796,7 @@ class VwWeconnect extends utils.Adapter { }; } return new Promise((resolve, reject) => { - this.log.debug("refreshToken"); + this.log.debug("refreshToken " + isVw ? "vw" : ""); request.post( { url: url, @@ -815,8 +815,9 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to refresh token."); + this.log.error("Failing to refresh token. " + isVw ? "VwToken" : ""); err && this.log.error(err); + body && this.log.error(body); resp && this.log.error(resp.statusCode.toString()); this.log.error("Relogin"); this.login(); @@ -1069,6 +1070,9 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); reject(); @@ -1428,7 +1432,7 @@ class VwWeconnect extends utils.Adapter { .then((body) => { body.forEach((station) => { this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=100", + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=25", header, "wecharge.homecharging.stations." + station.name + ".sessions", "charging_sessions" @@ -1622,6 +1626,9 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); @@ -1687,6 +1694,9 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); reject(); @@ -1832,13 +1842,12 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - this.refreshToken(); this.refreshToken(true); reject(); return; } else { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests"); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); From ff68fc6ffe880eb29ae6a4d585fe37941aa08b4f Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 15:02:26 +0100 Subject: [PATCH 209/729] cleanup --- main.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index c4eb2e1e..612cb191 100644 --- a/main.js +++ b/main.js @@ -705,6 +705,10 @@ class VwWeconnect extends utils.Adapter { //configure for wallcharging login + this.refreshTokenInterval = setInterval(() => { + this.refreshIDToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + //this.config.type === "wc" this.type = "Wc"; this.country = "DE"; @@ -719,9 +723,6 @@ class VwWeconnect extends utils.Adapter { this.login().catch(() => { this.log.warn("Failled wall charger login"); }); - this.refreshTokenInterval = setInterval(() => { - this.refreshIDToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours resolve(); return; } @@ -1536,6 +1537,15 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 401) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.refreshIDToken(); + this.log.error("Refresh Token"); + reject(); + return; + } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); @@ -1583,8 +1593,10 @@ class VwWeconnect extends utils.Adapter { try { this.config.atoken = body.accessToken; this.config.rtoken = body.refreshToken; - //wallcharging relogin no refresh token available - this.login(); + if (this.type === "Wc") { + //wallcharging relogin no refresh token available + this.login(); + } resolve(); } catch (err) { this.log.error(err); From 043d31f89d03a2e3e3000188f648bb67c316e39f Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 15:22:29 +0100 Subject: [PATCH 210/729] fix not wecharge id --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 612cb191..e5c94b5b 100644 --- a/main.js +++ b/main.js @@ -320,7 +320,11 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (this.type === "Wc") { - this.getTokens(loginRequest, code_verifier, reject, resolve); + if (err.message === "Invalid protocol: wecharge:") { + this.getTokens(loginRequest, code_verifier, reject, resolve); + } else { + resolve(); + } return; } loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); From 4f28ae3e848eb7968151f6fb8901529b9db0e128 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 16:42:03 +0100 Subject: [PATCH 211/729] fix catch --- main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index e5c94b5b..47b2d873 100644 --- a/main.js +++ b/main.js @@ -226,7 +226,7 @@ class VwWeconnect extends utils.Adapter { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); - this.refreshIDToken(); + this.refreshIDToken().catch(() => {}); }); this.getWcData(); }); @@ -321,8 +321,10 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { if (this.type === "Wc") { if (err.message === "Invalid protocol: wecharge:") { + this.log.debug("Found WeCharge connection"); this.getTokens(loginRequest, code_verifier, reject, resolve); } else { + this.log.debug("No WeCharge found cancel login"); resolve(); } return; @@ -1545,7 +1547,7 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - this.refreshIDToken(); + this.refreshIDToken().catch(() => {}); this.log.error("Refresh Token"); reject(); return; From df03991a36eca810e3a6722c6a72dbbf5c123a75 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 20:03:10 +0100 Subject: [PATCH 212/729] add missing records --- lib/extractKeys.js | 9 +++++---- main.js | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 4bc25fa6..3611bcb3 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,7 +1,7 @@ //v2.0 async function extractKeys(adapter, path, element) { try { - if (element === null) { + if (element === null || element === undefined) { adapter.log.debug("Cannot extract empty: " + path); return; } @@ -78,15 +78,16 @@ function extractArray(adapter, element, key, path, write) { arrayPath = arrayElement[keyName]; } }); - if (arrayElement.start_date_time) { - arrayPath = arrayElement.start_date_time.replace(/\./g, ""); - } + if (arrayElement.id) { arrayPath = arrayElement.id.replace(/\./g, ""); } if (arrayElement.name) { arrayPath = arrayElement.name.replace(/\./g, ""); } + if (arrayElement.start_date_time) { + arrayPath = arrayElement.start_date_time.replace(/\./g, ""); + } //special case array with 2 string objects if (Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string") { let subKey = arrayElement[Object.keys(arrayElement)[0]]; diff --git a/main.js b/main.js index 47b2d873..108d1d41 100644 --- a/main.js +++ b/main.js @@ -1435,6 +1435,9 @@ class VwWeconnect extends utils.Adapter { .catch(() => { this.log.error("Failed to get subscription"); }); + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=25&offset=0", header, "wecharge.chargeandpay.records", "result").catch(() => { + this.log.error("Failed to get chargeandpay records"); + }); this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=25", header, "wecharge.homecharging.stations", "result", "stations") .then((body) => { body.forEach((station) => { From 94f03d06635d13357cc4eb7f621b4f3372e3688c Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 21:02:06 +0100 Subject: [PATCH 213/729] add refreshtoken --- main.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.js b/main.js index 108d1d41..5843c51a 100644 --- a/main.js +++ b/main.js @@ -1393,6 +1393,15 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 401) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.refreshIDToken().catch(() => {}); + this.log.error("Refresh Token"); + reject(); + return; + } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); From 6896ea44d7f1f99b77f450ac39465bc4271f6af3 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 21:37:42 +0100 Subject: [PATCH 214/729] add catch --- main.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 5843c51a..f0ac328d 100644 --- a/main.js +++ b/main.js @@ -298,7 +298,9 @@ class VwWeconnect extends utils.Adapter { url += "&ui_locales=de-DE%20de&prompt=login"; } if (this.config.type === "id" && this.type !== "Wc") { - url = await this.receiveLoginUrl(); + url = await this.receiveLoginUrl().catch(() => { + this.log.warn("Failled url login"); + }); } const loginRequest = request( { @@ -1393,15 +1395,6 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - if (resp && resp.statusCode === 401) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.refreshIDToken().catch(() => {}); - this.log.error("Refresh Token"); - reject(); - return; - } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -1604,7 +1597,16 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); - + body && this.log.error(JSON.stringify(body)); + this.log.error("Failed refresh token. Relogin"); + //reset login parameters because of wecharge + this.type = "Id"; + this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; + this.scope = "openid profile badge cars dealers birthdate vin"; + this.redirect = "weconnect://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + this.login().catch(() => {}); reject(); return; } From 9d056e1bf535afcacea5915ccaaed78dc890f04d Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 21:46:33 +0100 Subject: [PATCH 215/729] fix token --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index f0ac328d..e306c872 100644 --- a/main.js +++ b/main.js @@ -697,8 +697,6 @@ class VwWeconnect extends utils.Adapter { getVWToken(tokens, jwtid_token, reject, resolve) { if (this.config.type !== "audi") { - this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; if (this.config.type === "id") { if (this.type === "Wc") { this.config.wc_access_token = tokens.wc_access_token; @@ -734,6 +732,9 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } + + this.config.atoken = tokens.access_token; + this.config.rtoken = tokens.refresh_token; this.refreshTokenInterval = setInterval(() => { this.refreshToken().catch(() => {}); }, 0.9 * 60 * 60 * 1000); // 0.9hours From 573a00498f256fbcd89fb7feeda4473930bbcafe Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 14 Jan 2021 22:42:20 +0100 Subject: [PATCH 216/729] add catches --- main.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index e306c872..a46605be 100644 --- a/main.js +++ b/main.js @@ -331,7 +331,7 @@ class VwWeconnect extends utils.Adapter { } return; } - loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); + loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); this.log.error("Failed in first login step "); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -830,7 +830,9 @@ class VwWeconnect extends utils.Adapter { body && this.log.error(body); resp && this.log.error(resp.statusCode.toString()); this.log.error("Relogin"); - this.login(); + this.login().catch(() => { + this.log.error("Failed relogin"); + }); reject(); return; } @@ -1577,6 +1579,7 @@ class VwWeconnect extends utils.Adapter { } refreshIDToken() { return new Promise((resolve, reject) => { + this.log.debug("Token Refresh started"); request.get( { url: "https://login.apps.emea.vwapps.io/refresh/v1", @@ -1612,11 +1615,14 @@ class VwWeconnect extends utils.Adapter { return; } try { + this.log.debug("Token Refresh successful"); this.config.atoken = body.accessToken; this.config.rtoken = body.refreshToken; if (this.type === "Wc") { //wallcharging relogin no refresh token available - this.login(); + this.login().catch(() => { + this.log.debug("Failed wallcharge login"); + }); } resolve(); } catch (err) { From f413ccaeb44ef53c46110eeba62983f82cee4375 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 15 Jan 2021 14:11:17 +0100 Subject: [PATCH 217/729] fix relogin --- main.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index a46605be..10312636 100644 --- a/main.js +++ b/main.js @@ -331,6 +331,11 @@ class VwWeconnect extends utils.Adapter { } return; } + if (err.message.startsWith() === "Invalid protocol:") { + this.log.debug("Found Token"); + this.getTokens(loginRequest, code_verifier, reject, resolve); + return; + } loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); this.log.error("Failed in first login step "); err && this.log.error(err); @@ -806,7 +811,8 @@ class VwWeconnect extends utils.Adapter { }; } return new Promise((resolve, reject) => { - this.log.debug("refreshToken " + isVw ? "vw" : ""); + this.log.debug("refreshToken "); + this.log.debug(isVw ? "vw" : ""); request.post( { url: url, @@ -825,7 +831,8 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to refresh token. " + isVw ? "VwToken" : ""); + this.log.error("Failing to refresh token. "); + this.log.error(isVw ? "VwToken" : ""); err && this.log.error(err); body && this.log.error(body); resp && this.log.error(resp.statusCode.toString()); From bf4086c4df1cf6c68c3970a0ca667a6f457e3ff6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 21 Jan 2021 23:44:09 +0100 Subject: [PATCH 218/729] we charge --- README.md | 6 +- lib/extractKeys.js | 14 +++- main.js | 186 ++++++++++++++++++++++++--------------------- 3 files changed, 115 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index 3851c469..ff4e8cdf 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## vw-connect adapter for ioBroker -Adapter for VW We Connect, We Connect ID, myAudi, Skoda Connect, Seat Connect and We Connect Go +Adapter for VW We Connect, We Connect ID, We Charge, myAudi, Skoda Connect, Seat Connect and We Connect Go Please update your system on Node 10. @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.25 + +- add we charge + ### 0.0.24 - add remote state update diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 3611bcb3..50026c99 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,4 +1,4 @@ -//v2.0 +//v2.1 async function extractKeys(adapter, path, element) { try { if (element === null || element === undefined) { @@ -70,7 +70,11 @@ function extractArray(adapter, element, key, path, write) { } Object.keys(arrayElement).forEach((keyName) => { if (keyName.endsWith("Id")) { - arrayPath = arrayElement[keyName]; + if (arrayElement[keyName].replace) { + arrayPath = arrayElement[keyName].replace(/\./g, ""); + } else { + arrayPath = arrayElement[keyName]; + } } }); Object.keys(arrayElement).forEach((keyName) => { @@ -80,7 +84,11 @@ function extractArray(adapter, element, key, path, write) { }); if (arrayElement.id) { - arrayPath = arrayElement.id.replace(/\./g, ""); + if (arrayElement.id.replace) { + arrayPath = arrayElement.id.replace(/\./g, ""); + } else { + arrayPath = arrayElement.id; + } } if (arrayElement.name) { arrayPath = arrayElement.name.replace(/\./g, ""); diff --git a/main.js b/main.js index 10312636..024ce74f 100644 --- a/main.js +++ b/main.js @@ -921,7 +921,7 @@ class VwWeconnect extends utils.Adapter { const data = JSON.parse(body); this.config.identifier = data.businessIdentifierValue; Object.keys(data).forEach((key) => { - this.setObjectNotExists("personal." + key, { + this.setObjectNotExistsAsync("personal." + key, { type: "state", common: { name: key, @@ -931,8 +931,9 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, + }).then(() => { + this.setState("personal." + key, data[key], true); }); - this.setState("personal." + key, data[key], true); }); resolve(); @@ -1020,7 +1021,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); const data = JSON.parse(body); Object.keys(data).forEach((key) => { - this.setObjectNotExists("car." + key, { + this.setObjectNotExistsAsync("car." + key, { type: "state", common: { name: key, @@ -1030,8 +1031,9 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, + }).then(() => { + this.setState("car." + key, data[key], true); }); - this.setState("car." + key, data[key], true); }); resolve(); @@ -1188,22 +1190,24 @@ class VwWeconnect extends utils.Adapter { } }); - adapter.setObjectNotExists(vin + ".status." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + adapter + .setObjectNotExistsAsync(vin + ".status." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + if (typeof value === "object") { + value = JSON.stringify(value); + } + adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + }); } }); }); @@ -1764,22 +1768,24 @@ class VwWeconnect extends utils.Adapter { } }); if (modPath[modPath.length - 1] !== "$") { - adapter.setObjectNotExists(vin + ".rights." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); + adapter + .setObjectNotExistsAsync(vin + ".rights." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + if (typeof value === "object") { + value = JSON.stringify(value); + } + adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); + }); } } }); @@ -1913,7 +1919,7 @@ class VwWeconnect extends utils.Adapter { } } if (path === "position") { - this.setObjectNotExists(vin + ".position.isMoving", { + this.setObjectNotExistsAsync(vin + ".position.isMoving", { type: "state", common: { name: "is car moving", @@ -1923,18 +1929,18 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, + }).then(() => { + if (resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); + resolve(); + return; + } else { + this.setState(vin + ".position.isMoving", false, true); + } + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } }); - - if (resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - resolve(); - return; - } else { - this.setState(vin + ".position.isMoving", false, true); - } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } } if (body === undefined || body === "" || body.error) { @@ -1980,18 +1986,21 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - adapter.setObjectNotExists(vin + "." + path + ".lastTrip", { - type: "state", - common: { - name: "numberOfLastTrip", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); + adapter + .setObjectNotExistsAsync(vin + "." + path + ".lastTrip", { + type: "state", + common: { + name: "numberOfLastTrip", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); + }); } var statusKeys = null; @@ -2052,23 +2061,25 @@ class VwWeconnect extends utils.Adapter { if (!skipNode) { const newPath = vin + "." + path + "." + modPath.join("."); if (this.path.length > 0 && this.isLeaf) { - adapter.setObjectNotExists(newPath, { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - unit: fieldUnit, - write: false, - read: true, - }, - native: {}, - }); - - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(newPath, value || this.node, true); + adapter + .setObjectNotExistsAsync(newPath, { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + unit: fieldUnit, + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + if (typeof value === "object") { + value = JSON.stringify(value); + } + adapter.setState(newPath, value || this.node, true); + }); //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { // setOutsideTemperature(vin, value); //} @@ -2135,8 +2146,8 @@ class VwWeconnect extends utils.Adapter { }); } - setIsCarLocked(vin, value) { - this.setObjectNotExists(vin + ".status.isCarLocked", { + async setIsCarLocked(vin, value) { + await this.setObjectNotExistsAsync(vin + ".status.isCarLocked", { type: "state", common: { name: "is car locked", @@ -2150,8 +2161,8 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".status.isCarLocked", value == 2, true); } - setOutsideTemperature(vin, value) { - this.setObjectNotExists(vin + ".status.outsideTemperature", { + async setOutsideTemperature(vin, value) { + await this.setObjectNotExistsAsync(vin + ".status.outsideTemperature", { type: "state", common: { name: "outside temperature", @@ -2904,7 +2915,7 @@ class VwWeconnect extends utils.Adapter { const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); const longitudeValue = parseFloat(longitude.val); - this.setObjectNotExists(vin + ".position.latitudeConv", { + await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { type: "state", common: { name: "latitude converted", @@ -2916,7 +2927,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); - this.setObjectNotExists(vin + ".position.longitudeConv", { + await this.setObjectNotExistsAsync(vin + ".position.longitudeConv", { type: "state", common: { name: "longitude converted", @@ -2943,7 +2954,7 @@ class VwWeconnect extends utils.Adapter { json: true, followAllRedirects: true, }, - (err, resp, body) => { + async (err, resp, body) => { this.log.debug("reverse pos received"); this.log.debug(JSON.stringify(body)); if (err || resp.statusCode >= 400 || !body) { @@ -2957,7 +2968,7 @@ class VwWeconnect extends utils.Adapter { const number = body.address.house_number || ""; const city = body.address.city || body.address.town || body.address.village; const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - this.setObjectNotExists(vin + ".position.address.displayName", { + await this.setObjectNotExistsAsync(vin + ".position.address.displayName", { type: "state", common: { name: "displayName", @@ -2970,7 +2981,7 @@ class VwWeconnect extends utils.Adapter { }); this.setState(vin + ".position.address.displayName", fullAdress, true); Object.keys(body.address).forEach((key) => { - this.setObjectNotExists(vin + ".position.address." + key, { + this.setObjectNotExistsAsync(vin + ".position.address." + key, { type: "state", common: { name: key, @@ -2980,8 +2991,9 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, + }).then(() => { + this.setState(vin + ".position.address." + key, body.address[key], true); }); - this.setState(vin + ".position.address." + key, body.address[key], true); }); } catch (err) { this.log.error(err); From 277d8a5a96e71d684d0bc49e8a5a2acd8b521281 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 21 Jan 2021 23:45:49 +0100 Subject: [PATCH 219/729] 0.0.25 --- io-package.json | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/io-package.json b/io-package.json index 1ec9b30e..c5e9eeac 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.23", + "version": "0.0.25", "news": { + "0.0.25": { + "en": "add we charge" + }, "0.0.24": { "en": "add remote state update" }, diff --git a/package.json b/package.json index 6aa2d7b6..73ceebbe 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.23" + "version": "0.0.25" } \ No newline at end of file From 25cadcfd649e038bb7145c90769e7fa491db7a7c Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 22 Jan 2021 14:01:32 +0100 Subject: [PATCH 220/729] fix seat url --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 024ce74f..17daba9d 100644 --- a/main.js +++ b/main.js @@ -331,7 +331,7 @@ class VwWeconnect extends utils.Adapter { } return; } - if (err.message.startsWith() === "Invalid protocol:") { + if (err.message.indexOf("Invalid protocol:") !== -1) { this.log.debug("Found Token"); this.getTokens(loginRequest, code_verifier, reject, resolve); return; @@ -795,6 +795,9 @@ class VwWeconnect extends utils.Adapter { let rtoken = this.config.rtoken; let body = "refresh_token=" + rtoken; let form = ""; + if (this.config.type === "seat") { + url = "https://identity.vwgroup.io/oidc/v1/token"; + } if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; From c2f7abd5daf85af44634e31f18df3fe34d1a3101 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 22 Jan 2021 14:02:20 +0100 Subject: [PATCH 221/729] add log --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 17daba9d..86707b69 100644 --- a/main.js +++ b/main.js @@ -339,6 +339,7 @@ class VwWeconnect extends utils.Adapter { loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); this.log.error("Failed in first login step "); err && this.log.error(err); + err && this.log.error(JSON.stringify(err)); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); From f46201659a8fba5d9b4f32cda710d7591929db2d Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 23 Jan 2021 15:11:47 +0100 Subject: [PATCH 222/729] add ml urls for sectoken request --- main.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 86707b69..fc9d723e 100644 --- a/main.js +++ b/main.js @@ -571,10 +571,14 @@ class VwWeconnect extends utils.Adapter { ); }); } - replaceVarInUrl(url, vin) { + replaceVarInUrl(url, vin, setML) { + let curHomeRegion = this.homeRegion; + if (setML && this.homeRegionSetter) { + curHomeRegion = this.homeRegionSetter; + } return url .replace("/$vin/", "/" + vin + "/") - .replace("$homeregion/", this.homeRegion + "/") + .replace("$homeregion/", curHomeRegion + "/") .replace("/$type/", "/" + this.type + "/") .replace("/$country/", "/" + this.country + "/") .replace("/$tripType", "/" + this.config.tripType); @@ -978,10 +982,11 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(body.error)); reject(); } - this.log.debug(JSON.stringify(body)); + this.log.debug(vin + ": " + JSON.stringify(body)); if (body.homeRegion && body.homeRegion.baseUri && body.homeRegion.baseUri.content) { if (body.homeRegion.baseUri.content !== "https://mal-1a.prd.ece.vwg-connect.com/api") { this.homeRegion = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); + this.homeRegionSetter = body.homeRegion.baseUri.content.split("/api")[0]; this.log.debug("Set URL to: " + this.homeRegion); } } @@ -2362,7 +2367,7 @@ class VwWeconnect extends utils.Adapter { setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); + url = this.replaceVarInUrl(url, vin, secToken); this.log.debug(JSON.stringify(body)); this.log.debug(contentType); const headers = { @@ -2404,6 +2409,7 @@ class VwWeconnect extends utils.Adapter { reject(); return; } + resolve(); this.log.info(body); } catch (err) { this.log.error(err); From ac79901a01ad0ed66dfb70d004cccb1c50110464 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 23 Jan 2021 22:36:31 +0100 Subject: [PATCH 223/729] adjust sect url --- main.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index fc9d723e..cf057c3e 100644 --- a/main.js +++ b/main.js @@ -571,11 +571,8 @@ class VwWeconnect extends utils.Adapter { ); }); } - replaceVarInUrl(url, vin, setML) { + replaceVarInUrl(url, vin) { let curHomeRegion = this.homeRegion; - if (setML && this.homeRegionSetter) { - curHomeRegion = this.homeRegionSetter; - } return url .replace("/$vin/", "/" + vin + "/") .replace("$homeregion/", curHomeRegion + "/") @@ -2367,7 +2364,7 @@ class VwWeconnect extends utils.Adapter { setVehicleStatus(vin, url, body, contentType, secToken) { return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin, secToken); + url = this.replaceVarInUrl(url, vin); this.log.debug(JSON.stringify(body)); this.log.debug(contentType); const headers = { @@ -2475,9 +2472,14 @@ class VwWeconnect extends utils.Adapter { } requestSecToken(vin, service) { return new Promise((resolve, reject) => { + let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested"; + if (this.homeRegionSetter) { + url = this.homeRegionSetter + "/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested"; + } + this.log.debug(url); request.get( { - url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested", + url: url, headers: { "user-agent": "okhttp/3.7.0", "X-App-version": this.xappversion, From 48b87c985568553ea1d109e986da62de79cd44c6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 24 Jan 2021 08:51:36 +0100 Subject: [PATCH 224/729] add sectoken debug --- main.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index cf057c3e..05563b14 100644 --- a/main.js +++ b/main.js @@ -2474,7 +2474,7 @@ class VwWeconnect extends utils.Adapter { return new Promise((resolve, reject) => { let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested"; if (this.homeRegionSetter) { - url = this.homeRegionSetter + "/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested"; + url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); } this.log.debug(url); request.get( @@ -2495,6 +2495,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); reject(); return; } @@ -2517,9 +2518,13 @@ class VwWeconnect extends utils.Adapter { securityToken: secToken, }, }; + let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed"; + if (this.homeRegionSetter) { + url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); + } request.post( { - url: "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed", + url: url, headers: { "user-agent": "okhttp/3.7.0", "Content-Type": "application/json", @@ -2537,6 +2542,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failing to get sec token."); err && this.log.error(err); + body && this.log.error(JSON.stringify(body)); resp && this.log.error(resp.statusCode.toString()); reject(); return; @@ -3022,7 +3028,7 @@ class VwWeconnect extends utils.Adapter { // this.log.info(`state ${id} deleted`); } } catch (err) { - this.log.error("Error in OnStateChange:" + err); + this.log.error("Error in OnStateChange: " + err); } } } From 1250616c8d17819a3dfee7bc01daaa49f2cf2d9f Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 25 Jan 2021 12:11:17 +0100 Subject: [PATCH 225/729] fix url --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 05563b14..2595d229 100644 --- a/main.js +++ b/main.js @@ -2377,6 +2377,7 @@ class VwWeconnect extends utils.Adapter { Accept: "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*", }; + if (secToken) { headers["x-mbbSecToken"] = secToken; } @@ -2474,7 +2475,7 @@ class VwWeconnect extends utils.Adapter { return new Promise((resolve, reject) => { let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested"; if (this.homeRegionSetter) { - url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); + url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); } this.log.debug(url); request.get( @@ -2520,7 +2521,7 @@ class VwWeconnect extends utils.Adapter { }; let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed"; if (this.homeRegionSetter) { - url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); + url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); } request.post( { From 32b33dafac524a2bbfb693d26bd0574886b3b417 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 27 Jan 2021 08:19:52 +0100 Subject: [PATCH 226/729] 0.0.26 --- README.md | 4 ++++ io-package.json | 5 ++++- main.js | 30 ++++++++++++++++++++++-------- package.json | 2 +- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ff4e8cdf..a0331b30 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.26 + +- bugfixes + ### 0.0.25 - add we charge diff --git a/io-package.json b/io-package.json index c5e9eeac..5f3db644 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.25", + "version": "0.0.26", "news": { + "0.0.26": { + "en": "bugfixes" + }, "0.0.25": { "en": "add we charge" }, diff --git a/main.js b/main.js index 2595d229..37df9740 100644 --- a/main.js +++ b/main.js @@ -176,6 +176,10 @@ class VwWeconnect extends utils.Adapter { this.xappversion = ""; this.xappname = ""; } + if (this.config.interval === 0) { + this.log.info("Interval of 0 is not allowed reset to 1"); + this.config.interval = 1; + } this.login() .then(() => { this.log.debug("Login successful"); @@ -709,7 +713,7 @@ class VwWeconnect extends utils.Adapter { this.config.wc_access_token = tokens.wc_access_token; this.config.wc_refresh_token = tokens.refresh_token; this.log.debug("Wallcharging login successfull"); - this.getWcData(); + this.getWcData(100); resolve(); return; } @@ -1220,7 +1224,6 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - const vehicles = body.userVehicles.vehicle; vehicles.forEach((vehicle) => { this.vinArray.push(vehicle); @@ -1387,7 +1390,7 @@ class VwWeconnect extends utils.Adapter { } catch (err) { this.log.error(err); this.log.error(err.stack); - this.log.error("Not able to find vehicle, did you choose the correct type?"); + this.log.error("Not able to find vehicle, did you choose the correct type in the settings?"); reject(); } } @@ -1433,7 +1436,18 @@ class VwWeconnect extends utils.Adapter { ); }); } - getWcData() { + getWcData(limit) { + if (!limit) { + limit = 25; + } + this.setObjectNotExists("wecharge", { + type: "state", + common: { + name: "WeCharge Data", + write: false, + }, + native: {}, + }); const header = { accept: "*/*", "content-type": "application/json", @@ -1457,14 +1471,14 @@ class VwWeconnect extends utils.Adapter { .catch(() => { this.log.error("Failed to get subscription"); }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=25&offset=0", header, "wecharge.chargeandpay.records", "result").catch(() => { + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", "result").catch(() => { this.log.error("Failed to get chargeandpay records"); }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=25", header, "wecharge.homecharging.stations", "result", "stations") + this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, header, "wecharge.homecharging.stations", "result", "stations") .then((body) => { body.forEach((station) => { this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=25", + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=" + limit, header, "wecharge.homecharging.stations." + station.name + ".sessions", "charging_sessions" @@ -1478,7 +1492,7 @@ class VwWeconnect extends utils.Adapter { }); var dt = new Date(); this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-10-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=25", + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=" + limit, header, "wecharge.homecharging.records", "charging_records" diff --git a/package.json b/package.json index 73ceebbe..9967957b 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.25" + "version": "0.0.26" } \ No newline at end of file From cb0319e2f2d81247fb64f78dd354d331a57db9a9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 27 Jan 2021 13:50:02 +0100 Subject: [PATCH 227/729] update readme --- README.md | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/README.md b/README.md index a0331b30..120eac63 100644 --- a/README.md +++ b/README.md @@ -173,27 +173,6 @@ Door and window states: - add audi -### 0.0.5 - -- add honk and flash, fix address format - -### 0.0.4 - -- add Skoda support - -### 0.0.3 - -- (ta2k) add more information -- (ta2k) add remote controls - -### 0.0.2 - -- (ta2k) add car status capturing - -### 0.0.1 - -- (ta2k) initial release - ## License MIT License From 277f56a86af9ea9858d5020e267f70d98d93730f Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 27 Jan 2021 14:05:57 +0100 Subject: [PATCH 228/729] readme --- README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/README.md b/README.md index 120eac63..d6a4d26d 100644 --- a/README.md +++ b/README.md @@ -161,18 +161,6 @@ Door and window states: - fix audi bug with multiple vehicles - hide status update error if feature is not available -### 0.0.9 - -- set default trip type to none - -### 0.0.7 - -- add we connect go and remote standheizung and lock/unlock - -### 0.0.6 - -- add audi - ## License MIT License From 7722318696ebf9f0af1c3c9dc417442e9b4918e9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 27 Jan 2021 14:06:36 +0100 Subject: [PATCH 229/729] iopackage update --- io-package.json | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/io-package.json b/io-package.json index 5f3db644..b2800548 100644 --- a/io-package.json +++ b/io-package.json @@ -38,42 +38,6 @@ }, "0.0.11": { "en": "fix audi bug with multiple vehicles, hide status update error if feature is not available" - }, - "0.0.10": { - "en": "set default trip type to none" - }, - "0.0.8": { - "en": "increase default interval" - }, - "0.0.7": { - "en": "add we connect go and remote standheizung and lock/unlock" - }, - "0.0.6": { - "en": "add audi" - }, - "0.0.5": { - "en": "add honk and flash, fix address format" - }, - "0.0.4": { - "en": "add skoda support, rename adapter" - }, - "0.0.3": { - "en": "add more information, add remote controls" - }, - "0.0.2": { - "en": "add car status capturing" - }, - "0.0.1": { - "en": "initial release", - "de": "Erstveröffentlichung", - "ru": "Начальная версия", - "pt": "lançamento inicial", - "nl": "Eerste uitgave", - "fr": "Première version", - "it": "Versione iniziale", - "es": "Versión inicial", - "pl": "Pierwsze wydanie", - "zh-cn": "首次出版" } }, "title": "VW Connect", From f277bdad44bd12e15585f5d620f67af7ce90c0ec Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 28 Jan 2021 23:15:00 +0100 Subject: [PATCH 230/729] fix seat refresh --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 37df9740..bb471980 100644 --- a/main.js +++ b/main.js @@ -802,7 +802,7 @@ class VwWeconnect extends utils.Adapter { let body = "refresh_token=" + rtoken; let form = ""; if (this.config.type === "seat") { - url = "https://identity.vwgroup.io/oidc/v1/token"; + body = "brand=seat&" + body; } if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; From 070af4335f597914e301f25204650cecd8ec0a1d Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 29 Jan 2021 10:06:50 +0100 Subject: [PATCH 231/729] add ignore missing values --- main.js | 63 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/main.js b/main.js index bb471980..c4f69282 100644 --- a/main.js +++ b/main.js @@ -1458,36 +1458,59 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, wc_access_token: this.config.wc_access_token, }; - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", header, "wecharge.chargeandpay.subscriptions", "result") + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", header, "wecharge.chargeandpay.subscriptions", [404], "result") .then((body) => { body.forEach((subs) => { - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wecharge.chargeandpay.tariffs." + subs.tariff_id).catch( - () => { - this.log.error("Failed to get tariff"); + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wecharge.chargeandpay.tariffs." + subs.tariff_id, [ + 404, + ]).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get tariff"); + return; } - ); + this.log.error("Failed to get tariff"); + }); }); }) - .catch(() => { + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get subscription"); + return; + } this.log.error("Failed to get subscription"); }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", "result").catch(() => { - this.log.error("Failed to get chargeandpay records"); - }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, header, "wecharge.homecharging.stations", "result", "stations") + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", [404], "result").catch( + (hideError) => { + if (hideError) { + this.log.debug("Failed to get chargeandpay records"); + return; + } + this.log.error("Failed to get chargeandpay records"); + } + ); + this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, header, "wecharge.homecharging.stations", [404], "result", "stations") .then((body) => { body.forEach((station) => { this.genericRequest( "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=" + limit, header, "wecharge.homecharging.stations." + station.name + ".sessions", + [404], "charging_sessions" - ).catch(() => { + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; + } this.log.error("Failed to get sessions"); }); }); }) - .catch(() => { + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get stations"); + return; + } this.log.error("Failed to get stations"); }); var dt = new Date(); @@ -1495,14 +1518,19 @@ class VwWeconnect extends utils.Adapter { "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=" + limit, header, "wecharge.homecharging.records", + [404], "charging_records" - ).catch(() => { + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get records"); + return; + } this.log.error("Failed to get records"); }); //Pay //Home } - genericRequest(url, header, path, selector1, selector2) { + genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { return new Promise(async (resolve, reject) => { request.get( { @@ -1514,6 +1542,13 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode && codesToIgnoreArray.includes(resp.statusCode)) { + err && this.log.debug(err); + resp && this.log.debug(resp.statusCode.toString()); + body && this.log.debug(JSON.stringify(body)); + reject(true); + return; + } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); From f112dc02389d97c8773fa293617d902ae08dad52 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 3 Feb 2021 22:47:23 +0100 Subject: [PATCH 232/729] add wecharge jsons --- main.js | 82 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/main.js b/main.js index c4f69282..c386799d 100644 --- a/main.js +++ b/main.js @@ -1479,15 +1479,29 @@ class VwWeconnect extends utils.Adapter { } this.log.error("Failed to get subscription"); }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", [404], "result").catch( - (hideError) => { + this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", [404], "result") + .then((body) => { + this.setObjectNotExistsAsync("wecharge.chargeandpay.recordsJson", { + type: "state", + common: { + name: "Raw Json Last 100", + role: "indicator", + type: "string", + write: true, + read: true, + }, + native: {}, + }).then(() => { + this.setState("wecharge.chargeandpay.recordsJson", JSON.stringify(body), true); + }); + }) + .catch((hideError) => { if (hideError) { this.log.debug("Failed to get chargeandpay records"); return; } this.log.error("Failed to get chargeandpay records"); - } - ); + }); this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, header, "wecharge.homecharging.stations", [404], "result", "stations") .then((body) => { body.forEach((station) => { @@ -1497,13 +1511,29 @@ class VwWeconnect extends utils.Adapter { "wecharge.homecharging.stations." + station.name + ".sessions", [404], "charging_sessions" - ).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; - } - this.log.error("Failed to get sessions"); - }); + ) + .then((body) => { + this.setObjectNotExistsAsync("wecharge.homecharging.stations." + station.name + ".sessionsJson", { + type: "state", + common: { + name: "Raw Json Last 100", + role: "indicator", + type: "string", + write: true, + read: true, + }, + native: {}, + }).then(() => { + this.setState("wecharge.homecharging.stations." + station.name + ".sessionsJson", JSON.stringify(body), true); + }); + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; + } + this.log.error("Failed to get sessions"); + }); }); }) .catch((hideError) => { @@ -1520,13 +1550,29 @@ class VwWeconnect extends utils.Adapter { "wecharge.homecharging.records", [404], "charging_records" - ).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get records"); - return; - } - this.log.error("Failed to get records"); - }); + ) + .then((body) => { + this.setObjectNotExistsAsync("wecharge.homecharging.recordsJson", { + type: "state", + common: { + name: "Raw Json Last 100", + role: "indicator", + type: "string", + write: true, + read: true, + }, + native: {}, + }).then(() => { + this.setState("wecharge.homecharging.recordsJson", JSON.stringify(body), true); + }); + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get records"); + return; + } + this.log.error("Failed to get records"); + }); //Pay //Home } From 79a005db165cb8d87dbc9380def3038fb3554189 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 5 Feb 2021 20:07:15 +0100 Subject: [PATCH 233/729] fix refreshtoken for skoda --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index c386799d..1fb2caff 100644 --- a/main.js +++ b/main.js @@ -801,9 +801,8 @@ class VwWeconnect extends utils.Adapter { let rtoken = this.config.rtoken; let body = "refresh_token=" + rtoken; let form = ""; - if (this.config.type === "seat") { - body = "brand=seat&" + body; - } + body = "brand=" + this.config.type + "&" + body; + if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; @@ -1753,7 +1752,7 @@ class VwWeconnect extends utils.Adapter { } let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw" && this.config.type !== "audi" && this.config.type !== "id" && this.config.type !== "seat") { + if (this.config.type !== "vw" && this.config.type !== "audi" && this.config.type !== "id" && this.config.type !== "seat" && this.config.type !== "skoda") { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); accept = "application/json"; } @@ -1804,6 +1803,7 @@ class VwWeconnect extends utils.Adapter { if (result && result.carportData && result.carportData.modelName) { this.updateName(vin, result.carportData.modelName); } + this.extractKeys(this, vin + ".general", result); resolve(); From 76548c8dd2b922ffba830e5d366032737c78c02f Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 5 Feb 2021 22:51:54 +0100 Subject: [PATCH 234/729] fix tripdata --- lib/extractKeys.js | 17 ++++-- main.js | 148 ++++++++------------------------------------- 2 files changed, 37 insertions(+), 128 deletions(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 50026c99..d2c0abe3 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,5 +1,5 @@ -//v2.1 -async function extractKeys(adapter, path, element) { +//v2.2 +async function extractKeys(adapter, path, element, preferedArrayName, forceIndex) { try { if (element === null || element === undefined) { adapter.log.debug("Cannot extract empty: " + path); @@ -8,7 +8,7 @@ async function extractKeys(adapter, path, element) { const objectKeys = Object.keys(element); let write = false; if (Array.isArray(element)) { - extractArray(adapter, element, "", path, write); + extractArray(adapter, element, "", path, write, preferedArrayName, forceIndex); return; } if (path.endsWith("Settings")) { @@ -30,7 +30,7 @@ async function extractKeys(adapter, path, element) { } if (Array.isArray(element[key])) { - extractArray(adapter, element, key, path, write); + extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex); } else if (element[key] !== null && typeof element[key] === "object") { extractKeys(adapter, path + "." + key, element[key]); } else { @@ -53,7 +53,7 @@ async function extractKeys(adapter, path, element) { adapter.log.error(error); } } -function extractArray(adapter, element, key, path, write) { +function extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex) { try { if (key) { element = element[key]; @@ -96,6 +96,13 @@ function extractArray(adapter, element, key, path, write) { if (arrayElement.start_date_time) { arrayPath = arrayElement.start_date_time.replace(/\./g, ""); } + if (preferedArrayName && arrayElement[preferedArrayName]) { + arrayPath = arrayElement[preferedArrayName].replace(/\./g, ""); + } + + if (forceIndex) { + arrayPath = key + index; + } //special case array with 2 string objects if (Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string") { let subKey = arrayElement[Object.keys(arrayElement)[0]]; diff --git a/main.js b/main.js index 1fb2caff..4d60555c 100644 --- a/main.js +++ b/main.js @@ -207,7 +207,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get vehicle rights Failed"); }); this.requestStatusUpdate(vin) - .then(() => { + .finally(() => { this.statesArray.forEach((state) => { this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { this.log.debug("error while getting " + state.url); @@ -1931,6 +1931,9 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); reject(); @@ -2087,21 +2090,26 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - adapter - .setObjectNotExistsAsync(vin + "." + path + ".lastTrip", { - type: "state", - common: { - name: "numberOfLastTrip", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - adapter.setState(vin + "." + path + ".lastTrip", result.tripData.length, true); - }); + result.tripData = result.tripData.reverse(); + result.tripData = result.tripData.slice(this.config.numberOfTrips * -1); + this.setObjectNotExistsAsync(vin + ".tripdata" + this.config.tripType + ".lastTrip", { + type: "state", + common: { + name: "numberOfLastTrip", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }).then(() => { + this.setState(vin + ".tripdata" + this.config.tripType + ".lastTrip", result.tripData.length, true); + }); + + this.extractKeys(this, vin + ".tripdata" + this.config.tripType, result, null, true); + + resolve(); + return; } var statusKeys = null; @@ -2109,9 +2117,7 @@ class VwWeconnect extends utils.Adapter { statusKeys = this.getStatusKeys(result); } var tripKeys = null; - if (isTripData) { - tripKeys = this.getTripKeys(result); - } + traverse(result).forEach(function (value) { const modPath = this.path.slice(); var dataId = null; @@ -2318,110 +2324,6 @@ class VwWeconnect extends utils.Adapter { return result; } - getTripKeys(tripJson) { - const adapter = this; - const maxCount = this.config.numberOfTrips; - var result = null; - if (tripJson && tripJson.tripData) { - if (Array.isArray(tripJson.tripData)) { - var bestShort = []; - var bestLong = []; - var bestCycle = []; - // select and sort newest tripData - tripJson.tripData.forEach(function (tripValue, tripIndex) { - if (tripValue && tripValue.tripType && tripValue.tripID) { - if (tripValue.tripType === "shortTerm") { - var found = false; - bestShort.forEach(function (value, index) { - if (!found && tripValue.tripID > value) { - bestShort.splice(index, 0, tripValue.tripID); - found = true; - } - }); - if (!found && (maxCount == 0 || bestShort.length < maxCount)) { - bestShort.push(tripValue.tripID); - } else if (maxCount > 0 && bestShort.length > maxCount) { - bestShort.pop(); - } - } else if (tripValue.tripType === "longTerm") { - var found = false; - bestLong.forEach(function (value, index) { - if (!found && tripValue.tripID > value) { - bestLong.splice(index, 0, tripValue.tripID); - found = true; - } - }); - if (!found && (maxCount == 0 || bestLong.length < maxCount)) { - bestLong.push(tripValue.tripID); - } else if (maxCount > 0 && bestLong.length > maxCount) { - bestLong.pop(); - } - } else if (tripValue.tripType === "cyclic") { - var found = false; - bestCycle.forEach(function (value, index) { - if (!found && tripValue.tripID > value) { - bestCycle.splice(index, 0, tripValue.tripID); - found = true; - } - }); - if (!found && (maxCount == 0 || bestCycle.length < maxCount)) { - bestCycle.push(tripValue.tripID); - } else if (maxCount > 0 && bestCycle.length > maxCount) { - bestCycle.pop(); - } - } else { - adapter.log.warn("unknown tripType: " + tripValue.tripType); - adapter.log.debug(JSON.stringify(tripValue)); - } - } else { - adapter.log.warn("tripData has not tripType and tripID"); - adapter.log.debug(JSON.stringify(tripValue)); - } - }); - //adapter.log.info("bestShort: " + JSON.stringify(bestShort)); - //adapter.log.info("bestLong: " + JSON.stringify(bestLong)); - //adapter.log.info("bestCycle: " + JSON.stringify(bestCycle)); - // build keys for tripData - result = new Array(tripJson.tripData.length); - tripJson.tripData.forEach(function (tripValue, tripIndex) { - result[tripIndex] = null; - if (tripValue && tripValue.tripType && tripValue.tripID) { - if (tripValue.tripType === "shortTerm") { - var index = bestShort.indexOf(tripValue.tripID); - if (index >= 0) { - result[tripIndex] = index + 1 + ""; - while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; - result[tripIndex] = "short" + result[tripIndex]; - } - } else if (tripValue.tripType === "longTerm") { - var index = bestLong.indexOf(tripValue.tripID); - if (index >= 0) { - result[tripIndex] = index + 1 + ""; - while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; - result[tripIndex] = "long" + result[tripIndex]; - } - } else if (tripValue.tripType === "cyclic") { - var index = bestCycle.indexOf(tripValue.tripID); - if (index >= 0) { - result[tripIndex] = index + 1 + ""; - while (result[tripIndex].length < 3) result[tripIndex] = "0" + result[tripIndex]; - result[tripIndex] = "cycle" + result[tripIndex]; - } - } - } - }); - } else { - adapter.log.warn("tripData is not an array"); - adapter.log.debug(JSON.stringify(tripJson.tripData)); - } - } else { - adapter.log.warn("tripdata without tripData field"); - adapter.log.debug(JSON.stringify(tripJson)); - } - adapter.log.debug(JSON.stringify(result)); - return result; - } - updateUnit(pathString, unit) { const adapter = this; this.getObject(pathString, function (err, obj) { From 02fdbd03080d440aea0158390da3bd76adc711dc Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 6 Feb 2021 22:06:30 +0100 Subject: [PATCH 235/729] resort tripdata --- admin/index_m.html | 4 ++-- main.js | 25 +++++++++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index c4772d06..e7af2d92 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -113,9 +113,9 @@
diff --git a/main.js b/main.js index 4d60555c..0f44d0cb 100644 --- a/main.js +++ b/main.js @@ -747,7 +747,9 @@ class VwWeconnect extends utils.Adapter { this.config.atoken = tokens.access_token; this.config.rtoken = tokens.refresh_token; this.refreshTokenInterval = setInterval(() => { - this.refreshToken().catch(() => {}); + this.refreshToken().catch(() => { + this.log.error("Refresh Token was not successful"); + }); }, 0.9 * 60 * 60 * 1000); // 0.9hours } if (this.config.type === "go" || this.config.type === "id") { @@ -785,7 +787,9 @@ class VwWeconnect extends utils.Adapter { this.config.vwatoken = tokens.access_token; this.config.vwrtoken = tokens.refresh_token; this.vwrefreshTokenInterval = setInterval(() => { - this.refreshToken(true).catch(() => {}); + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); }, 0.9 * 60 * 60 * 1000); //0.9hours resolve(); } catch (err) { @@ -1998,7 +2002,9 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - this.refreshToken(true); + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); reject(); return; } else { @@ -2090,7 +2096,10 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - result.tripData = result.tripData.reverse(); + // result.tripData = result.tripData.reverse(); + result.tripData.sort((a, b) => { + return new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(); + }); result.tripData = result.tripData.slice(this.config.numberOfTrips * -1); this.setObjectNotExistsAsync(vin + ".tripdata" + this.config.tripType + ".lastTrip", { type: "state", @@ -2400,7 +2409,9 @@ class VwWeconnect extends utils.Adapter { if (body.indexOf("") !== -1) { this.log.error("Error response try to refresh token " + url); this.log.error(JSON.stringify(body)); - this.refreshToken(true); + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); reject(); return; } @@ -2454,7 +2465,9 @@ class VwWeconnect extends utils.Adapter { if (body.indexOf("") !== -1) { this.log.error("Error response try to refresh token " + url); this.log.error(JSON.stringify(body)); - this.refreshToken(true); + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); reject(); return; } From 2750f510ad2bb2c7e110fab6f90fd0506c21be1e Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 6 Feb 2021 22:08:42 +0100 Subject: [PATCH 236/729] rename lastrip --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 0f44d0cb..1c869931 100644 --- a/main.js +++ b/main.js @@ -2104,7 +2104,7 @@ class VwWeconnect extends utils.Adapter { this.setObjectNotExistsAsync(vin + ".tripdata" + this.config.tripType + ".lastTrip", { type: "state", common: { - name: "numberOfLastTrip", + name: "indexOfOldestTrip", role: "indicator", type: "mixed", write: false, From 7d277ec12d34773a8e8005281b58a6885aab2b68 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 6 Feb 2021 22:17:26 +0100 Subject: [PATCH 237/729] add rawjson --- main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.js b/main.js index 1c869931..2a1d0f10 100644 --- a/main.js +++ b/main.js @@ -2101,6 +2101,20 @@ class VwWeconnect extends utils.Adapter { return new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(); }); result.tripData = result.tripData.slice(this.config.numberOfTrips * -1); + this.setObjectNotExistsAsync(vin + ".tripdata" + this.config.tripType + ".rawJson", { + type: "state", + common: { + name: "Raw Json", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }).then(() => { + this.setState(vin + ".tripdata" + this.config.tripType + ".rawJson", JSON.stringify(result.tripData), true); + }); + this.setObjectNotExistsAsync(vin + ".tripdata" + this.config.tripType + ".lastTrip", { type: "state", common: { From 02b57ebe3861d8a7c65e46bc80081e18a9879bb7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 7 Feb 2021 00:42:02 +0100 Subject: [PATCH 238/729] clean up --- .eslintrc.json | 9 ++- main.js | 174 ++++++++++++++++++++++++++++--------------------- 2 files changed, 107 insertions(+), 76 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 09f51540..11e64e82 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "plugins": ["promise"], "env": { "es6": true, "node": true, @@ -6,9 +7,15 @@ }, "extends": "eslint:recommended", "rules": { + "promise/no-return-wrap": "error", + "promise/param-names": "error", + "promise/catch-or-return": "error", + "promise/no-native": "off", + "promise/no-new-statics": "error", + "no-async-promise-executor": "off", "indent": [ "error", - "space", + 4, { "SwitchCase": 1 } diff --git a/main.js b/main.js index 2a1d0f10..d003fbd3 100644 --- a/main.js +++ b/main.js @@ -217,6 +217,9 @@ class VwWeconnect extends utils.Adapter { .catch(() => { this.log.error("status update Failed"); }); + }) + .catch(() => { + this.log.error("Error getting home region"); }); } }); @@ -275,13 +278,13 @@ class VwWeconnect extends utils.Adapter { } login() { return new Promise(async (resolve, reject) => { - let nonce = this.getNonce(); - let state = uuidv4(); + const nonce = this.getNonce(); + const state = uuidv4(); const [code_verifier, codeChallenge] = this.getCodeChallenge(); - let method = "GET"; - let form = {}; + const method = "GET"; + const form = {}; let url = "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + this.clientId + @@ -576,7 +579,7 @@ class VwWeconnect extends utils.Adapter { }); } replaceVarInUrl(url, vin) { - let curHomeRegion = this.homeRegion; + const curHomeRegion = this.homeRegion; return url .replace("/$vin/", "/" + vin + "/") .replace("$homeregion/", curHomeRegion + "/") @@ -592,6 +595,7 @@ class VwWeconnect extends utils.Adapter { hash = getRequest.uri.query; } const hashArray = hash.split("&"); + // eslint-disable-next-line no-unused-vars let state; let jwtauth_code; let jwtaccess_token; @@ -943,9 +947,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState("personal." + key, data[key], true); - }); + }) + .then(() => { + this.setState("personal." + key, data[key], true); + }) + .catch(); }); resolve(); @@ -1044,9 +1050,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState("car." + key, data[key], true); - }); + }) + .then(() => { + this.setState("car." + key, data[key], true); + }) + .catch(); }); resolve(); @@ -1135,7 +1143,6 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - const adapter = this; this.extractKeys(this, vin + ".general", element); this.setObjectNotExists(vin + ".remote", { @@ -1187,8 +1194,6 @@ class VwWeconnect extends utils.Adapter { }); const adapter = this; - const result = body.vehicleData; - traverse(element).forEach(function (value) { if (this.path.length > 0 && this.isLeaf) { const modPath = this.path; @@ -1220,7 +1225,8 @@ class VwWeconnect extends utils.Adapter { value = JSON.stringify(value); } adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); - }); + }) + .catch(); } }); }); @@ -1494,9 +1500,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState("wecharge.chargeandpay.recordsJson", JSON.stringify(body), true); - }); + }) + .then(() => { + this.setState("wecharge.chargeandpay.recordsJson", JSON.stringify(body), true); + }) + .catch(); }) .catch((hideError) => { if (hideError) { @@ -1526,9 +1534,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState("wecharge.homecharging.stations." + station.name + ".sessionsJson", JSON.stringify(body), true); - }); + }) + .then(() => { + this.setState("wecharge.homecharging.stations." + station.name + ".sessionsJson", JSON.stringify(body), true); + }) + .catch(); }) .catch((hideError) => { if (hideError) { @@ -1546,7 +1556,7 @@ class VwWeconnect extends utils.Adapter { } this.log.error("Failed to get stations"); }); - var dt = new Date(); + const dt = new Date(); this.genericRequest( "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=" + limit, header, @@ -1565,9 +1575,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState("wecharge.homecharging.recordsJson", JSON.stringify(body), true); - }); + }) + .then(() => { + this.setState("wecharge.homecharging.recordsJson", JSON.stringify(body), true); + }) + .catch(); }) .catch((hideError) => { if (hideError) { @@ -1760,7 +1772,7 @@ class VwWeconnect extends utils.Adapter { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); accept = "application/json"; } - let atoken = this.config.vwatoken; + const atoken = this.config.vwatoken; request.get( { @@ -1791,7 +1803,6 @@ class VwWeconnect extends utils.Adapter { } try { this.log.debug(JSON.stringify(body)); - const adapter = this; let result = body.vehicleData; if (!result) { result = body.vehicleDataDetail; @@ -1890,7 +1901,8 @@ class VwWeconnect extends utils.Adapter { value = JSON.stringify(value); } adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); - }); + }) + .catch(); } } }); @@ -2039,18 +2051,20 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - if (resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - resolve(); - return; - } else { - this.setState(vin + ".position.isMoving", false, true); - } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } - }); + }) + .then(() => { + if (resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); + resolve(); + return; + } else { + this.setState(vin + ".position.isMoving", false, true); + } + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + }) + .catch(); } if (body === undefined || body === "" || body.error) { @@ -2088,8 +2102,8 @@ class VwWeconnect extends utils.Adapter { if (element4 && result[element4]) { result = result[element4]; } - var isStatusData = path === "status"; - var isTripData = path === "tripdata"; + const isStatusData = path === "status"; + const isTripData = path === "tripdata"; if (isTripData) { if (this.config.tripType === "none") { @@ -2111,9 +2125,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState(vin + ".tripdata" + this.config.tripType + ".rawJson", JSON.stringify(result.tripData), true); - }); + }) + .then(() => { + this.setState(vin + ".tripdata" + this.config.tripType + ".rawJson", JSON.stringify(result.tripData), true); + }) + .catch(); this.setObjectNotExistsAsync(vin + ".tripdata" + this.config.tripType + ".lastTrip", { type: "state", @@ -2125,9 +2141,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState(vin + ".tripdata" + this.config.tripType + ".lastTrip", result.tripData.length, true); - }); + }) + .then(() => { + this.setState(vin + ".tripdata" + this.config.tripType + ".lastTrip", result.tripData.length, true); + }) + .catch(); this.extractKeys(this, vin + ".tripdata" + this.config.tripType, result, null, true); @@ -2135,26 +2153,26 @@ class VwWeconnect extends utils.Adapter { return; } - var statusKeys = null; + let statusKeys = null; if (isStatusData) { statusKeys = this.getStatusKeys(result); } - var tripKeys = null; + const tripKeys = null; traverse(result).forEach(function (value) { const modPath = this.path.slice(); - var dataId = null; - var dataIndex = -1; - var fieldId = null; - var fieldUnit = null; - var isNumberNode = false; - var skipNode = false; + let dataId = null; + let dataIndex = -1; + let fieldId = null; + let fieldUnit = null; + let isNumberNode = false; + let skipNode = false; this.path.forEach((pathElement, pathIndex) => { if (isNaN(parseInt(pathElement))) { isNumberNode = false; } else { isNumberNode = true; - var key; + let key; if (isStatusData && this.path[pathIndex - 1] === "data") { dataIndex = parseInt(pathElement); dataId = statusKeys[dataIndex].dataId; @@ -2171,7 +2189,7 @@ class VwWeconnect extends utils.Adapter { key = parseInt(pathElement) + 1 + ""; } } else if (isTripData && this.path[pathIndex - 1]) { - var tripKey = tripKeys[parseInt(pathElement)]; + const tripKey = tripKeys[parseInt(pathElement)]; if (tripKey === null) { skipNode = true; } else { @@ -2209,7 +2227,8 @@ class VwWeconnect extends utils.Adapter { value = JSON.stringify(value); } adapter.setState(newPath, value || this.node, true); - }); + }) + .catch(); //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { // setOutsideTemperature(vin, value); //} @@ -2224,7 +2243,7 @@ class VwWeconnect extends utils.Adapter { adapter.updateUnit(newPath, fieldUnit); } } else if (isStatusData && isNumberNode) { - var text = null; + let text = null; if (this.node.textId) { text = this.node.textId; } @@ -2241,7 +2260,7 @@ class VwWeconnect extends utils.Adapter { }); adapter.updateName(newPath, text); } else if (isTripData && isNumberNode) { - var text = null; + let text = null; if (this.node.timestamp) { text = this.node.timestamp; } @@ -2309,14 +2328,14 @@ class VwWeconnect extends utils.Adapter { getStatusKeys(statusJson) { const adapter = this; - var result = null; + let result = null; if (statusJson && statusJson.data) { if (Array.isArray(statusJson.data)) { result = new Array(statusJson.data.length); statusJson.data.forEach(function (dataValue, dataIndex) { if (dataValue && dataValue.id) { if (dataValue.field && Array.isArray(dataValue.field)) { - var newList = new Array(dataValue.field.length); + const newList = new Array(dataValue.field.length); dataValue.field.forEach(function (fieldValue, fieldIndex) { if (fieldValue && fieldValue.id) { newList[fieldIndex] = { id: fieldValue.id, unit: fieldValue.unit }; @@ -2612,10 +2631,13 @@ class VwWeconnect extends utils.Adapter { const byteChallenge = this.toByteArray(challenge); const webcrypto = new Crypto(); const concat = new Int8Array(pin.concat(byteChallenge)); - const digest = webcrypto.subtle.digest("SHA-512", concat).then((digest) => { - const utf8Array = new Int8Array(digest); - resolve(this.toHexString(utf8Array)); - }); + webcrypto.subtle + .digest("SHA-512", concat) + .then((digest) => { + const utf8Array = new Int8Array(digest); + resolve(this.toHexString(utf8Array)); + }) + .catch(); }); } getCodeChallenge() { @@ -2662,10 +2684,10 @@ class VwWeconnect extends utils.Adapter { } } randomString(length) { - var result = ""; - var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - var charactersLength = characters.length; - for (var i = 0; i < length; i++) { + let result = ""; + const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + const charactersLength = characters.length; + for (let i = 0; i < length; i++) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; @@ -2707,7 +2729,7 @@ class VwWeconnect extends utils.Adapter { const settingsPath = id.split(".")[4]; const pre = this.name + "." + this.instance; const states = await this.getStatesAsync(pre + "." + vin + ".status." + settingsPath + ".*"); - let body = {}; + const body = {}; const allIds = Object.keys(states); allIds.forEach((keyName) => { const key = keyName.split(".").splice(-1)[0]; @@ -3034,9 +3056,11 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }).then(() => { - this.setState(vin + ".position.address." + key, body.address[key], true); - }); + }) + .then(() => { + this.setState(vin + ".position.address." + key, body.address[key], true); + }) + .catch(); }); } catch (err) { this.log.error(err); From 61f93acbb37e9a15b8f9d2a2a383f13e10978f4d Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 7 Feb 2021 23:23:51 +0100 Subject: [PATCH 239/729] add relogin timeout and newestitem for wecharge --- main.js | 74 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/main.js b/main.js index d003fbd3..510a47f7 100644 --- a/main.js +++ b/main.js @@ -852,10 +852,13 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); body && this.log.error(body); resp && this.log.error(resp.statusCode.toString()); - this.log.error("Relogin"); - this.login().catch(() => { - this.log.error("Failed relogin"); - }); + setTimeout(() => { + this.log.error("Relogin"); + this.login().catch(() => { + this.log.error("Failed relogin"); + }); + }, 5 * 60 * 1000); + reject(); return; } @@ -951,7 +954,9 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState("personal." + key, data[key], true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); }); resolve(); @@ -1054,7 +1059,9 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState("car." + key, data[key], true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); }); resolve(); @@ -1226,7 +1233,9 @@ class VwWeconnect extends utils.Adapter { } adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); } }); }); @@ -1504,7 +1513,10 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState("wecharge.chargeandpay.recordsJson", JSON.stringify(body), true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); + this.extractKeys(this, "wecharge.chargeandpay.records.newesItem", body[0]); }) .catch((hideError) => { if (hideError) { @@ -1538,7 +1550,11 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState("wecharge.homecharging.stations." + station.name + ".sessionsJson", JSON.stringify(body), true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); + + this.extractKeys(this, "wecharge.homecharging.stations." + station.name + ".sessions.newesItem", body[0]); }) .catch((hideError) => { if (hideError) { @@ -1579,7 +1595,10 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState("wecharge.homecharging.recordsJson", JSON.stringify(body), true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); + this.extractKeys(this, "wecharge.homecharging.records.newesItem", body[0]); }) .catch((hideError) => { if (hideError) { @@ -1737,7 +1756,12 @@ class VwWeconnect extends utils.Adapter { this.redirect = "weconnect://authenticated"; this.xrequest = "com.volkswagen.weconnect"; this.responseType = "code id_token token"; - this.login().catch(() => {}); + setTimeout(() => { + this.log.error("Relogin"); + this.login().catch(() => { + this.log.error("Failed relogin"); + }); + }, 5 * 60 * 1000); reject(); return; } @@ -1902,7 +1926,9 @@ class VwWeconnect extends utils.Adapter { } adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); } } }); @@ -2064,7 +2090,9 @@ class VwWeconnect extends utils.Adapter { body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; } }) - .catch(); + .catch((error) => { + this.log.error(error); + }); } if (body === undefined || body === "" || body.error) { @@ -2129,7 +2157,9 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState(vin + ".tripdata" + this.config.tripType + ".rawJson", JSON.stringify(result.tripData), true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); this.setObjectNotExistsAsync(vin + ".tripdata" + this.config.tripType + ".lastTrip", { type: "state", @@ -2145,7 +2175,9 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState(vin + ".tripdata" + this.config.tripType + ".lastTrip", result.tripData.length, true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); this.extractKeys(this, vin + ".tripdata" + this.config.tripType, result, null, true); @@ -2228,7 +2260,9 @@ class VwWeconnect extends utils.Adapter { } adapter.setState(newPath, value || this.node, true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { // setOutsideTemperature(vin, value); //} @@ -2637,7 +2671,9 @@ class VwWeconnect extends utils.Adapter { const utf8Array = new Int8Array(digest); resolve(this.toHexString(utf8Array)); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); }); } getCodeChallenge() { @@ -3060,7 +3096,9 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.setState(vin + ".position.address." + key, body.address[key], true); }) - .catch(); + .catch((error) => { + this.log.error(error); + }); }); } catch (err) { this.log.error(err); From 1f1ea7efcaab6861124e292e2b04eb4afdc7ebba Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 7 Feb 2021 23:27:24 +0100 Subject: [PATCH 240/729] 0.0.27 --- README.md | 4 ++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6a4d26d..87a76f72 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.27 + +- fix skoda refreshToken, smaller improvements + ### 0.0.26 - bugfixes diff --git a/io-package.json b/io-package.json index b2800548..00b042ce 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.26", + "version": "0.0.27", "news": { + "0.0.27": { + "en": "fix skoda refreshToken, smaller improvements" + }, "0.0.26": { "en": "bugfixes" }, diff --git a/package.json b/package.json index 9967957b..95a6f733 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.26" + "version": "0.0.27" } \ No newline at end of file From 8bfae39780d04d24cc530b09a850526a79ac3d4d Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 8 Feb 2021 08:03:16 +0100 Subject: [PATCH 241/729] update travis --- .travis.yml | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16d82a1e..92ba676f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,33 @@ os: - - linux - - osx - - windows - + - linux + - osx + - windows + language: node_js node_js: - - '10' - - '12' - + - "10" + - "12" + - "14" + - "15" + +env: + - CXX=g++-4.8 addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 before_install: - - 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CC=clang++; export CXX=clang++; export CXXFLAGS=-std=c++11; fi' - - 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CC=g++-4.9; fi' + - 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then CC=gcc-4.9; fi' + - 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then CC=g++-4.9; fi' before_script: - - export NPMVERSION=$(echo "$($(which npm) -v)"|cut -c1) - - 'if [[ $NPMVERSION == 5 ]]; then npm install -g npm; fi' - - npm -v + - export NPMVERSION=$(echo "$($(which npm) -v)"|cut -c1) + - "if [[ $NPMVERSION == 5 ]]; then npm install -g npm; fi" + - npm -v script: - - npm run test:package - - npm run test:unit - - export DEBUG=testing:* - - npm run test:integration + - npm run test:package + - npm run test:unit + - export DEBUG=testing:* + - npm run test:integration From 26ef045243b3c4b4584248c7b69eee1b25fd2e16 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 8 Feb 2021 08:18:16 +0100 Subject: [PATCH 242/729] add github action --- .github/auto-merge.yml | 17 +++ .github/dependabot.yml | 12 ++ .github/workflows/dependabot-auto-merge.yml | 22 ++++ .github/workflows/test-and-release.yml | 135 ++++++++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 .github/auto-merge.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-auto-merge.yml create mode 100644 .github/workflows/test-and-release.yml diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml new file mode 100644 index 00000000..4f6d185f --- /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 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..4a5b6fee --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: monthly + time: "04:00" + timezone: Europe/Berlin + open-pull-requests-limit: 20 + assignees: + - TA2k + versioning-strategy: increase diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..4ec6b532 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.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 diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml new file mode 100644 index 00000000..cb144639 --- /dev/null +++ b/.github/workflows/test-and-release.yml @@ -0,0 +1,135 @@ +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: + # normal versions + - "v[0-9]+.[0-9]+.[0-9]+" + # pre-releases + - "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: [14.x] + + steps: + - 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: Install Dependencies + run: npm install + + - name: Lint source code + run: npm run lint + - name: Test package files + run: npm run test:package + + # Runs adapter tests on all supported node versions and OSes + adapter-tests: + if: contains(github.event.head_commit.message, '[skip ci]') == false + + needs: [check-and-lint] + + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - 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: Install Dependencies + run: npm install + + - name: Run unit tests + run: npm run test:unit + + - name: Run integration tests (unix only) + if: startsWith(runner.OS, 'windows') == false + run: DEBUG=testing:* npm run test:integration + + - name: Run integration tests (windows only) + if: startsWith(runner.OS, 'windows') + run: set DEBUG=testing:* & npm run test:integration +# TODO: To enable automatic npm releases, create a token on npmjs.org +# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options +# Then uncomment the following block: + +# # Deploys the final package to NPM +# deploy: +# needs: [adapter-tests] +# +# # Trigger this step only when a commit on any branch is tagged with a version number +# if: | +# contains(github.event.head_commit.message, '[skip ci]') == false && +# github.event_name == 'push' && +# startsWith(github.ref, 'refs/tags/v') +# +# runs-on: ubuntu-latest +# strategy: +# matrix: +# node-version: [14.x] +# +# steps: +# - 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 +# id: extract_release +# # The body may be multiline, therefore newlines and % need to be escaped +# run: | +# VERSION="${{ github.ref }}" +# VERSION=${VERSION##*/v} +# 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-output name=BODY::$BODY" +# +# - name: Publish package to npm +# run: | +# npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} +# npm whoami +# npm publish +# +# - name: Create Github Release +# uses: actions/create-release@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# tag_name: ${{ github.ref }} +# release_name: Release v${{ steps.extract_release.outputs.VERSION }} +# draft: false +# # Prerelease versions create prereleases on Github +# prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} +# body: ${{ steps.extract_release.outputs.BODY }} From 3ca4e0b40bd641a786ba8142cadacd377dd28b07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:10:55 +0000 Subject: [PATCH 243/729] Update @peculiar/webcrypto requirement from ^1.0.22 to ^1.1.6 Updates the requirements on [@peculiar/webcrypto](https://github.com/PeculiarVentures/webcrypto) to permit the latest version. - [Release notes](https://github.com/PeculiarVentures/webcrypto/releases) - [Commits](https://github.com/PeculiarVentures/webcrypto/compare/v1.0.22...v1.1.6) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 95a6f733..871647da 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "bundleDependencies": false, "dependencies": { "@iobroker/adapter-core": "^1.0.3", - "@peculiar/webcrypto": "^1.0.22", + "@peculiar/webcrypto": "^1.1.6", "jsdom": "^15.2.1", "request": "^2.88.0", "traverse": "^0.6.6", From 6b43ac514d4fad59e821bbff9552e3eba0548b1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:13:30 +0000 Subject: [PATCH 244/729] Bump @iobroker/testing from 1.3.1 to 2.4.2 Bumps [@iobroker/testing](https://github.com/AlCalzone/testing) from 1.3.1 to 2.4.2. - [Release notes](https://github.com/AlCalzone/testing/releases) - [Changelog](https://github.com/ioBroker/testing/blob/master/CHANGELOG.md) - [Commits](https://github.com/AlCalzone/testing/compare/v1.3.1...v2.4.2) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 95a6f733..34ac2f9b 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "deprecated": false, "description": "Adapter for VW Connect", "devDependencies": { - "@iobroker/testing": "^1.3.0", + "@iobroker/testing": "^2.4.2", "@types/chai": "^4.2.4", "@types/chai-as-promised": "^7.1.2", "@types/gulp": "^4.0.6", From 7aea5366304515b93fb3788c7f7ea8399a6ba6c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:33:15 +0000 Subject: [PATCH 245/729] Bump jsdom from 15.2.1 to 16.4.0 Bumps [jsdom](https://github.com/jsdom/jsdom) from 15.2.1 to 16.4.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/15.2.1...16.4.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..e4794b8e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dependencies": { "@iobroker/adapter-core": "^1.0.3", "@peculiar/webcrypto": "^1.1.6", - "jsdom": "^15.2.1", + "jsdom": "^16.4.0", "request": "^2.88.0", "traverse": "^0.6.6", "uuid": "^3.3.3" From e4963d940827d2bc5e3a1f635ea9a24ce52450fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:33:22 +0000 Subject: [PATCH 246/729] Bump @iobroker/adapter-core from 1.0.3 to 2.4.0 Bumps [@iobroker/adapter-core](https://github.com/ioBroker/adapter-core) from 1.0.3 to 2.4.0. - [Release notes](https://github.com/ioBroker/adapter-core/releases) - [Commits](https://github.com/ioBroker/adapter-core/commits) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..2999263d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "bundleDependencies": false, "dependencies": { - "@iobroker/adapter-core": "^1.0.3", + "@iobroker/adapter-core": "^2.4.0", "@peculiar/webcrypto": "^1.1.6", "jsdom": "^15.2.1", "request": "^2.88.0", From 018c9ba9291c4485b82943a766c1486f98830985 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:33:57 +0000 Subject: [PATCH 247/729] Update @types/gulp requirement from ^4.0.6 to ^4.0.8 Updates the requirements on [@types/gulp](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/gulp) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/gulp) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..2bcd2820 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@iobroker/testing": "^2.4.2", "@types/chai": "^4.2.4", "@types/chai-as-promised": "^7.1.2", - "@types/gulp": "^4.0.6", + "@types/gulp": "^4.0.8", "@types/mocha": "^5.2.7", "@types/node": "^10.17.3", "@types/proxyquire": "^1.3.28", From 46bbbb4d321fb38435d9235ae7221dc2a49cf9dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:34:03 +0000 Subject: [PATCH 248/729] Update @types/chai requirement from ^4.2.4 to ^4.2.14 Updates the requirements on [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..dc7f93b6 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "description": "Adapter for VW Connect", "devDependencies": { "@iobroker/testing": "^2.4.2", - "@types/chai": "^4.2.4", + "@types/chai": "^4.2.14", "@types/chai-as-promised": "^7.1.2", "@types/gulp": "^4.0.6", "@types/mocha": "^5.2.7", From 1ce329d4c3686d230d1b39c40c11be2e8c7ab20c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:34:16 +0000 Subject: [PATCH 249/729] Update chai requirement from ^4.2.0 to ^4.3.0 Updates the requirements on [chai](https://github.com/chaijs/chai) to permit the latest version. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/master/History.md) - [Commits](https://github.com/chaijs/chai/compare/4.2.0...4.3.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..d20da934 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@types/proxyquire": "^1.3.28", "@types/sinon": "^7.5.0", "@types/sinon-chai": "^3.2.3", - "chai": "^4.2.0", + "chai": "^4.3.0", "chai-as-promised": "^7.1.1", "eslint": "^6.6.0", "gulp": "^4.0.2", From 587a391b70d7f945736cf0168c3d7708db7a68ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:35:29 +0000 Subject: [PATCH 250/729] Bump @types/node from 10.17.51 to 14.14.25 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.51 to 14.14.25. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..e21c4009 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@types/chai-as-promised": "^7.1.2", "@types/gulp": "^4.0.6", "@types/mocha": "^5.2.7", - "@types/node": "^10.17.3", + "@types/node": "^14.14.25", "@types/proxyquire": "^1.3.28", "@types/sinon": "^7.5.0", "@types/sinon-chai": "^3.2.3", From 364ba5b3cb433086941b468893d70b6966689ecd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:07:15 +0000 Subject: [PATCH 251/729] Update sinon-chai requirement from ^3.3.0 to ^3.5.0 Updates the requirements on [sinon-chai](https://github.com/domenic/sinon-chai) to permit the latest version. - [Release notes](https://github.com/domenic/sinon-chai/releases) - [Changelog](https://github.com/domenic/sinon-chai/blob/master/CHANGELOG.md) - [Commits](https://github.com/domenic/sinon-chai/compare/3.3.0...3.5.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..55de86d8 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "mocha": "^6.2.2", "proxyquire": "^2.1.3", "sinon": "^7.5.0", - "sinon-chai": "^3.3.0" + "sinon-chai": "^3.5.0" }, "engines": { "node": ">=10.0.0" From 0e5d16b574c4311a1768267e0bfb45df21709ff5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:08:19 +0000 Subject: [PATCH 252/729] Bump @types/sinon from 7.5.2 to 9.0.10 Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 7.5.2 to 9.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..0775c318 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^10.17.3", "@types/proxyquire": "^1.3.28", - "@types/sinon": "^7.5.0", + "@types/sinon": "^9.0.10", "@types/sinon-chai": "^3.2.3", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", From d4f91384f702a15f946d4b88cae2a25c8825d45b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:09:32 +0000 Subject: [PATCH 253/729] Bump mocha from 6.2.3 to 8.2.1 Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.3 to 8.2.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v6.2.3...v8.2.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..0bb41ad3 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "chai-as-promised": "^7.1.1", "eslint": "^6.6.0", "gulp": "^4.0.2", - "mocha": "^6.2.2", + "mocha": "^8.2.1", "proxyquire": "^2.1.3", "sinon": "^7.5.0", "sinon-chai": "^3.3.0" From 1d26583507fd9305a47e6e4981934511273bec50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 11:00:38 +0000 Subject: [PATCH 254/729] Bump eslint from 6.8.0 to 7.19.0 Bumps [eslint](https://github.com/eslint/eslint) from 6.8.0 to 7.19.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v6.8.0...v7.19.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9989c34..422717e4 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@types/sinon-chai": "^3.2.3", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "eslint": "^6.6.0", + "eslint": "^7.19.0", "gulp": "^4.0.2", "mocha": "^6.2.2", "proxyquire": "^2.1.3", From bc50621c11999d1f02de25e637e8af2a65693de2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 13:01:32 +0000 Subject: [PATCH 255/729] Bump sinon from 7.5.0 to 9.2.4 Bumps [sinon](https://github.com/sinonjs/sinon) from 7.5.0 to 9.2.4. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v7.5.0...v9.2.4) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f4f2a4c7..3c9645cd 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "gulp": "^4.0.2", "mocha": "^6.2.2", "proxyquire": "^2.1.3", - "sinon": "^7.5.0", + "sinon": "^9.2.4", "sinon-chai": "^3.5.0" }, "engines": { From 27f928620268ef7bf8a1db5295d0eac865955435 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 8 Feb 2021 14:08:03 +0100 Subject: [PATCH 256/729] fix typo 0.0.28 --- README.md | 2 +- io-package.json | 4 ++-- main.js | 8 ++++---- package.json | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 87a76f72..d649199f 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Door and window states: ## Changelog -### 0.0.27 +### 0.0.28 - fix skoda refreshToken, smaller improvements diff --git a/io-package.json b/io-package.json index 00b042ce..a1868187 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.27", + "version": "0.0.28", "news": { - "0.0.27": { + "0.0.28": { "en": "fix skoda refreshToken, smaller improvements" }, "0.0.26": { diff --git a/main.js b/main.js index 510a47f7..295461ca 100644 --- a/main.js +++ b/main.js @@ -11,7 +11,7 @@ const utils = require("@iobroker/adapter-core"); const request = require("request"); const crypto = require("crypto"); const { Crypto } = require("@peculiar/webcrypto"); -const uuidv4 = require("uuid/v4"); +const { v4: uuidv4 } = require("uuid"); const traverse = require("traverse"); const jsdom = require("jsdom"); const { extractKeys } = require("./lib/extractKeys"); @@ -1516,7 +1516,7 @@ class VwWeconnect extends utils.Adapter { .catch((error) => { this.log.error(error); }); - this.extractKeys(this, "wecharge.chargeandpay.records.newesItem", body[0]); + this.extractKeys(this, "wecharge.chargeandpay.records.latestItem", body[0]); }) .catch((hideError) => { if (hideError) { @@ -1554,7 +1554,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); }); - this.extractKeys(this, "wecharge.homecharging.stations." + station.name + ".sessions.newesItem", body[0]); + this.extractKeys(this, "wecharge.homecharging.stations." + station.name + ".sessions.latestItem", body[0]); }) .catch((hideError) => { if (hideError) { @@ -1598,7 +1598,7 @@ class VwWeconnect extends utils.Adapter { .catch((error) => { this.log.error(error); }); - this.extractKeys(this, "wecharge.homecharging.records.newesItem", body[0]); + this.extractKeys(this, "wecharge.homecharging.records.latestItem", body[0]); }) .catch((hideError) => { if (hideError) { diff --git a/package.json b/package.json index a5c28702..f3db8441 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "jsdom": "^16.4.0", "request": "^2.88.0", "traverse": "^0.6.6", - "uuid": "^3.3.3" + "uuid": "^8.3.2" }, "deprecated": false, "description": "Adapter for VW Connect", @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.27" + "version": "0.0.28" } \ No newline at end of file From 26735e5d1f27374760d6ef69fd79cab64d97e53f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 13:12:12 +0000 Subject: [PATCH 257/729] Update @types/chai-as-promised requirement from ^7.1.2 to ^7.1.3 Updates the requirements on [@types/chai-as-promised](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai-as-promised) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai-as-promised) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5c28702..4c2b1b48 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@iobroker/testing": "^2.4.2", "@types/chai": "^4.2.14", - "@types/chai-as-promised": "^7.1.2", + "@types/chai-as-promised": "^7.1.3", "@types/gulp": "^4.0.8", "@types/mocha": "^5.2.7", "@types/node": "^14.14.25", From 39ceefaab758d0135015ae59668bd1c2ab4b12c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 13:12:33 +0000 Subject: [PATCH 258/729] Bump @types/mocha from 5.2.7 to 8.2.0 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 5.2.7 to 8.2.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5c28702..3f5754fe 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@types/chai": "^4.2.14", "@types/chai-as-promised": "^7.1.2", "@types/gulp": "^4.0.8", - "@types/mocha": "^5.2.7", + "@types/mocha": "^8.2.0", "@types/node": "^14.14.25", "@types/proxyquire": "^1.3.28", "@types/sinon": "^9.0.10", From 9709198c1d2734d9f02f22b34a49dc82315088b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 13:12:51 +0000 Subject: [PATCH 259/729] Update @types/sinon-chai requirement from ^3.2.3 to ^3.2.5 Updates the requirements on [@types/sinon-chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon-chai) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon-chai) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5c28702..b588c5d8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "^14.14.25", "@types/proxyquire": "^1.3.28", "@types/sinon": "^9.0.10", - "@types/sinon-chai": "^3.2.3", + "@types/sinon-chai": "^3.2.5", "chai": "^4.3.0", "chai-as-promised": "^7.1.1", "eslint": "^7.19.0", From 6cf9c5590e15c3f953091f3c1375e5086a1b9981 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 13:16:21 +0000 Subject: [PATCH 260/729] Update request requirement from ^2.88.0 to ^2.88.2 Updates the requirements on [request](https://github.com/request/request) to permit the latest version. - [Release notes](https://github.com/request/request/releases) - [Changelog](https://github.com/request/request/blob/master/CHANGELOG.md) - [Commits](https://github.com/request/request/commits) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3db8441..1705fe5f 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@iobroker/adapter-core": "^2.4.0", "@peculiar/webcrypto": "^1.1.6", "jsdom": "^16.4.0", - "request": "^2.88.0", + "request": "^2.88.2", "traverse": "^0.6.6", "uuid": "^8.3.2" }, From aefef166372379c7f461aa112ecee2b910576ac4 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 8 Feb 2021 21:19:07 +0100 Subject: [PATCH 261/729] add err check --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 295461ca..e43e9a80 100644 --- a/main.js +++ b/main.js @@ -329,7 +329,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (this.type === "Wc") { - if (err.message === "Invalid protocol: wecharge:") { + if (err && err.message === "Invalid protocol: wecharge:") { this.log.debug("Found WeCharge connection"); this.getTokens(loginRequest, code_verifier, reject, resolve); } else { @@ -338,17 +338,18 @@ class VwWeconnect extends utils.Adapter { } return; } - if (err.message.indexOf("Invalid protocol:") !== -1) { + if (err && err.message.indexOf("Invalid protocol:") !== -1) { this.log.debug("Found Token"); this.getTokens(loginRequest, code_verifier, reject, resolve); return; } - loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); this.log.error("Failed in first login step "); err && this.log.error(err); err && this.log.error(JSON.stringify(err)); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); + + loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); reject(); return; } @@ -1145,7 +1146,6 @@ class VwWeconnect extends utils.Adapter { role: "indicator", type: "mixed", write: false, - read: true, }, native: {}, From c05223d282aa2b1a88658bcfe126c484fc30bf30 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 10 Feb 2021 22:58:28 +0100 Subject: [PATCH 262/729] 0.0.29 --- README.md | 2 +- io-package.json | 4 ++-- main.js | 15 +++++++++------ package.json | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d649199f..b3c5561d 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Door and window states: ## Changelog -### 0.0.28 +### 0.0.29 - fix skoda refreshToken, smaller improvements diff --git a/io-package.json b/io-package.json index a1868187..dd0bda7d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.28", + "version": "0.0.29", "news": { - "0.0.28": { + "0.0.29": { "en": "fix skoda refreshToken, smaller improvements" }, "0.0.26": { diff --git a/main.js b/main.js index e43e9a80..a17d865d 100644 --- a/main.js +++ b/main.js @@ -306,10 +306,13 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "id" && this.type !== "Wc") { url = await this.receiveLoginUrl().catch(() => { - this.log.warn("Failled url login"); + this.log.warn("Failed to get login url"); }); + if (!url) { + url = "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; + } } - const loginRequest = request( + let loginRequest = request( { method: method, url: url, @@ -333,7 +336,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug("Found WeCharge connection"); this.getTokens(loginRequest, code_verifier, reject, resolve); } else { - this.log.debug("No WeCharge found cancel login"); + this.log.debug("No WeCharge found, cancel login"); resolve(); } return; @@ -554,7 +557,7 @@ class VwWeconnect extends utils.Adapter { request( { method: "GET", - url: "https://login.apps.emea.vwapps.io/authorize?nonce=NZ2Q3T6jak0E5pDh&redirect_uri=weconnect://authenticated", + url: "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", headers: { Host: "login.apps.emea.vwapps.io", "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1", @@ -858,7 +861,7 @@ class VwWeconnect extends utils.Adapter { this.login().catch(() => { this.log.error("Failed relogin"); }); - }, 5 * 60 * 1000); + }, 1 * 60 * 1000); reject(); return; @@ -1761,7 +1764,7 @@ class VwWeconnect extends utils.Adapter { this.login().catch(() => { this.log.error("Failed relogin"); }); - }, 5 * 60 * 1000); + }, 1 * 60 * 1000); reject(); return; } diff --git a/package.json b/package.json index e8226cfe..b2f5243f 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.28" + "version": "0.0.29" } \ No newline at end of file From 549c7976690de4768cde80a38707d5e4190e6984 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 13 Feb 2021 08:31:05 +0100 Subject: [PATCH 263/729] improve force update text --- admin/index_m.html | 4 +++- main.js | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index e7af2d92..5cb61446 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -106,7 +106,9 @@
- +
diff --git a/main.js b/main.js index a17d865d..7fc387d7 100644 --- a/main.js +++ b/main.js @@ -1124,7 +1124,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -1820,7 +1820,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -1888,7 +1888,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -1977,7 +1977,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -2050,7 +2050,7 @@ class VwWeconnect extends utils.Adapter { return; } else { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update is too often."); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); From 0ca10647a9b0923af93f3bfc15d440d1774773c2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 23 Feb 2021 09:23:04 +0100 Subject: [PATCH 264/729] improve extraction --- lib/extractKeys.js | 61 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index d2c0abe3..928e089b 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,4 +1,4 @@ -//v2.2 +//v2.4 async function extractKeys(adapter, path, element, preferedArrayName, forceIndex) { try { if (element === null || element === undefined) { @@ -24,28 +24,57 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex }); write = true; } - objectKeys.forEach(async (key) => { - if (isJsonString(element[key])) { - element[key] = JSON.parse(element[key]); - } - if (Array.isArray(element[key])) { - extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex); - } else if (element[key] !== null && typeof element[key] === "object") { - extractKeys(adapter, path + "." + key, element[key]); - } else { - await adapter.setObjectNotExistsAsync(path + "." + key, { + if (typeof element === "string") { + adapter + .setObjectNotExistsAsync(path, { type: "state", common: { - name: key, + name: element, role: "indicator", - type: typeof element[key], + type: typeof element, write: write, read: true, }, native: {}, + }) + .then(() => { + adapter.setState(path, element, true); + }) + .catch((error) => { + adapter.log.error(error); }); - adapter.setState(path + "." + key, element[key], true); + return; + } + + objectKeys.forEach((key) => { + if (isJsonString(element[key])) { + element[key] = JSON.parse(element[key]); + } + + if (Array.isArray(element[key])) { + extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex); + } else if (element[key] !== null && typeof element[key] === "object") { + extractKeys(adapter, path + "." + key, element[key]); + } else { + adapter + .setObjectNotExistsAsync(path + "." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: typeof element[key], + write: write, + read: true, + }, + native: {}, + }) + .then(() => { + adapter.setState(path + "." + key, element[key], true); + }) + .catch((error) => { + adapter.log.error(error); + }); } }); } catch (error) { @@ -106,8 +135,8 @@ function extractArray(adapter, element, key, path, write, preferedArrayName, for //special case array with 2 string objects if (Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string") { let subKey = arrayElement[Object.keys(arrayElement)[0]]; - let subValue = arrayElement[Object.keys(arrayElement)[1]]; - let subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; + const subValue = arrayElement[Object.keys(arrayElement)[1]]; + const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; if (key) { subKey = key + "." + subKey; } From 3c3e54c9311c7f87f7ebd2d4f386fae9a829c038 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 23 Feb 2021 22:57:56 +0100 Subject: [PATCH 265/729] fix for multiple cars and vw v2 --- admin/index_m.html | 3 +- main.js | 69 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 5cb61446..f8f57e5d 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -87,6 +87,7 @@ +
@@ -115,7 +116,7 @@
diff --git a/main.js b/main.js index 7fc387d7..553880c6 100644 --- a/main.js +++ b/main.js @@ -1,3 +1,4 @@ +// @ts-nocheck "use strict"; /* @@ -40,7 +41,8 @@ class VwWeconnect extends utils.Adapter { this.fupdateInterval = null; this.refreshTokenTimeout = null; - this.homeRegion = "https://msg.volkswagen.de"; + this.homeRegion = {}; + this.homeRegionSetter = {}; this.vinArray = []; this.etags = {}; @@ -151,6 +153,18 @@ class VwWeconnect extends utils.Adapter { this.xappversion = "1.1.29"; this.xappname = "SEATConnect"; } + if (this.config.type === "vwv2") { + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; + this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; + this.scope = "openid profile mbb cars birthdate nickname address phone"; + this.redirect = "carnet://identity-kit/login"; + this.xrequest = "de.volkswagen.car-net.eu.e-remote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.6.7"; + this.xappname = "We Connect"; + } if (this.config.type === "audi") { this.type = "Audi"; this.country = "DE"; @@ -197,7 +211,7 @@ class VwWeconnect extends utils.Adapter { } else { this.getHomeRegion(vin) .catch(() => { - this.log.debug("get home region Failed"); + this.log.debug("get home region Failed " + vin); }) .finally(() => { this.getVehicleData(vin).catch(() => { @@ -215,7 +229,7 @@ class VwWeconnect extends utils.Adapter { }); }) .catch(() => { - this.log.error("status update Failed"); + this.log.error("status update Failed " + vin); }); }) .catch(() => { @@ -298,7 +312,7 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "go") { + if (this.config.type === "vw" || this.config.type === "vwv2" || this.config.type === "go") { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } if (this.config.type === "audi") { @@ -312,7 +326,7 @@ class VwWeconnect extends utils.Adapter { url = "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; } } - let loginRequest = request( + const loginRequest = request( { method: method, url: url, @@ -583,9 +597,9 @@ class VwWeconnect extends utils.Adapter { }); } replaceVarInUrl(url, vin) { - const curHomeRegion = this.homeRegion; + const curHomeRegion = this.homeRegion[vin]; return url - .replace("/$vin/", "/" + vin + "/") + .replace("/$vin", "/" + vin + "") .replace("$homeregion/", curHomeRegion + "/") .replace("/$type/", "/" + this.type + "/") .replace("/$country/", "/" + this.country + "/") @@ -637,7 +651,7 @@ class VwWeconnect extends utils.Adapter { "x-app-name": this.xappname, accept: "application/json", }; - if (this.config.type === "vw") { + if (this.config.type === "vw" || this.config.type === "vwv2") { body += "&code_verifier=" + code_verifier; } else { body += "&brand=" + this.config.type; @@ -1002,11 +1016,12 @@ class VwWeconnect extends utils.Adapter { reject(); } this.log.debug(vin + ": " + JSON.stringify(body)); + this.homeRegion[vin] = "https://msg.volkswagen.de"; if (body.homeRegion && body.homeRegion.baseUri && body.homeRegion.baseUri.content) { if (body.homeRegion.baseUri.content !== "https://mal-1a.prd.ece.vwg-connect.com/api") { - this.homeRegion = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); - this.homeRegionSetter = body.homeRegion.baseUri.content.split("/api")[0]; - this.log.debug("Set URL to: " + this.homeRegion); + this.homeRegion[vin] = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); + this.homeRegionSetter[vin] = body.homeRegion.baseUri.content.split("/api")[0]; + this.log.debug("Set URL to: " + this.homeRegion[vin]); } } resolve(); @@ -1795,7 +1810,7 @@ class VwWeconnect extends utils.Adapter { } let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw" && this.config.type !== "audi" && this.config.type !== "id" && this.config.type !== "seat" && this.config.type !== "skoda") { + if (this.config.type !== "vw" && this.config.type !== "vwv2" && this.config.type !== "audi" && this.config.type !== "id" && this.config.type !== "seat" && this.config.type !== "skoda") { url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); accept = "application/json"; } @@ -1865,7 +1880,7 @@ class VwWeconnect extends utils.Adapter { return; } let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; - if (this.config.type === "vw") { + if (this.config.type === "vw" || this.config.type === "vwv2") { url += "/users/" + this.config.identifier; } request.get( @@ -1953,14 +1968,22 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - const url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + let method = "POST"; + let url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + let accept = "application/json"; if (this.config.type === "vw") { accept = "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; } - request.post( + if (this.config.type === "vwv2") { + method = "GET"; + url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); + accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + } + request( { + method: method, url: url, headers: { "User-Agent": "okhttp/3.7.0", @@ -1976,11 +1999,13 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + this.log.error(vin); if (resp && resp.statusCode === 429) { this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); reject(); return; } @@ -1988,6 +2013,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); resolve(); } catch (err) { + this.log.error(vin); this.log.error(err); reject(); } @@ -2010,10 +2036,10 @@ class VwWeconnect extends utils.Adapter { } } let accept = "application/json"; - if (this.config.type === "vw") { + if (this.config.type === "vw" || this.config.type === "vwv2") { accept = "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json, */*"; - if (this.homeRegion === "https://msg.volkswagen.de") { + if (this.homeRegion[vin] === "https://msg.volkswagen.de") { accept += ", application/json"; } } @@ -2040,6 +2066,7 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } else if (resp && resp.statusCode === 401) { + this.log.error(vin); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); @@ -2554,8 +2581,8 @@ class VwWeconnect extends utils.Adapter { requestSecToken(vin, service) { return new Promise((resolve, reject) => { let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested"; - if (this.homeRegionSetter) { - url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); + if (this.homeRegionSetter[vin]) { + url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter[vin]); } this.log.debug(url); request.get( @@ -2600,8 +2627,8 @@ class VwWeconnect extends utils.Adapter { }, }; let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed"; - if (this.homeRegionSetter) { - url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter); + if (this.homeRegionSetter[vin]) { + url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter[vin]); } request.post( { From da78f22c25d5b09f32f1f1914fafa06d0c422703 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 24 Feb 2021 15:27:03 +0100 Subject: [PATCH 266/729] 0.0.30 --- README.md | 4 ++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b3c5561d..b6742c18 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.30 + +- fix mutiple car problem, add VWv2 mode at the moment there is no different between VW and VWv2 + ### 0.0.29 - fix skoda refreshToken, smaller improvements diff --git a/io-package.json b/io-package.json index dd0bda7d..8d161da0 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.29", + "version": "0.0.30", "news": { + "0.0.30": { + "en": "fix problem with multiple cars, add VWv2 mode, VW and VWv2 are equal at the moment" + }, "0.0.29": { "en": "fix skoda refreshToken, smaller improvements" }, diff --git a/package.json b/package.json index b2f5243f..a678c54c 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.29" + "version": "0.0.30" } \ No newline at end of file From bec684af8e8f8e1420d912cefda5d4164d2b4053 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 03:04:06 +0000 Subject: [PATCH 267/729] Update eslint requirement from ^7.19.0 to ^7.21.0 Updates the requirements on [eslint](https://github.com/eslint/eslint) to permit the latest version. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.19.0...v7.21.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a678c54c..c7469daa 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@types/sinon-chai": "^3.2.5", "chai": "^4.3.0", "chai-as-promised": "^7.1.1", - "eslint": "^7.19.0", + "eslint": "^7.21.0", "gulp": "^4.0.2", "mocha": "^8.2.1", "proxyquire": "^2.1.3", From 03495671d90b629572aa24fbc97211e1db858e75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 03:06:04 +0000 Subject: [PATCH 268/729] Update @types/node requirement from ^14.14.25 to ^14.14.31 Updates the requirements on [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) to permit the latest version. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a678c54c..8cfd7aee 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@types/chai-as-promised": "^7.1.3", "@types/gulp": "^4.0.8", "@types/mocha": "^8.2.0", - "@types/node": "^14.14.25", + "@types/node": "^14.14.31", "@types/proxyquire": "^1.3.28", "@types/sinon": "^9.0.10", "@types/sinon-chai": "^3.2.5", From 2286fd9f071664df8012e93864dda1e9d637465c Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 2 Mar 2021 09:45:04 +0100 Subject: [PATCH 269/729] remove force update for id --- main.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 553880c6..9774394d 100644 --- a/main.js +++ b/main.js @@ -263,18 +263,20 @@ class VwWeconnect extends utils.Adapter { } }, this.config.interval * 60 * 1000); - if (this.config.forceinterval > 0) { - this.fupdateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach((vin) => { - this.requestStatusUpdate(vin).catch(() => { - this.log.error("force status update Failed"); + if (this.config.type !== "id") { + if (this.config.forceinterval > 0) { + this.fupdateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach((vin) => { + this.requestStatusUpdate(vin).catch(() => { + this.log.error("force status update Failed"); + }); }); - }); - }, this.config.forceinterval * 60 * 1000); + }, this.config.forceinterval * 60 * 1000); + } } }) .catch(() => { From 1413ee6195acc09ce5aba76a70dbf1fd0488607a Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 18:45:42 +0100 Subject: [PATCH 270/729] v0.0.31 support multiple trip types in parallel --- README.md | 4 ++++ admin/index_m.html | 15 ++++++-------- io-package.json | 5 ++++- main.js | 49 ++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 55 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index b6742c18..4e8e67c2 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.31 + +- enable multiple selection of trip types + ### 0.0.30 - fix mutiple car problem, add VWv2 mode at the moment there is no different between VW and VWv2 diff --git a/admin/index_m.html b/admin/index_m.html index f8f57e5d..e3738cb2 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -114,13 +114,10 @@
- - + + + +
- +
@@ -141,7 +138,7 @@
- Position in Adresse umwandeln (nur Auswählen wenn es genutzt wird) + Position in Adresse umwandeln (nur Auswählen, wenn es genutzt wird)
diff --git a/io-package.json b/io-package.json index 8d161da0..3ecb5d25 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.30", + "version": "0.0.31", "news": { + "0.0.31": { + "en": "enable multiple selection of trip types" + }, "0.0.30": { "en": "fix problem with multiple cars, add VWv2 mode, VW and VWv2 are equal at the moment" }, diff --git a/main.js b/main.js index 9774394d..e42d5ed7 100644 --- a/main.js +++ b/main.js @@ -67,7 +67,7 @@ class VwWeconnect extends utils.Adapter { element4: "Position", }, { - url: "$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", + url: [], path: "tripdata", element: "tripDataList", }, @@ -194,6 +194,24 @@ class VwWeconnect extends utils.Adapter { this.log.info("Interval of 0 is not allowed reset to 1"); this.config.interval = 1; } + var urlList = []; + if (this.config.tripShortTerm == true) { + urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/shortTerm?type=list"); + } + if (this.config.tripLongTerm == true) { + urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/longTerm?type=list"); + } + if (this.config.tripCyclic == true) { + urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/cyclic?type=list"); + } + if (urlList.length() > 0) { + this.statesArray.forEach((element, index, array) => { + if (typeof element.url == "object") { + array[index].url = urlList; + break; + } + }); + } this.login() .then(() => { this.log.debug("Login successful"); @@ -223,9 +241,17 @@ class VwWeconnect extends utils.Adapter { this.requestStatusUpdate(vin) .finally(() => { this.statesArray.forEach((state) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { - this.log.debug("error while getting " + state.url); - }); + if (typeof state.url == "object") { + state.url.array.forEach(url => { + this.getVehicleStatus(vin, url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { + this.log.debug("error while getting " + url); + }); + }); + } else { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { + this.log.debug("error while getting " + state.url); + }); + } }); }) .catch(() => { @@ -255,9 +281,17 @@ class VwWeconnect extends utils.Adapter { } else { this.vinArray.forEach((vin) => { this.statesArray.forEach((state) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); + if (typeof state.url == "object") { + state.url.array.forEach(url => { + this.getVehicleStatus(vin, url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + url); + }); + }); + } else { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + } }); }); } @@ -616,7 +650,6 @@ class VwWeconnect extends utils.Adapter { } const hashArray = hash.split("&"); // eslint-disable-next-line no-unused-vars - let state; let jwtauth_code; let jwtaccess_token; let jwtid_token; From 30ece3780e9cc5a9d1c47df605c44b271e462ef2 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 18:52:46 +0100 Subject: [PATCH 271/729] correct version in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a678c54c..06af857f 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.30" + "version": "0.0.31" } \ No newline at end of file From 8e94cf4d3ed7d10bd875ed0246b317554e032f9f Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 19:01:50 +0100 Subject: [PATCH 272/729] bugfix --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index e42d5ed7..eefa40f6 100644 --- a/main.js +++ b/main.js @@ -208,7 +208,6 @@ class VwWeconnect extends utils.Adapter { this.statesArray.forEach((element, index, array) => { if (typeof element.url == "object") { array[index].url = urlList; - break; } }); } From 02a8dfd861769c7df304db116d15cc7427a3eb63 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 19:06:46 +0100 Subject: [PATCH 273/729] bugfix --- main.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index eefa40f6..723a39df 100644 --- a/main.js +++ b/main.js @@ -67,7 +67,7 @@ class VwWeconnect extends utils.Adapter { element4: "Position", }, { - url: [], + url: null, path: "tripdata", element: "tripDataList", }, @@ -204,13 +204,11 @@ class VwWeconnect extends utils.Adapter { if (this.config.tripCyclic == true) { urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/cyclic?type=list"); } - if (urlList.length() > 0) { - this.statesArray.forEach((element, index, array) => { - if (typeof element.url == "object") { - array[index].url = urlList; - } - }); - } + this.statesArray.forEach((element, index, array) => { + if (element.url == null) { + array[index].url = urlList; + } + }); this.login() .then(() => { this.log.debug("Login successful"); From ad1b9295122dab3c3526967e6d9b96f429761db3 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 19:11:44 +0100 Subject: [PATCH 274/729] testmessage --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 723a39df..5722f0f9 100644 --- a/main.js +++ b/main.js @@ -204,6 +204,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.tripCyclic == true) { urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/cyclic?type=list"); } + this.log.info("testmeldung"); this.statesArray.forEach((element, index, array) => { if (element.url == null) { array[index].url = urlList; From d407709d503e8ceca4d785977e7e5b4248ed4ccd Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 19:15:20 +0100 Subject: [PATCH 275/729] bugfix --- main.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index 5722f0f9..8bb7bb5e 100644 --- a/main.js +++ b/main.js @@ -204,7 +204,6 @@ class VwWeconnect extends utils.Adapter { if (this.config.tripCyclic == true) { urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/cyclic?type=list"); } - this.log.info("testmeldung"); this.statesArray.forEach((element, index, array) => { if (element.url == null) { array[index].url = urlList; @@ -240,9 +239,9 @@ class VwWeconnect extends utils.Adapter { .finally(() => { this.statesArray.forEach((state) => { if (typeof state.url == "object") { - state.url.array.forEach(url => { - this.getVehicleStatus(vin, url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { - this.log.debug("error while getting " + url); + state.url.forEach(_url => { + this.getVehicleStatus(vin, _url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { + this.log.debug("error while getting " + _url); }); }); } else { @@ -280,9 +279,9 @@ class VwWeconnect extends utils.Adapter { this.vinArray.forEach((vin) => { this.statesArray.forEach((state) => { if (typeof state.url == "object") { - state.url.array.forEach(url => { - this.getVehicleStatus(vin, url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + url); + state.url.forEach(_url => { + this.getVehicleStatus(vin, _url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + _url); }); }); } else { From 15d6a57d42e27156b505cdee0d0a817376796798 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 19:18:26 +0100 Subject: [PATCH 276/729] optimize admin page --- admin/index_m.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/index_m.html b/admin/index_m.html index e3738cb2..110a9487 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -114,7 +114,7 @@
- + From a7fb301e71374f287c1cdc795d2083ced2536758 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 20:33:23 +0100 Subject: [PATCH 277/729] test --- main.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 8bb7bb5e..bb485f07 100644 --- a/main.js +++ b/main.js @@ -204,11 +204,22 @@ class VwWeconnect extends utils.Adapter { if (this.config.tripCyclic == true) { urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/cyclic?type=list"); } - this.statesArray.forEach((element, index, array) => { - if (element.url == null) { - array[index].url = urlList; - } - }); + if (urlList.length == 1) { + this.log.info("Setze String"); + this.statesArray.forEach((element, index, array) => { + if (element.url == null) { + array[index].url = urlList; + } + }); + } + else { + this.statesArray.forEach((element, index, array) => { + if (element.url == null) { + array[index].url = urlList; + } + }); + } + this.log.info("statesArray: " + JSON.stringify(this.statesArray)); this.login() .then(() => { this.log.debug("Login successful"); From 5dd674c7a24cf0c48f51a193bdb6eb3629e4fe7a Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 20:41:48 +0100 Subject: [PATCH 278/729] test --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index bb485f07..de909e24 100644 --- a/main.js +++ b/main.js @@ -208,7 +208,7 @@ class VwWeconnect extends utils.Adapter { this.log.info("Setze String"); this.statesArray.forEach((element, index, array) => { if (element.url == null) { - array[index].url = urlList; + array[index].url = urlList[0]; } }); } From 971b7b7271c13104f8975df8ac21155fcf78254f Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 20:46:03 +0100 Subject: [PATCH 279/729] test --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index de909e24..933e97fc 100644 --- a/main.js +++ b/main.js @@ -249,6 +249,7 @@ class VwWeconnect extends utils.Adapter { this.requestStatusUpdate(vin) .finally(() => { this.statesArray.forEach((state) => { + this.log.info("State für " + state.path + " ist Typ " + typeof state.url); if (typeof state.url == "object") { state.url.forEach(_url => { this.getVehicleStatus(vin, _url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { @@ -256,6 +257,7 @@ class VwWeconnect extends utils.Adapter { }); }); } else { + this.log.info("Call für " + state.path + " URL: " + state.url); this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { this.log.debug("error while getting " + state.url); }); From 16f0a37232c39039955e1e6aa641b827f96957f5 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 13 Mar 2021 20:48:49 +0100 Subject: [PATCH 280/729] test --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 933e97fc..216cb9ef 100644 --- a/main.js +++ b/main.js @@ -291,6 +291,7 @@ class VwWeconnect extends utils.Adapter { } else { this.vinArray.forEach((vin) => { this.statesArray.forEach((state) => { + this.log.info("State für " + state.path + " ist Typ " + typeof state.url); if (typeof state.url == "object") { state.url.forEach(_url => { this.getVehicleStatus(vin, _url, state.path, state.element, state.element2).catch(() => { @@ -298,6 +299,7 @@ class VwWeconnect extends utils.Adapter { }); }); } else { + this.log.info("Call für " + state.path + " URL: " + state.url); this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { this.log.debug("error while getting " + state.url); }); From 55c881f7917725fcadda8302ff90b779dd4314bc Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 14 Mar 2021 16:29:11 +0100 Subject: [PATCH 281/729] test --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 216cb9ef..b4f82eb3 100644 --- a/main.js +++ b/main.js @@ -67,7 +67,7 @@ class VwWeconnect extends utils.Adapter { element4: "Position", }, { - url: null, + url: "$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", path: "tripdata", element: "tripDataList", }, @@ -204,7 +204,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.tripCyclic == true) { urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/cyclic?type=list"); } - if (urlList.length == 1) { + /*if (urlList.length == 1) { this.log.info("Setze String"); this.statesArray.forEach((element, index, array) => { if (element.url == null) { @@ -218,7 +218,7 @@ class VwWeconnect extends utils.Adapter { array[index].url = urlList; } }); - } + }*/ this.log.info("statesArray: " + JSON.stringify(this.statesArray)); this.login() .then(() => { From dfaf5a773b5979dd74b19f46e19be601ea527a0f Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 14 Mar 2021 17:40:23 +0100 Subject: [PATCH 282/729] refactor to url as string and replaceVars as array --- main.js | 60 +++++++++++++++++++++------------------------------------ 1 file changed, 22 insertions(+), 38 deletions(-) diff --git a/main.js b/main.js index b4f82eb3..ed0b04a7 100644 --- a/main.js +++ b/main.js @@ -194,33 +194,17 @@ class VwWeconnect extends utils.Adapter { this.log.info("Interval of 0 is not allowed reset to 1"); this.config.interval = 1; } - var urlList = []; + this.tripTypes = []; if (this.config.tripShortTerm == true) { - urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/shortTerm?type=list"); + this.tripTypes.push("shortTerm"); } if (this.config.tripLongTerm == true) { - urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/longTerm?type=list"); + this.tripTypes.push("longTerm"); } if (this.config.tripCyclic == true) { - urlList.push("$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/cyclic?type=list"); + this.tripTypes.push("cyclic"); } - /*if (urlList.length == 1) { - this.log.info("Setze String"); - this.statesArray.forEach((element, index, array) => { - if (element.url == null) { - array[index].url = urlList[0]; - } - }); - } - else { - this.statesArray.forEach((element, index, array) => { - if (element.url == null) { - array[index].url = urlList; - } - }); - }*/ - this.log.info("statesArray: " + JSON.stringify(this.statesArray)); - this.login() + this.login() .then(() => { this.log.debug("Login successful"); this.setState("info.connection", true, true); @@ -250,12 +234,12 @@ class VwWeconnect extends utils.Adapter { .finally(() => { this.statesArray.forEach((state) => { this.log.info("State für " + state.path + " ist Typ " + typeof state.url); - if (typeof state.url == "object") { - state.url.forEach(_url => { - this.getVehicleStatus(vin, _url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { - this.log.debug("error while getting " + _url); - }); - }); + if (state.path == "tripdata") { + this.tripTypes.forEach(tripType => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4, tripType).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); } else { this.log.info("Call für " + state.path + " URL: " + state.url); this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { @@ -292,11 +276,11 @@ class VwWeconnect extends utils.Adapter { this.vinArray.forEach((vin) => { this.statesArray.forEach((state) => { this.log.info("State für " + state.path + " ist Typ " + typeof state.url); - if (typeof state.url == "object") { - state.url.forEach(_url => { - this.getVehicleStatus(vin, _url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + _url); - }); + if (state.path == "tripdata") { + this.tripTypes.forEach(tripType => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { + this.log.debug("error while getting " + state.url); + }); }); } else { this.log.info("Call für " + state.path + " URL: " + state.url); @@ -644,14 +628,14 @@ class VwWeconnect extends utils.Adapter { ); }); } - replaceVarInUrl(url, vin) { + replaceVarInUrl(url, vin, tripType) { const curHomeRegion = this.homeRegion[vin]; return url .replace("/$vin", "/" + vin + "") .replace("$homeregion/", curHomeRegion + "/") .replace("/$type/", "/" + this.type + "/") .replace("/$country/", "/" + this.country + "/") - .replace("/$tripType", "/" + this.config.tripType); + .replace("/$tripType", "/" + tripType); } getTokens(getRequest, code_verifier, reject, resolve) { let hash = ""; @@ -2073,11 +2057,11 @@ class VwWeconnect extends utils.Adapter { }); } - getVehicleStatus(vin, url, path, element, element2, element3, element4) { + getVehicleStatus(vin, url, path, element, element2, element3, element4, tripType) { return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); + url = this.replaceVarInUrl(url, vin, tripType); if (path === "tripdata") { - if (this.config.tripType === "none") { + if (this.tripsActive == false) { resolve(); return; } @@ -2211,7 +2195,7 @@ class VwWeconnect extends utils.Adapter { const isTripData = path === "tripdata"; if (isTripData) { - if (this.config.tripType === "none") { + if (this.tripsActive == false) { resolve(); return; } From c7b06fbb3e0a5fc37e4a143e1245db988e8a2bd8 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 14 Mar 2021 17:44:11 +0100 Subject: [PATCH 283/729] bugfix --- admin/index_m.html | 2 +- main.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 110a9487..4839c42e 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -114,10 +114,10 @@
- +
- + Auswahl der abzurufenden Fahrdaten (Trips)
]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); + for (const match of matches) { + returnObject[match[1]] = match[2]; + } + return returnObject; + } /** * Is called when adapter shuts down - callback has to be called under any circumstances! diff --git a/package.json b/package.json index 79e349c3..66141af0 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "dependencies": { "@iobroker/adapter-core": "^2.4.0", "@peculiar/webcrypto": "^1.1.6", - "jsdom": "^16.4.0", "request": "^2.88.2", "traverse": "^0.6.6", "uuid": "^8.3.2" @@ -75,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.33" + "version": "0.0.34" } \ No newline at end of file From 5b48f57f18eddb4b95a634a86d2ab9af8964cf3a Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 14 Jun 2021 13:46:16 +0200 Subject: [PATCH 313/729] add extract check --- main.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 8c9ead1e..127fc0f6 100644 --- a/main.js +++ b/main.js @@ -2854,12 +2854,17 @@ class VwWeconnect extends utils.Adapter { return result; } extractHidden(body) { - const returnObject = {}; - const matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); - for (const match of matches) { - returnObject[match[1]] = match[2]; + if (body) { + const returnObject = {}; + const matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); + for (const match of matches) { + returnObject[match[1]] = match[2]; + } + return returnObject; + } else { + this.log.warn("No body found"); + return {}; } - return returnObject; } /** From 560288cfbd77e7d9b8363991f7a2217cb039ea85 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 14 Jun 2021 14:15:02 +0200 Subject: [PATCH 314/729] add v10 support --- main.js | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/main.js b/main.js index 127fc0f6..d1a4a1a6 100644 --- a/main.js +++ b/main.js @@ -2854,19 +2854,30 @@ class VwWeconnect extends utils.Adapter { return result; } extractHidden(body) { - if (body) { - const returnObject = {}; - const matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); - for (const match of matches) { - returnObject[match[1]] = match[2]; - } - return returnObject; + const returnObject = {}; + let matches; + if (body.matchAll) { + matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); } else { - this.log.warn("No body found"); - return {}; + this.log.warn("The adapter needs in the future NodeJS v12. https://forum.iobroker.net/topic/22867/how-to-node-js-f%C3%BCr-iobroker-richtig-updaten"); + matches = this.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g, body); + } + for (const match of matches) { + returnObject[match[1]] = match[2]; } + return returnObject; } + matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + // add all matched groups + matches.push(match); + } + + return matches; + } /** * Is called when adapter shuts down - callback has to be called under any circumstances! * @param {() => void} callback From ed721f43098ffe95a7c52275f25ce2112a99d7af Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 14 Jun 2021 14:17:19 +0200 Subject: [PATCH 315/729] 0.0.35 --- README.md | 5 +++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9530b43b..db35929e 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,11 @@ Door and window states: ## Changelog +### 0.0.35 + +- add nodeJS v10 compatibility + + ### 0.0.34 - add auto accept of new privacy consent diff --git a/io-package.json b/io-package.json index fedb25a0..59df160a 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.34", + "version": "0.0.35", "news": { + "0.0.35": { + "en": "add nodeJs v10 compatibility" + }, "0.0.34": { "en": "add auto accept of new privacy consent" }, diff --git a/package.json b/package.json index 66141af0..d5e4cae4 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.34" + "version": "0.0.35" } \ No newline at end of file From 0ce42862531767b45aa47c6bb76b395b09e95696 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 15 Jun 2021 15:28:55 +0200 Subject: [PATCH 316/729] add first draft skoda en --- lib/extractKeys.js | 32 +++++----- main.js | 143 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 154 insertions(+), 21 deletions(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 928e089b..dc9cb219 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,4 +1,4 @@ -//v2.4 +//v2.5 async function extractKeys(adapter, path, element, preferedArrayName, forceIndex) { try { if (element === null || element === undefined) { @@ -6,26 +6,17 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex return; } const objectKeys = Object.keys(element); - let write = false; + const write = false; if (Array.isArray(element)) { extractArray(adapter, element, "", path, write, preferedArrayName, forceIndex); return; } - if (path.endsWith("Settings")) { - await adapter.setObjectNotExistsAsync(path, { - type: "state", - common: { - name: "Einstellungen sind hier änderbar / You can change the settings here", - role: "indicator", - write: false, - read: true, - }, - native: {}, - }); - write = true; - } - if (typeof element === "string") { + if (typeof element === "string" || typeof element === "number") { + let name = element; + if (typeof element === "number") { + name = element.toString(); + } adapter .setObjectNotExistsAsync(path, { type: "state", @@ -55,7 +46,7 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex if (Array.isArray(element[key])) { extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex); } else if (element[key] !== null && typeof element[key] === "object") { - extractKeys(adapter, path + "." + key, element[key]); + extractKeys(adapter, path + "." + key, element[key], preferedArrayName, forceIndex); } else { adapter .setObjectNotExistsAsync(path + "." + key, { @@ -133,7 +124,12 @@ function extractArray(adapter, element, key, path, write, preferedArrayName, for arrayPath = key + index; } //special case array with 2 string objects - if (Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string") { + if ( + Object.keys(arrayElement).length === 2 && + typeof Object.keys(arrayElement)[0] === "string" && + typeof Object.keys(arrayElement)[1] === "string" && + typeof arrayElement[Object.keys(arrayElement)[1]] !== "object" + ) { let subKey = arrayElement[Object.keys(arrayElement)[0]]; const subValue = arrayElement[Object.keys(arrayElement)[1]]; const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; diff --git a/main.js b/main.js index d1a4a1a6..64690e2c 100644 --- a/main.js +++ b/main.js @@ -139,6 +139,18 @@ class VwWeconnect extends utils.Adapter { this.xappversion = "3.2.6"; this.xappname = "cz.skodaauto.connect"; } + if (this.config.type === "skodae") { + this.type = "Skoda"; + this.country = "CZ"; + this.clientId = "f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com"; + this.xclientId = "28cd30c6-dee7-4529-a0e6-b1e07ff90b79"; + this.scope = "openid mbb profile"; + this.redirect = "skodaconnect://oidc.login/"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "3.2.6"; + this.xappname = "cz.skodaauto.connect"; + } if (this.config.type === "seat") { this.type = "Seat"; this.country = "ES"; @@ -216,6 +228,21 @@ class VwWeconnect extends utils.Adapter { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); }); + } + if (this.config.type === "skodae") { + this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; + this.scope = "openid dealers profile email cars address"; + this.redirect = "skodaconnect://oidc.login/"; + + this.login() + .then(() => { + this.getSkodaEStatus(vin).catch(() => { + this.log.error("get skodae status Failed"); + }); + }) + .catch(() => { + this.log.error("Failed second skoda login"); + }); } else { this.getHomeRegion(vin) .catch(() => { @@ -268,6 +295,12 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "go") { this.getVehicles(); return; + } else if (this.config.type === "skodae") { + this.vinArray.forEach((vin) => { + this.getSkodaEStatus(vin).catch(() => { + this.log.error("get skodae status Failed"); + }); + }); } else if (this.config.type === "id") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { @@ -730,7 +763,8 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "vw" || this.config.type === "vwv2") { body += "&code_verifier=" + code_verifier; } else { - body += "&brand=" + this.config.type; + const brand = this.config.type === "skodae" ? "skoda" : this.config.type; + body += "&brand=" + brand; } if (this.config.type === "go") { url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; @@ -850,7 +884,7 @@ class VwWeconnect extends utils.Adapter { }); }, 0.9 * 60 * 60 * 1000); // 0.9hours } - if (this.config.type === "go" || this.config.type === "id") { + if (this.config.type === "go" || this.config.type === "id" || this.config.type === "skodae") { resolve(); return; } @@ -905,7 +939,9 @@ class VwWeconnect extends utils.Adapter { let rtoken = this.config.rtoken; let body = "refresh_token=" + rtoken; let form = ""; - body = "brand=" + this.config.type + "&" + body; + const brand = this.config.type === "skodae" ? "skoda" : this.config.type; + + body = "brand=" + brand + "&" + body; if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; @@ -1206,6 +1242,17 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, }; } + if (this.config.type === "skodae") { + url = "https://api.connect.skoda-auto.cz//api/v2/garage/vehicles"; + // @ts-ignore + headers = { + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": "OneConnect/000000023 CFNetwork/978.0.7 Darwin/18.7.0", + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }; + } request.get( { url: url, @@ -1338,6 +1385,29 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } + if (this.config.type === "skodae") { + body.forEach(async (element) => { + this.vinArray.push(element.vin); + await this.setObjectNotExistsAsync(element.vin, { + type: "device", + common: { + name: element.specification.title, + role: "indicator", + type: "string", + write: false, + read: true, + }, + native: {}, + }); + + this.extractKeys(this, element.vin + ".general", element).catch((error) => { + this.log.error("Failed to extract"); + this.log.error(error); + }); + }); + resolve(); + return; + } if (!body.userVehicles) { this.log.info("No Vehicles found"); resolve(); @@ -1565,6 +1635,73 @@ class VwWeconnect extends utils.Adapter { ); }); } + getSkodaEStatus(vin) { + return new Promise((resolve, reject) => { + const typeArray = ["air-conditioning", "charging"]; + const promiseArray = []; + typeArray.forEach((element) => { + const promise = this.receiveSkodaEStatus(vin, element); + promiseArray.push(promise); + }); + Promise.all(promiseArray) + .then(() => { + resolve(); + }) + .catch(() => { + reject(); + }); + }); + } + + receiveSkodaEStatus(vin, type) { + return new Promise((resolve, reject) => { + const url = "https://api.connect.skoda-auto.cz/api/v1/" + type + "/" + vin + "/status"; + request.get( + { + url: url, + + headers: { + "api-key": "ok", + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": "OneConnect/000000023 CFNetwork/978.0.7 Darwin/18.7.0", + "accept-language": "de-de", + "If-None-Match": this.etags[url] || "", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.debug(err); + resp && this.log.debug(resp.statusCode.toString()); + body && this.log.debug(JSON.stringify(body)); + reject(); + return; + } + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } + this.log.debug(JSON.stringify(body)); + try { + this.extractKeys(this, vin + ".status." + type, body); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + setSkodaESettings(vin, type, settings) {} getWcData(limit) { if (!limit) { limit = 25; From 19740a1a74f5b6be4bf8c4fe27d503e4accaf56d Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 15 Jun 2021 15:29:47 +0200 Subject: [PATCH 317/729] add skodae --- admin/index_m.html | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/index_m.html b/admin/index_m.html index 76ac41cd..764cb265 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -84,6 +84,7 @@ + From 47401fd803d6c6e6e4bea78fc14b7c35edf3ac62 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 15 Jun 2021 22:23:52 +0200 Subject: [PATCH 318/729] add settings --- lib/extractKeys.js | 16 ++++- main.js | 175 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 182 insertions(+), 9 deletions(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index dc9cb219..b3621bfb 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -6,12 +6,24 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex return; } const objectKeys = Object.keys(element); - const write = false; + let write = false; if (Array.isArray(element)) { extractArray(adapter, element, "", path, write, preferedArrayName, forceIndex); return; } - + if (path.toLowerCase().endsWith("settings")) { + await adapter.setObjectNotExistsAsync(path, { + type: "state", + common: { + name: "Einstellungen sind hier änderbar / You can change the settings here", + role: "indicator", + write: false, + read: true, + }, + native: {}, + }); + write = true; + } if (typeof element === "string" || typeof element === "number") { let name = element; if (typeof element === "number") { diff --git a/main.js b/main.js index 64690e2c..68e43fa1 100644 --- a/main.js +++ b/main.js @@ -1387,7 +1387,8 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "skodae") { body.forEach(async (element) => { - this.vinArray.push(element.vin); + const vin = element.vin; + this.vinArray.push(vin); await this.setObjectNotExistsAsync(element.vin, { type: "device", common: { @@ -1404,6 +1405,35 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to extract"); this.log.error(error); }); + + this.setObjectNotExists(vin + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.charging", { + type: "state", + common: { + name: "Start/Stop Battery Charge", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.air-conditioning", { + type: "state", + common: { + name: "Start/Stop Air-conditioning", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); }); resolve(); return; @@ -1640,7 +1670,9 @@ class VwWeconnect extends utils.Adapter { const typeArray = ["air-conditioning", "charging"]; const promiseArray = []; typeArray.forEach((element) => { - const promise = this.receiveSkodaEStatus(vin, element); + let promise = this.getSkodaEValues(vin, element, "status"); + promiseArray.push(promise); + promise = this.getSkodaEValues(vin, element, "settings"); promiseArray.push(promise); }); Promise.all(promiseArray) @@ -1653,9 +1685,10 @@ class VwWeconnect extends utils.Adapter { }); } - receiveSkodaEStatus(vin, type) { + getSkodaEValues(vin, type, endpoint) { return new Promise((resolve, reject) => { - const url = "https://api.connect.skoda-auto.cz/api/v1/" + type + "/" + vin + "/status"; + const url = "https://api.connect.skoda-auto.cz/api/v1/" + type + "/" + vin + "/" + endpoint; + this.log.debug(url); request.get( { url: url, @@ -1691,7 +1724,83 @@ class VwWeconnect extends utils.Adapter { } this.log.debug(JSON.stringify(body)); try { - this.extractKeys(this, vin + ".status." + type, body); + this.extractKeys(this, vin + ".status." + type + "." + endpoint, body); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + setSkodaESettings(vin, action, value, bodyContent) { + return new Promise(async (resolve, reject) => { + const pre = this.name + "." + this.instance; + let body = bodyContent || {}; + if (value !== "UpdateSettings") { + const states = await this.getStatesAsync(pre + "." + vin + ".status." + action + ".settings.*"); + body = {}; + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + const keyNameArray = keyName.split("."); + const key = keyNameArray[keyNameArray.length - 1]; + const subKey = keyNameArray[keyNameArray.length - 2]; + if (subKey === "settings" && states[keyName]) { + body[key] = states[keyName].val; + } else if (states[keyName]) { + if (!body[subKey]) { + body[subKey] = {}; + } + body[subKey][key] = states[keyName].val; + } + }); + } + const settingsName = this.toCammelCase(action) + "Settings"; + const finalBody = { + type: value, + }; + finalBody[settingsName] = body; + const method = "POST"; + const url = "https://api.connect.skoda-auto.cz/api/v1/" + action + "/operation-requests?vin=" + vin; + this.log.debug(url); + this.log.debug(JSON.stringify(finalBody)); + request( + { + method: method, + url: url, + headers: { + "api-key": "ok", + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": "OneConnect/000000023 CFNetwork/978.0.7 Darwin/18.7.0", + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + body: finalBody, + followAllRedirects: true, + json: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 401) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.refreshToken().catch(() => {}); + this.log.error("Refresh Token"); + reject(); + return; + } + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); resolve(); } catch (err) { this.log.error(err); @@ -1701,7 +1810,6 @@ class VwWeconnect extends utils.Adapter { ); }); } - setSkodaESettings(vin, type, settings) {} getWcData(limit) { if (!limit) { limit = 25; @@ -2990,6 +3098,11 @@ class VwWeconnect extends utils.Adapter { } return result; } + toCammelCase(string) { + return string.replace(/-([a-z])/g, function (g) { + return g[1].toUpperCase(); + }); + } extractHidden(body) { const returnObject = {}; let matches; @@ -3068,6 +3181,40 @@ class VwWeconnect extends utils.Adapter { return; } } + if (id.indexOf(".settings.") != -1) { + if (this.config.type === "skodae") { + const idArray = id.split("."); + const action = idArray[idArray.length - 1]; + const settingsPath = id.split(".")[4]; + const pre = this.name + "." + this.instance; + const states = await this.getStatesAsync(pre + "." + vin + ".status." + settingsPath + ".settings.*"); + const body = {}; + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + const keyNameArray = keyName.split("."); + const key = keyNameArray[keyNameArray.length - 1]; + const subKey = keyNameArray[keyNameArray.length - 2]; + if (subKey === "settings" && states[keyName]) { + body[key] = states[keyName].val; + if (key === action) { + body[action] = state.val; + } + } else if (states[keyName]) { + if (!body[subKey]) { + body[subKey] = {}; + } + body[subKey][key] = states[keyName].val; + if (key === action) { + body[subKey][action] = state.val; + } + } + }); + this.setSkodaESettings(vin, settingsPath, "UpdateSettings", body).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } if (id.indexOf("remote.") !== -1) { const action = id.split(".")[4]; @@ -3098,9 +3245,23 @@ class VwWeconnect extends utils.Adapter { this.log.error("failed set state " + action); }); return; + } else if (this.config.type === "skodae") { + const value = state.val ? "Start" : "Stop"; + this.setSkodaESettings(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } + if (action === "air-conditioning") { + if (this.config.type === "skodae") { + const value = state.val ? "Start" : "Stop"; + this.setSkodaESettings(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; } } - if (action === "climatisation" || action === "climatisationv2") { if (this.config.type === "id") { const value = state.val ? "start" : "stop"; From 6f9ac56a91d3c0199e9bf155cd574985958ea17f Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 16 Jun 2021 09:46:15 +0200 Subject: [PATCH 319/729] add response to remote --- main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.js b/main.js index 68e43fa1..b0e4e108 100644 --- a/main.js +++ b/main.js @@ -3470,6 +3470,16 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.batterycharge", state.val !== "readyForCharging" ? true : false, true); } } + if (id.indexOf("status.charging.state") !== -1) { + if (this.config.type === "skodae") { + this.setState(vin + ".remote.charging", state.val === "On" ? true : false, true); + } + } + if (id.indexOf("air-conditioning.status.state") !== -1) { + if (this.config.type === "skodae") { + this.setState(vin + ".remote.air-conditioning", state.val === "On" ? true : false, true); + } + } if (id.indexOf(".status.isCarLocked") !== -1) { this.setState(vin + ".remote.lock", state.val, true); } From 4f5d1febd59aac15deb83ab5fbe6a59ed1618c79 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 16 Jun 2021 19:42:55 +0200 Subject: [PATCH 320/729] add celsius remote --- main.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/main.js b/main.js index b0e4e108..3fd13719 100644 --- a/main.js +++ b/main.js @@ -1434,6 +1434,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.targetTemperatureInCelsius", { + type: "state", + common: { + name: "Air-conditioning Temp in Celsius", + type: "number", + role: "value.temperature", + write: true, + }, + native: {}, + }); }); resolve(); return; @@ -3262,6 +3272,12 @@ class VwWeconnect extends utils.Adapter { return; } } + if (action === "targetTemperatureInCelsius") { + if (this.config.type === "skodae") { + const pre = this.name + "." + this.instance; + this.setState(pre + "." + vin + ".status.air-conditioning.settings.targetTemperatureInKelvin", state.val + 273.15, false); + } + } if (action === "climatisation" || action === "climatisationv2") { if (this.config.type === "id") { const value = state.val ? "start" : "stop"; @@ -3480,6 +3496,11 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.air-conditioning", state.val === "On" ? true : false, true); } } + if (id.indexOf("settings.targetTemperatureInKelvin") !== -1) { + if (this.config.type === "skodae") { + this.setState(vin + ".remote.targetTemperatureInCelsius", state.val - 273.15); + } + } if (id.indexOf(".status.isCarLocked") !== -1) { this.setState(vin + ".remote.lock", state.val, true); } From 5591856667587638dc5cdcf0987d13f94be9e1cf Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 16 Jun 2021 19:43:03 +0200 Subject: [PATCH 321/729] 0.0.36 --- README.md | 4 ++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db35929e..f091feaf 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.36 + +- add Skoda Enyaq support + ### 0.0.35 - add nodeJS v10 compatibility diff --git a/io-package.json b/io-package.json index 59df160a..82e8ca69 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.35", + "version": "0.0.36", "news": { + "0.0.36": { + "en": "add Skoda Enyaq support" + }, "0.0.35": { "en": "add nodeJs v10 compatibility" }, diff --git a/package.json b/package.json index d5e4cae4..7afb743e 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.35" + "version": "0.0.36" } \ No newline at end of file From 7f082bd6ac84df648d3b6dbfee5863906c965edf Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 18 Jun 2021 09:38:29 +0200 Subject: [PATCH 322/729] fix id condition --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.js b/main.js index 3fd13719..2add8fab 100644 --- a/main.js +++ b/main.js @@ -228,8 +228,7 @@ class VwWeconnect extends utils.Adapter { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); }); - } - if (this.config.type === "skodae") { + } else if (this.config.type === "skodae") { this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; this.scope = "openid dealers profile email cars address"; this.redirect = "skodaconnect://oidc.login/"; From c4c0f11f41375289cd4cbc22faf598010aeadede Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 18 Jun 2021 09:57:52 +0200 Subject: [PATCH 323/729] 0.0.37 --- README.md | 4 ++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f091feaf..6925d60c 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.37 + +- fix id login + ### 0.0.36 - add Skoda Enyaq support diff --git a/io-package.json b/io-package.json index 82e8ca69..fea9fcac 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.36", + "version": "0.0.37", "news": { + "0.0.37": { + "en": "fix id login" + }, "0.0.36": { "en": "add Skoda Enyaq support" }, diff --git a/package.json b/package.json index 7afb743e..5f93d504 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.36" + "version": "0.0.37" } \ No newline at end of file From 0b23b3cda17f6ca1b20f65a0d83ac166e2402ceb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 18 Jun 2021 07:59:16 +0000 Subject: [PATCH 324/729] Bump mocha from 8.4.0 to 9.0.0 Bumps [mocha](https://github.com/mochajs/mocha) from 8.4.0 to 9.0.0. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v8.4.0...v9.0.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 5f93d504..10938fa8 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "chai-as-promised": "^7.1.1", "eslint": "^7.21.0", "gulp": "^4.0.2", - "mocha": "^8.3.2", + "mocha": "^9.0.1", "proxyquire": "^2.1.3", "sinon": "^11.1.0", "sinon-chai": "^3.5.0" From 5dc0db369f40bb07ca689debe344aa19e017afa2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 18 Jun 2021 10:39:50 +0200 Subject: [PATCH 325/729] conver name to string --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 2add8fab..a9eb2f52 100644 --- a/main.js +++ b/main.js @@ -2622,11 +2622,15 @@ class VwWeconnect extends utils.Adapter { if (!isNaN(Number(value)) && Number(value) === parseFloat(value)) { value = Number(value); } + let name = this.key; + if (typeof this.key === "number") { + name = this.key.toString(); + } adapter .setObjectNotExistsAsync(newPath, { type: "state", common: { - name: this.key, + name: name, role: "indicator", type: typeof value, unit: fieldUnit, From a9505713b6b25044547bdd0fe9a4b9058e65d171 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 18 Jun 2021 10:46:27 +0200 Subject: [PATCH 326/729] fix extract key --- lib/extractKeys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index b3621bfb..1c3d47cf 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -33,7 +33,7 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex .setObjectNotExistsAsync(path, { type: "state", common: { - name: element, + name: name, role: "indicator", type: typeof element, write: write, From 629411e4466556cdb5b4c4efb76e58278f8130fb Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 18 Jun 2021 10:49:05 +0200 Subject: [PATCH 327/729] update extractkey --- lib/extractKeys.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 1c3d47cf..401956c4 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,4 +1,4 @@ -//v2.5 +//v2.6 async function extractKeys(adapter, path, element, preferedArrayName, forceIndex) { try { if (element === null || element === undefined) { @@ -140,6 +140,7 @@ function extractArray(adapter, element, key, path, write, preferedArrayName, for Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string" && + typeof arrayElement[Object.keys(arrayElement)[0]] !== "object" && typeof arrayElement[Object.keys(arrayElement)[1]] !== "object" ) { let subKey = arrayElement[Object.keys(arrayElement)[0]]; From 34b7fbebe53db2f6773b8624ff8323d5b59f93f0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 24 Jun 2021 08:26:29 +0200 Subject: [PATCH 328/729] fix error message --- main.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index a9eb2f52..41c06f73 100644 --- a/main.js +++ b/main.js @@ -429,11 +429,11 @@ class VwWeconnect extends utils.Adapter { } this.log.error("Failed in first login step "); err && this.log.error(err); - err && this.log.error(JSON.stringify(err)); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - + err && err.message && this.log.error(err.message); loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); + reject(); return; } @@ -1356,12 +1356,15 @@ class VwWeconnect extends utils.Adapter { modPath.splice(parentIndex + 1, 1); } }); - + let name = this.key; + if (typeof this.key === "number") { + name = this.key.toString(); + } adapter .setObjectNotExistsAsync(vin + ".status." + modPath.join("."), { type: "state", common: { - name: this.key, + name: name, role: "indicator", type: typeof value, write: false, From 94856584c820699f96a453b17b35179a82a293d2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 24 Jun 2021 08:26:48 +0200 Subject: [PATCH 329/729] 0.0.39 --- README.md | 2 +- io-package.json | 6 +++--- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6925d60c..0e77f13f 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Door and window states: ## Changelog -### 0.0.37 +### 0.0.39 - fix id login diff --git a/io-package.json b/io-package.json index fea9fcac..3133ba1d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,10 +1,10 @@ { "common": { "name": "vw-connect", - "version": "0.0.37", + "version": "0.0.39", "news": { - "0.0.37": { - "en": "fix id login" + "0.0.39": { + "en": "fix id logn" }, "0.0.36": { "en": "add Skoda Enyaq support" diff --git a/package.json b/package.json index 10938fa8..26d2a8f3 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.37" + "version": "0.0.39" } \ No newline at end of file From a15a6330931dd99f84020f1a3c8e37531340f401 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 24 Jun 2021 09:08:05 +0200 Subject: [PATCH 330/729] update node version --- .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 36a86ae8..4cc1a868 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -50,7 +50,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [10.x, 12.x, 14.x, 15.x] + node-version: [12.x, 14.x, 15.x, 16.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: From 61022caff2bb668f8d6708128db61df1f4965625 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 5 Jul 2021 07:57:13 +0000 Subject: [PATCH 331/729] Bump @types/node from 15.14.1 to 16.0.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.14.1 to 16.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 26d2a8f3..c50687ff 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@types/chai-as-promised": "^7.1.3", "@types/gulp": "^4.0.8", "@types/mocha": "^8.2.1", - "@types/node": "^15.0.0", + "@types/node": "^16.0.0", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.0", "@types/sinon-chai": "^3.2.5", From ef2649efdaae972b05842f322d455b7eba6c0a61 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 8 Jul 2021 17:23:17 +0200 Subject: [PATCH 332/729] add seatelli --- admin/index_m.html | 3 +- main.js | 182 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 178 insertions(+), 7 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 764cb265..a4f8b3c8 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -88,7 +88,8 @@ - + +
diff --git a/main.js b/main.js index 41c06f73..be41c80a 100644 --- a/main.js +++ b/main.js @@ -200,6 +200,18 @@ class VwWeconnect extends utils.Adapter { this.xappversion = ""; this.xappname = ""; } + if (this.config.type === "seatelli") { + this.type = ""; + this.country = ""; + this.clientId = "d940d794-5945-48a3-84b1-44222c387800@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile"; + this.redirect = "Seat-elli-hub://opid"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } if (this.config.interval === 0) { this.log.info("Interval of 0 is not allowed reset to 1"); this.config.interval = 1; @@ -308,6 +320,12 @@ class VwWeconnect extends utils.Adapter { }); this.getWcData(); }); + return; + } else if (this.config.type === "seatelli") { + this.getSeatElliData().catch(() => { + this.log.error("get seatelli Failed"); + }); + return; } else { this.vinArray.forEach((vin) => { @@ -343,6 +361,12 @@ class VwWeconnect extends utils.Adapter { }, this.config.forceinterval * 60 * 1000); } } + + if (this.config.type === "seatelli") { + this.getSeatElliData().catch(() => { + this.log.error("get seatelli Failed"); + }); + } }) .catch(() => { this.log.error("Get Vehicles Failed"); @@ -357,13 +381,16 @@ class VwWeconnect extends utils.Adapter { }); this.subscribeStates("*"); } + login() { return new Promise(async (resolve, reject) => { const nonce = this.getNonce(); const state = uuidv4(); - const [code_verifier, codeChallenge] = this.getCodeChallenge(); - + let [code_verifier, codeChallenge] = this.getCodeChallenge(); + if (this.config.type === "seatelli") { + [code_verifier, codeChallenge] = this.getCodeChallengev2(); + } const method = "GET"; const form = {}; let url = @@ -379,7 +406,7 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "vwv2" || this.config.type === "go") { + if (this.config.type === "vw" || this.config.type === "vwv2" || this.config.type === "go" || this.config.type === "seatelli") { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } if (this.config.type === "audi") { @@ -614,6 +641,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(err); this.getTokens(getRequest, code_verifier, reject, resolve); } else { + this.log.debug(body); this.log.debug("No Token received visiting url and accept the permissions."); const form = this.extractHidden(body); getRequest = request.post( @@ -806,6 +834,24 @@ class VwWeconnect extends utils.Adapter { this.getVWToken({}, jwtid_token, reject, resolve); return; } + if (this.config.type === "seatelli") { + url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdKit"; + + body = JSON.stringify({ + brand: "seat", + grant_type: "authorization_code", + code: jwtauth_code, + redirect_uri: "Seat-elli-hub://opid", + code_verifier: code_verifier, + }); + // @ts-ignore + headers = { + "Content-Type": "application/json", + Accept: "application/json", + "User-Agent": "Seat-Prod/1221 CFNetwork/1240.0.4 Darwin/20.5.0", + "Accept-Language": "de-DE", + }; + } request( { method: method, @@ -877,13 +923,16 @@ class VwWeconnect extends utils.Adapter { this.config.atoken = tokens.access_token; this.config.rtoken = tokens.refresh_token; + if (this.config.type === "seatelli") { + this.config.atoken = tokens.token; + } this.refreshTokenInterval = setInterval(() => { this.refreshToken().catch(() => { this.log.error("Refresh Token was not successful"); }); }, 0.9 * 60 * 60 * 1000); // 0.9hours } - if (this.config.type === "go" || this.config.type === "id" || this.config.type === "skodae") { + if (this.config.type === "go" || this.config.type === "id" || this.config.type === "skodae" || this.config.type === "seatelli") { resolve(); return; } @@ -1037,7 +1086,7 @@ class VwWeconnect extends utils.Adapter { getPersonalData() { return new Promise((resolve, reject) => { - if (this.config.type === "audi" || this.config.type === "go" || this.config.type === "id") { + if (this.config.type === "audi" || this.config.type === "go" || this.config.type === "id" || this.config.type === "seatelli") { resolve(); return; } @@ -1208,6 +1257,10 @@ class VwWeconnect extends utils.Adapter { getVehicles() { return new Promise((resolve, reject) => { + if (this.config.type === "seatelli") { + resolve(); + return; + } let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); let headers = { "User-Agent": "okhttp/3.7.0", @@ -1822,6 +1875,104 @@ class VwWeconnect extends utils.Adapter { ); }); } + async getSeatElliData() { + const header = { + "Content-Type": "application/json", + Accept: "application/json", + "User-Agent": "Seat-Prod/1221 CFNetwork/1240.0.4 Darwin/20.5.0", + "Accept-Language": "de-DE", + Authorization: "Bearer " + this.config.atoken, + }; + await this.setObjectNotExistsAsync("seatelli", { + type: "state", + common: { + name: "Seat Elli Data", + write: false, + }, + native: {}, + }); + this.genericRequest("https://api.elli.eco/identity/v1/userinfo", header, "seatelli.userinfo", [404]).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); + this.genericRequest("https://api.elli.eco/customer/v1/charging/records?limit=100&offset=0", header, "seatelli.records", [404]).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); + this.genericRequest("https://api.elli.eco/customer/v1/cars", header, "seatelli.cars", [404]).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); + this.genericRequest("https://api.elli.eco/customer/v1/subscriptions", header, "seatelli.subscriptions", [404]).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); + this.genericRequest("https://api.elli.eco/customer/v1/rfidcards", header, "seatelli.rfidcards", [404]).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); + this.genericRequest("https://api.elli.eco/chargeathome/v1/chargingsessions", header, "seatelli.chargingsessions", [404]).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); + + this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, "seatelli.stations", [404], "stations") + .then((body) => { + body.forEach((station) => { + this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, "seatelli.stations." + station.name, [404]).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; + } + this.log.error("Failed to get sessions"); + }); + this.genericRequest( + "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=100&offset=0", + header, + "seatelli.stations." + station.name + ".chargingrecords", + [404] + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; + } + this.log.error("Failed to get sessions"); + }); + this.genericRequest( + "https://api.elli.eco/chargeathome/v1/chargingrecords/total-charged?station_id=" + station.id + "&limit=100&offset=0", + header, + "seatelli.stations." + station.name + ".chargingrecords.total-charged", + [404] + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get total-charged"); + return; + } + this.log.error("Failed to get total-charged"); + }); + }); + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get stations"); + return; + } + this.log.error("Failed to get stations"); + }); + } + getWcData(limit) { if (!limit) { limit = 25; @@ -1980,6 +2131,7 @@ class VwWeconnect extends utils.Adapter { } genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { return new Promise(async (resolve, reject) => { + header["If-None-Match"] = this.etags[url] || ""; request.get( { url: url, @@ -1994,9 +2146,10 @@ class VwWeconnect extends utils.Adapter { err && this.log.debug(err); resp && this.log.debug(resp.statusCode.toString()); body && this.log.debug(JSON.stringify(body)); - reject(true); + reject(true, err); return; } + err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); @@ -2004,6 +2157,12 @@ class VwWeconnect extends utils.Adapter { return; } this.log.debug(JSON.stringify(body)); + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } try { if (selector1) { body = body[selector1]; @@ -3076,6 +3235,17 @@ class VwWeconnect extends utils.Adapter { } return [result, hash]; } + getCodeChallengev2() { + let hash = ""; + let result = ""; + const chars = "0123456789abcdef"; + result = ""; + for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + hash = crypto.createHash("sha256").update(result).digest("base64"); + hash = hash.replace(/\+/g, "-").replace(/\//g, "_"); + + return [result, hash]; + } getNonce() { const timestamp = Date.now(); let hash = crypto.createHash("sha256").update(timestamp.toString()).digest("base64"); From 994c2cdf28b3d853c3d1792cd3704d9b9c4d4455 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 8 Jul 2021 21:01:46 +0200 Subject: [PATCH 333/729] add refreshtoken --- admin/index_m.html | 2 +- main.js | 112 ++++++++++++++++++++++++--------------------- 2 files changed, 62 insertions(+), 52 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index a4f8b3c8..1fd9efb1 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -82,13 +82,13 @@
diff --git a/main.js b/main.js index be41c80a..d5311aab 100644 --- a/main.js +++ b/main.js @@ -990,7 +990,14 @@ class VwWeconnect extends utils.Adapter { const brand = this.config.type === "skodae" ? "skoda" : this.config.type; body = "brand=" + brand + "&" + body; - + let headers = { + "user-agent": "okhttp/3.7.0", + "content-type": "application/x-www-form-urlencoded", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + "X-Client-Id": this.xclientId, + accept: "application/json", + }; if (isVw) { url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; rtoken = this.config.vwrtoken; @@ -1005,6 +1012,20 @@ class VwWeconnect extends utils.Adapter { grant_type: "refresh_token", refresh_token: rtoken, }; + } else if (this.config.type === "seatelli") { + url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdkit"; + body = JSON.stringify({ + brand: "seat", + grant_type: "refresh_token", + refresh_token: rtoken, + }); + // @ts-ignore + headers = { + "Content-Type": "application/json", + Accept: "application/json", + "User-Agent": "Seat-Prod/1221 CFNetwork/1240.0.4 Darwin/20.5.0", + "Accept-Language": "de-DE", + }; } return new Promise((resolve, reject) => { this.log.debug("refreshToken "); @@ -1012,14 +1033,7 @@ class VwWeconnect extends utils.Adapter { request.post( { url: url, - headers: { - "user-agent": "okhttp/3.7.0", - "content-type": "application/x-www-form-urlencoded", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - "X-Client-Id": this.xclientId, - accept: "application/json", - }, + headers: headers, body: body, form: form, gzip: true, @@ -1069,6 +1083,9 @@ class VwWeconnect extends utils.Adapter { this.config.atoken = tokens.accessToken; this.config.rtoken = tokens.refreshToken; } + if (tokens.token) { + this.config.atoken = tokens.token; + } } resolve(); } catch (err) { @@ -1884,18 +1901,33 @@ class VwWeconnect extends utils.Adapter { Authorization: "Bearer " + this.config.atoken, }; await this.setObjectNotExistsAsync("seatelli", { - type: "state", + type: "device", common: { name: "Seat Elli Data", write: false, }, native: {}, }); - this.genericRequest("https://api.elli.eco/identity/v1/userinfo", header, "seatelli.userinfo", [404]).catch((hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); + const endpoints = [ + "identity/v1/userinfo", + "customer/v1/cars", + "customer/v1/subscriptions", + "customer/v1/rfidcards", + "chargeathome/v1/chargingsessions", + "customer/v1/orders", + "customer/v1/charging/sessions", + "customer/v1/invoices", + "customer/v1/orders", + "customer/v1/subscriber", + ]; + endpoints.forEach((element) => { + const elementArray = element.split("/"); + this.genericRequest("https://api.elli.eco/" + element, header, "seatelli." + elementArray[elementArray.length - 1], [404, 409]).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); }); this.genericRequest("https://api.elli.eco/customer/v1/charging/records?limit=100&offset=0", header, "seatelli.records", [404]).catch((hideError, err) => { if (hideError) { @@ -1903,30 +1935,6 @@ class VwWeconnect extends utils.Adapter { } this.log.error(err); }); - this.genericRequest("https://api.elli.eco/customer/v1/cars", header, "seatelli.cars", [404]).catch((hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); - }); - this.genericRequest("https://api.elli.eco/customer/v1/subscriptions", header, "seatelli.subscriptions", [404]).catch((hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); - }); - this.genericRequest("https://api.elli.eco/customer/v1/rfidcards", header, "seatelli.rfidcards", [404]).catch((hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); - }); - this.genericRequest("https://api.elli.eco/chargeathome/v1/chargingsessions", header, "seatelli.chargingsessions", [404]).catch((hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); - }); this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, "seatelli.stations", [404], "stations") .then((body) => { @@ -1964,12 +1972,14 @@ class VwWeconnect extends utils.Adapter { }); }); }) - .catch((hideError) => { + .catch((hideError, err) => { if (hideError) { this.log.debug("Failed to get stations"); + this.log.debug(err); return; } this.log.error("Failed to get stations"); + this.log.error(err); }); } @@ -2153,9 +2163,10 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - reject(); + reject(false, err); return; } + this.log.debug(url); this.log.debug(JSON.stringify(body)); this.etags[url] = resp.headers.etag; if (resp.statusCode === 304) { @@ -3224,15 +3235,14 @@ class VwWeconnect extends utils.Adapter { getCodeChallenge() { let hash = ""; let result = ""; - while (hash === "" || hash.indexOf("+") !== -1 || hash.indexOf("/") !== -1 || hash.indexOf("=") !== -1 || result.indexOf("+") !== -1 || result.indexOf("/") !== -1) { - const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - result = ""; - for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; - result = Buffer.from(result).toString("base64"); - result = result.replace(/=/g, ""); - hash = crypto.createHash("sha256").update(result).digest("base64"); - hash = hash.slice(0, hash.length - 1); - } + const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + result = ""; + for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + result = Buffer.from(result).toString("base64"); + result = result.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + hash = crypto.createHash("sha256").update(result).digest("base64"); + hash = hash.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + return [result, hash]; } getCodeChallengev2() { @@ -3242,7 +3252,7 @@ class VwWeconnect extends utils.Adapter { result = ""; for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; hash = crypto.createHash("sha256").update(result).digest("base64"); - hash = hash.replace(/\+/g, "-").replace(/\//g, "_"); + hash = hash.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); return [result, hash]; } From 3300c141f89061b22c45a52ab1c714c4eba8ddd3 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 15 Jul 2021 21:43:36 +0200 Subject: [PATCH 334/729] add vin check --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index d5311aab..dcbd861d 100644 --- a/main.js +++ b/main.js @@ -1349,7 +1349,10 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "id") { body.data.forEach((element) => { const vin = element.vin; - + if (!vin) { + this.log.info("No vin found for:" + JSON.stringify(element)); + return; + } this.vinArray.push(vin); this.setObjectNotExists(element.vin, { type: "device", From c493df02f44737a8ea60f6ae5c08cfe91a82fa83 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 16 Jul 2021 12:52:56 +0200 Subject: [PATCH 335/729] add skoda powerpass --- admin/index_m.html | 1 + lib/extractKeys.js | 17 ++-------- main.js | 77 ++++++++++++++++++++++++++++++---------------- 3 files changed, 54 insertions(+), 41 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 1fd9efb1..18005620 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -90,6 +90,7 @@ +
diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 401956c4..5360bf71 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,4 +1,4 @@ -//v2.6 +//v2.5 async function extractKeys(adapter, path, element, preferedArrayName, forceIndex) { try { if (element === null || element === undefined) { @@ -51,10 +51,6 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex } objectKeys.forEach((key) => { - if (isJsonString(element[key])) { - element[key] = JSON.parse(element[key]); - } - if (Array.isArray(element[key])) { extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex); } else if (element[key] !== null && typeof element[key] === "object") { @@ -163,21 +159,14 @@ function extractArray(adapter, element, key, path, write, preferedArrayName, for adapter.setState(path + "." + subKey, subValue, true); return; } - extractKeys(adapter, path + "." + arrayPath, arrayElement); + extractKeys(adapter, path + "." + arrayPath, arrayElement, preferedArrayName, forceIndex); }); } catch (error) { adapter.log.error("Cannot extract array " + path); adapter.log.error(error); } } -function isJsonString(str) { - try { - JSON.parse(str); - } catch (e) { - return false; - } - return true; -} + module.exports = { extractKeys, }; diff --git a/main.js b/main.js index dcbd861d..2ebe5285 100644 --- a/main.js +++ b/main.js @@ -212,6 +212,18 @@ class VwWeconnect extends utils.Adapter { this.xappversion = ""; this.xappname = ""; } + if (this.config.type === "skodapower") { + this.type = ""; + this.country = ""; + this.clientId = "b84ba8a1-7925-43c9-9963-022587faaac5@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile"; + this.redirect = "skoda-hub://opid"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } if (this.config.interval === 0) { this.log.info("Interval of 0 is not allowed reset to 1"); this.config.interval = 1; @@ -321,9 +333,9 @@ class VwWeconnect extends utils.Adapter { this.getWcData(); }); return; - } else if (this.config.type === "seatelli") { - this.getSeatElliData().catch(() => { - this.log.error("get seatelli Failed"); + } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { + this.getElliData(this.config.type).catch(() => { + this.log.error("get elli Failed"); }); return; @@ -362,9 +374,9 @@ class VwWeconnect extends utils.Adapter { } } - if (this.config.type === "seatelli") { - this.getSeatElliData().catch(() => { - this.log.error("get seatelli Failed"); + if (this.config.type === "seatelli" || this.config.type === "skodapower") { + this.getElliData(this.config.type).catch(() => { + this.log.error("get elli Failed"); }); } }) @@ -388,7 +400,7 @@ class VwWeconnect extends utils.Adapter { const state = uuidv4(); let [code_verifier, codeChallenge] = this.getCodeChallenge(); - if (this.config.type === "seatelli") { + if (this.config.type === "seatelli" || this.config.type === "skodapower") { [code_verifier, codeChallenge] = this.getCodeChallengev2(); } const method = "GET"; @@ -406,7 +418,7 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "vwv2" || this.config.type === "go" || this.config.type === "seatelli") { + if (this.config.type === "vw" || this.config.type === "vwv2" || this.config.type === "go" || this.config.type === "seatelli" || this.config.type === "skodapower") { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } if (this.config.type === "audi") { @@ -834,14 +846,19 @@ class VwWeconnect extends utils.Adapter { this.getVWToken({}, jwtid_token, reject, resolve); return; } - if (this.config.type === "seatelli") { + if (this.config.type === "seatelli" || this.config.type === "skodapower") { url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdKit"; - + let brand = "seat"; + let redirect = "Seat-elli-hub://opid"; + if (this.config.type === "skodapower") { + brand = "skoda"; + redirect = "skoda-hub://opid"; + } body = JSON.stringify({ - brand: "seat", + brand: brand, grant_type: "authorization_code", code: jwtauth_code, - redirect_uri: "Seat-elli-hub://opid", + redirect_uri: redirect, code_verifier: code_verifier, }); // @ts-ignore @@ -923,7 +940,7 @@ class VwWeconnect extends utils.Adapter { this.config.atoken = tokens.access_token; this.config.rtoken = tokens.refresh_token; - if (this.config.type === "seatelli") { + if (this.config.type === "seatelli" || this.config.type === "skodapower") { this.config.atoken = tokens.token; } this.refreshTokenInterval = setInterval(() => { @@ -932,7 +949,7 @@ class VwWeconnect extends utils.Adapter { }); }, 0.9 * 60 * 60 * 1000); // 0.9hours } - if (this.config.type === "go" || this.config.type === "id" || this.config.type === "skodae" || this.config.type === "seatelli") { + if (this.config.type === "go" || this.config.type === "id" || this.config.type === "skodae" || this.config.type === "seatelli" || this.config.type === "skodapower") { resolve(); return; } @@ -1012,7 +1029,7 @@ class VwWeconnect extends utils.Adapter { grant_type: "refresh_token", refresh_token: rtoken, }; - } else if (this.config.type === "seatelli") { + } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdkit"; body = JSON.stringify({ brand: "seat", @@ -1023,7 +1040,7 @@ class VwWeconnect extends utils.Adapter { headers = { "Content-Type": "application/json", Accept: "application/json", - "User-Agent": "Seat-Prod/1221 CFNetwork/1240.0.4 Darwin/20.5.0", + "Accept-Language": "de-DE", }; } @@ -1103,7 +1120,7 @@ class VwWeconnect extends utils.Adapter { getPersonalData() { return new Promise((resolve, reject) => { - if (this.config.type === "audi" || this.config.type === "go" || this.config.type === "id" || this.config.type === "seatelli") { + if (this.config.type === "audi" || this.config.type === "go" || this.config.type === "id" || this.config.type === "seatelli" || this.config.type === "skodapower") { resolve(); return; } @@ -1274,7 +1291,7 @@ class VwWeconnect extends utils.Adapter { getVehicles() { return new Promise((resolve, reject) => { - if (this.config.type === "seatelli") { + if (this.config.type === "seatelli" || this.config.type === "skodapower") { resolve(); return; } @@ -1895,7 +1912,13 @@ class VwWeconnect extends utils.Adapter { ); }); } - async getSeatElliData() { + async getElliData(type) { + let name = "Seat Elli Data"; + let path = "seatelli"; + if (type === "skodapower") { + name = "Skoda Powerpass Data"; + path = "skodapower"; + } const header = { "Content-Type": "application/json", Accept: "application/json", @@ -1903,10 +1926,10 @@ class VwWeconnect extends utils.Adapter { "Accept-Language": "de-DE", Authorization: "Bearer " + this.config.atoken, }; - await this.setObjectNotExistsAsync("seatelli", { + await this.setObjectNotExistsAsync(path, { type: "device", common: { - name: "Seat Elli Data", + name: name, write: false, }, native: {}, @@ -1925,24 +1948,24 @@ class VwWeconnect extends utils.Adapter { ]; endpoints.forEach((element) => { const elementArray = element.split("/"); - this.genericRequest("https://api.elli.eco/" + element, header, "seatelli." + elementArray[elementArray.length - 1], [404, 409]).catch((hideError, err) => { + this.genericRequest("https://api.elli.eco/" + element, header, path + "." + elementArray[elementArray.length - 1], [404, 409]).catch((hideError, err) => { if (hideError) { return; } this.log.error(err); }); }); - this.genericRequest("https://api.elli.eco/customer/v1/charging/records?limit=100&offset=0", header, "seatelli.records", [404]).catch((hideError, err) => { + this.genericRequest("https://api.elli.eco/customer/v1/charging/records?limit=100&offset=0", header, path + ".records", [404]).catch((hideError, err) => { if (hideError) { return; } this.log.error(err); }); - this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, "seatelli.stations", [404], "stations") + this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, path + ".stations", [404], "stations") .then((body) => { body.forEach((station) => { - this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, "seatelli.stations." + station.name, [404]).catch((hideError) => { + this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, path + ".stations." + station.name, [404]).catch((hideError) => { if (hideError) { this.log.debug("Failed to get sessions"); return; @@ -1952,7 +1975,7 @@ class VwWeconnect extends utils.Adapter { this.genericRequest( "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=100&offset=0", header, - "seatelli.stations." + station.name + ".chargingrecords", + path + ".stations." + station.name + ".chargingrecords", [404] ).catch((hideError) => { if (hideError) { @@ -1964,7 +1987,7 @@ class VwWeconnect extends utils.Adapter { this.genericRequest( "https://api.elli.eco/chargeathome/v1/chargingrecords/total-charged?station_id=" + station.id + "&limit=100&offset=0", header, - "seatelli.stations." + station.name + ".chargingrecords.total-charged", + path + ".stations." + station.name + ".chargingrecords.total-charged", [404] ).catch((hideError) => { if (hideError) { From 43a48b9443bea971e65d14f33e5766be2156b03f Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 19 Jul 2021 11:09:53 +0200 Subject: [PATCH 336/729] disable force update for skodaE --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 2ebe5285..a7a9a54e 100644 --- a/main.js +++ b/main.js @@ -358,7 +358,7 @@ class VwWeconnect extends utils.Adapter { } }, this.config.interval * 60 * 1000); - if (this.config.type !== "id") { + if (this.config.type !== "id" && this.config.type !== "skodae") { if (this.config.forceinterval > 0) { this.fupdateInterval = setInterval(() => { if (this.config.type === "go") { From 83adfccb5f6c3edd2b299551eb10918822818c12 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 23 Jul 2021 07:44:47 +0000 Subject: [PATCH 337/729] Bump @types/mocha from 8.2.3 to 9.0.0 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.2.3 to 9.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) 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 c50687ff..df2948ad 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@types/chai": "^4.2.15", "@types/chai-as-promised": "^7.1.3", "@types/gulp": "^4.0.8", - "@types/mocha": "^8.2.1", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.0", From 7841bf5b2002f1a4cceef66f271eda625a9806f1 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 22 Aug 2021 10:35:22 +0200 Subject: [PATCH 338/729] add climatisation v3 --- main.js | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index a7a9a54e..afe93a29 100644 --- a/main.js +++ b/main.js @@ -1607,6 +1607,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.climatisationv3", { + type: "state", + common: { + name: "Start/Stop Climatisation v3", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { type: "state", common: { @@ -3490,7 +3500,7 @@ class VwWeconnect extends utils.Adapter { this.setState(pre + "." + vin + ".status.air-conditioning.settings.targetTemperatureInKelvin", state.val + 273.15, false); } } - if (action === "climatisation" || action === "climatisationv2") { + if (action === "climatisation" || action === "climatisationv2" || action === "climatisationv3") { if (this.config.type === "id") { const value = state.val ? "start" : "stop"; this.setIdRemote(vin, action, value).catch(() => { @@ -3514,6 +3524,75 @@ class VwWeconnect extends utils.Adapter { body = '\n\n stopClimatisation\n'; } contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + if (action === "climatisationv3") { + const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); + let heaterSource = "electric"; + if (heaterSourceState.val) { + heaterSource = heaterSourceState.val; + } + const isMirrorHeatingEnabledState = await this.getStateAsync(vin + ".climater.settings.climaterElementSettings.isMirrorHeatingEnabled.content"); + let isMirror = true; + if (isMirrorHeatingEnabledState.val) { + isMirror = isMirrorHeatingEnabledState.val; + } + const tagetTempState = await this.getStateAsync(vin + ".climater.settings.targetTemperature.content"); + let targetTemp = 2950; + if (tagetTempState.val) { + targetTemp = tagetTempState.val; + } + + body = { + action: { + type: "startClimatisation", + settings: { + targetTemperature: targetTemp, + heaterSource: heaterSource, + climaterElementSettings: { + isMirrorHeatingEnabled: isMirror, + zoneSettings: { + zoneSetting: [ + { + value: { + position: "frontLeft", + isEnabled: true, + }, + }, + { + value: { + position: "frontRight", + isEnabled: true, + }, + }, + { + value: { + position: "rearLeft", + isEnabled: true, + }, + }, + { + value: { + position: "rearRight", + isEnabled: true, + }, + }, + ], + }, + }, + }, + }, + }; + if (state.val === false) { + body = { + action: { + type: "stopClimatisation", + }, + }; + } + contentType = "application/json; charset=utf-8"; + body = JSON.stringify(body); + this.log.debug(body); + } + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { this.log.error("failed set state"); }); From 3bf7b2f52e6723641a037e1495c9ded4f412fff7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 22 Aug 2021 10:37:27 +0200 Subject: [PATCH 339/729] 0.0.40 --- README.md | 4 ++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e77f13f..d483c752 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.40 + +- add climate v3 for newer cars. Add Powerpass and Seat Elli + ### 0.0.39 - fix id login diff --git a/io-package.json b/io-package.json index 3133ba1d..6a476900 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.39", + "version": "0.0.40", "news": { + "0.0.40": { + "en": "add climate v3 for newer cars. Add Powerpass and Seat Elli" + }, "0.0.39": { "en": "fix id logn" }, diff --git a/package.json b/package.json index df2948ad..032d4a17 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.39" + "version": "0.0.40" } \ No newline at end of file From 7f78a9b2b019d7398ce39c050d1f87c50514202f Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 22 Aug 2021 10:39:58 +0200 Subject: [PATCH 340/729] clean news --- io-package.json | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/io-package.json b/io-package.json index 6a476900..4947fb1c 100644 --- a/io-package.json +++ b/io-package.json @@ -47,24 +47,6 @@ }, "0.0.21": { "en": "add remotes for id" - }, - "0.0.20": { - "en": "fix audi login, add ID login" - }, - "0.0.19": { - "en": "save status objects in state by id instead of consecutive numbers " - }, - "0.0.18": { - "en": "fix battery status of 2020 models" - }, - "0.0.17": { - "en": "support 2020 models" - }, - "0.0.16": { - "en": "fix js.controller 3 problems" - }, - "0.0.11": { - "en": "fix audi bug with multiple vehicles, hide status update error if feature is not available" } }, "title": "VW Connect", From 4ddebab3f827e8d3d756e123e0d65307c39e3ac6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 23 Aug 2021 19:31:30 +0200 Subject: [PATCH 341/729] fix vw2 brand --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index afe93a29..0e3559ec 100644 --- a/main.js +++ b/main.js @@ -803,6 +803,7 @@ class VwWeconnect extends utils.Adapter { body += "&code_verifier=" + code_verifier; } else { const brand = this.config.type === "skodae" ? "skoda" : this.config.type; + body += "&brand=" + brand; } if (this.config.type === "go") { @@ -1004,7 +1005,10 @@ class VwWeconnect extends utils.Adapter { let rtoken = this.config.rtoken; let body = "refresh_token=" + rtoken; let form = ""; - const brand = this.config.type === "skodae" ? "skoda" : this.config.type; + let brand = this.config.type === "skodae" ? "skoda" : this.config.type; + if (this.config.type === "vwv2") { + brand = "vw"; + } body = "brand=" + brand + "&" + body; let headers = { From 076e7c2fc2bde5f6238dec15672d0bb2e30d643c Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Sun, 5 Sep 2021 16:33:27 +0200 Subject: [PATCH 342/729] update travis.yml --- .travis.yml | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 623f4388..baa59b04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,32 +1,29 @@ os: - - linux - - osx - - windows - + - linux + - osx + - windows language: node_js node_js: - - "10" - - "12" - - "14" - + - '12' + - '14' + - '16' env: - - CXX=g++-4.8 + - CXX=g++-4.8 addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-6 before_install: - - 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then CC=gcc-4.9; fi' - - 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then CC=g++-4.9; fi' + - 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then CC=gcc-6; fi' + - 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then CC=g++-6; fi' before_script: - - export NPMVERSION=$(echo "$($(which npm) -v)"|cut -c1) - - "if [[ $NPMVERSION == 5 ]]; then npm install -g npm; fi" - - npm -v + - export NPMVERSION=$(echo "$($(which npm) -v)"|cut -c1) + - 'if [[ $NPMVERSION == 5 ]]; then npm install -g npm; fi' + - npm -v script: - - npm run test:package - - npm run test:unit - - export DEBUG=testing:* - - npm run test:integration + - 'npm run test:package' + - 'npm run test:unit' + - 'export DEBUG=testing:*' + - 'npm run test:integration' From 1e31fc3623a1cef52e521ffd0cfdb5232b312810 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 11 Sep 2021 19:29:38 +0200 Subject: [PATCH 343/729] improve error text --- admin/index_m.html | 4 ++-- main.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 18005620..9188c7a4 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -81,8 +81,8 @@
+ Rohe JSON speichern +
+
diff --git a/main.js b/main.js index 10680bce..131ee023 100644 --- a/main.js +++ b/main.js @@ -1772,6 +1772,25 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); try { this.extractKeys(this, vin + ".status", body.data); + if (this.config.rawJson) { + this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { + type: "state", + common: { + name: vin + ".status" + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + adapter.setState(vin + ".status" + "rawJson", body.data, true); + }) + .catch((error) => { + this.log.error(error); + }); + } resolve(); } catch (err) { this.log.error(err); @@ -1841,6 +1860,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); try { this.extractKeys(this, vin + ".status." + type + "." + endpoint, body); + resolve(); } catch (err) { this.log.error(err); @@ -2221,6 +2241,25 @@ class VwWeconnect extends utils.Adapter { body = body[selector2]; } } + if (this.config.rawJson) { + this.setObjectNotExistsAsync(path + "rawJson", { + type: "state", + common: { + name: path + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + adapter.setState(path + "rawJson", body, true); + }) + .catch((error) => { + this.log.error(error); + }); + } this.extractKeys(this, path, body); resolve(body); } catch (err) { From de7e719a387ddc67158e88871e0b1772b91edb98 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 20 Sep 2021 15:15:45 +0200 Subject: [PATCH 350/729] 0.0.43 --- README.md | 4 ++ io-package.json | 5 ++- main.js | 100 ++++++++++++++++++++++++++---------------------- package.json | 2 +- 4 files changed, 64 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index ee7f001f..aeb99b0b 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ Door and window states: ## Changelog +### 0.0.43 + +- increase refresh token timeouts + ### 0.0.42 - fix skoda login diff --git a/io-package.json b/io-package.json index b56a39bc..09cde92d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.42", + "version": "0.0.43", "news": { + "0.0.43": { + "en": "increase refreshToken timeouts" + }, "0.0.42": { "en": "fix Skoda Login" }, diff --git a/main.js b/main.js index 131ee023..6459434a 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,7 @@ class VwWeconnect extends utils.Adapter { this.extractKeys = extractKeys; this.jar = request.jar(); - + this.userAgent = "ioBroker v43"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -437,7 +437,7 @@ class VwWeconnect extends utils.Adapter { method: method, url: url, headers: { - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", @@ -494,7 +494,7 @@ class VwWeconnect extends utils.Adapter { url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", headers: { "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", @@ -530,7 +530,7 @@ class VwWeconnect extends utils.Adapter { url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", headers: { "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", @@ -566,8 +566,7 @@ class VwWeconnect extends utils.Adapter { url: "https://" + resp.request.host + resp.headers.location, jar: this.jar, headers: { - "User-Agent": - "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", @@ -588,8 +587,7 @@ class VwWeconnect extends utils.Adapter { jar: this.jar, headers: { "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": - "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", @@ -637,8 +635,7 @@ class VwWeconnect extends utils.Adapter { { url: resp.headers.location || "", headers: { - "User-Agent": - "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", @@ -661,8 +658,7 @@ class VwWeconnect extends utils.Adapter { url: getRequest.uri.href, headers: { "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": - "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36", + "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", @@ -722,7 +718,7 @@ class VwWeconnect extends utils.Adapter { url: "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", headers: { Host: "login.apps.emea.vwapps.io", - "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1", + "user-agent": this.userAgent, accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "accept-language": "de-de", }, @@ -793,7 +789,7 @@ class VwWeconnect extends utils.Adapter { let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; let headers = { - // "user-agent": "okhttp/3.7.0", + // "user-agent": this.userAgent, "X-App-version": this.xappversion, "content-type": "application/x-www-form-urlencoded", "x-app-name": this.xappname, @@ -833,7 +829,7 @@ class VwWeconnect extends utils.Adapter { accept: "*/*", "content-type": "application/json", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "user-agent": this.userAgent, "accept-language": "de-de", }; if (this.type === "Wc") { @@ -866,7 +862,7 @@ class VwWeconnect extends utils.Adapter { headers = { "Content-Type": "application/json", Accept: "application/json", - "User-Agent": "Seat-Prod/1221 CFNetwork/1240.0.4 Darwin/20.5.0", + "User-Agent": this.userAgent, "Accept-Language": "de-DE", }; } @@ -958,7 +954,7 @@ class VwWeconnect extends utils.Adapter { { url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", headers: { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, "X-Client-Id": this.xclientId, @@ -1012,7 +1008,7 @@ class VwWeconnect extends utils.Adapter { body = "brand=" + brand + "&" + body; let headers = { - "user-agent": "okhttp/3.7.0", + "user-agent": this.userAgent, "content-type": "application/x-www-form-urlencoded", "X-App-version": this.xappversion, "X-App-name": this.xappname, @@ -1082,7 +1078,9 @@ class VwWeconnect extends utils.Adapter { const tokens = JSON.parse(body); if (tokens.error) { this.log.error(JSON.stringify(body)); + clearTimeout(this.refreshTokenTimeout); this.refreshTokenTimeout = setTimeout(() => { + this.refreshTokenTimeout = null; this.refreshToken(isVw).catch(() => { this.log.error("refresh token failed"); }); @@ -1133,7 +1131,7 @@ class VwWeconnect extends utils.Adapter { { url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", headers: { - "user-agent": "okhttp/3.7.0", + "user-agent": this.userAgent, "X-App-version": this.xappversion, "X-App-name": this.xappname, authorization: "Bearer " + this.config.atoken, @@ -1193,7 +1191,7 @@ class VwWeconnect extends utils.Adapter { { url: "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/" + vin + "/homeRegion", headers: { - "user-agent": "okhttp/3.7.0", + "user-agent": this.userAgent, "X-App-version": this.xappversion, "X-App-name": this.xappname, authorization: "Bearer " + this.config.vwatoken, @@ -1240,7 +1238,7 @@ class VwWeconnect extends utils.Adapter { { url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", headers: { - "user-agent": "okhttp/3.7.0", + "user-agent": this.userAgent, "X-App-version": this.xappversion, "X-App-name": this.xappname, authorization: "Bearer " + this.config.atoken, @@ -1301,7 +1299,7 @@ class VwWeconnect extends utils.Adapter { } let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); let headers = { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, @@ -1327,7 +1325,7 @@ class VwWeconnect extends utils.Adapter { "content-type": "application/json", "content-version": "1", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }; @@ -1338,7 +1336,7 @@ class VwWeconnect extends utils.Adapter { headers = { accept: "application/json", "content-type": "application/json;charset=utf-8", - "user-agent": "OneConnect/000000023 CFNetwork/978.0.7 Darwin/18.7.0", + "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }; @@ -1753,7 +1751,7 @@ class VwWeconnect extends utils.Adapter { "content-type": "application/json", "content-version": "1", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }, @@ -1832,7 +1830,7 @@ class VwWeconnect extends utils.Adapter { "api-key": "ok", accept: "application/json", "content-type": "application/json;charset=utf-8", - "user-agent": "OneConnect/000000023 CFNetwork/978.0.7 Darwin/18.7.0", + "user-agent": this.userAgent, "accept-language": "de-de", "If-None-Match": this.etags[url] || "", authorization: "Bearer " + this.config.atoken, @@ -1909,7 +1907,7 @@ class VwWeconnect extends utils.Adapter { "api-key": "ok", accept: "application/json", "content-type": "application/json;charset=utf-8", - "user-agent": "OneConnect/000000023 CFNetwork/978.0.7 Darwin/18.7.0", + "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }, @@ -1956,7 +1954,7 @@ class VwWeconnect extends utils.Adapter { const header = { "Content-Type": "application/json", Accept: "application/json", - "User-Agent": "Seat-Prod/1221 CFNetwork/1240.0.4 Darwin/20.5.0", + "User-Agent": this.userAgent, "Accept-Language": "de-DE", Authorization: "Bearer " + this.config.atoken, }; @@ -2060,7 +2058,7 @@ class VwWeconnect extends utils.Adapter { "content-type": "application/json", "content-version": "1", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, wc_access_token: this.config.wc_access_token, @@ -2302,7 +2300,7 @@ class VwWeconnect extends utils.Adapter { "content-type": "application/json", accept: "*/*", "accept-language": "de-de", - "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "user-agent": this.userAgent, "content-version": "1", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", authorization: "Bearer " + this.config.atoken, @@ -2352,7 +2350,7 @@ class VwWeconnect extends utils.Adapter { "content-type": "application/json", "content-version": "1", "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": "WeConnect/5 CFNetwork/1206 Darwin/20.1.0", + "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.rtoken, }, @@ -2419,7 +2417,7 @@ class VwWeconnect extends utils.Adapter { { url: url, headers: { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, "X-Market": "de_DE", @@ -2489,7 +2487,7 @@ class VwWeconnect extends utils.Adapter { scope: "All", }, headers: { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, @@ -2585,7 +2583,7 @@ class VwWeconnect extends utils.Adapter { method: method, url: url, headers: { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, @@ -2646,7 +2644,7 @@ class VwWeconnect extends utils.Adapter { { url: url, headers: { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, "If-None-Match": this.etags[url] || "", @@ -2669,9 +2667,15 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - this.refreshToken(true).catch(() => { - this.log.error("Refresh Token was not successful"); - }); + this.log("Refresh Token in 10min"); + if (!this.refreshTokenTimeout) { + this.refreshTokenTimeout = setTimeout(() => { + this.refreshTokenTimeout = null; + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); + }, 10 * 60 * 1000); + } reject(); return; } else { @@ -2728,9 +2732,15 @@ class VwWeconnect extends utils.Adapter { if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { this.log.error("Error response try to refresh token " + path); this.log.error(JSON.stringify(body)); - this.refreshToken(true).catch(() => { - this.log.error("Refresh Token was not successful"); - }); + this.log("Refresh Token in 10min"); + if (!this.refreshTokenTimeout) { + this.refreshTokenTimeout = setTimeout(() => { + this.refreshTokenTimeout = null; + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); + }, 10 * 60 * 1000); + } } else { this.log.debug("Not able to get " + path); } @@ -3078,7 +3088,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); this.log.debug(contentType); const headers = { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, @@ -3135,7 +3145,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); this.log.debug(contentType); const headers = { - "User-Agent": "okhttp/3.7.0", + "User-Agent": this.userAgent, "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, @@ -3194,7 +3204,7 @@ class VwWeconnect extends utils.Adapter { { url: url, headers: { - "user-agent": "okhttp/3.7.0", + "user-agent": this.userAgent, "X-App-version": this.xappversion, "X-App-name": this.xappname, authorization: "Bearer " + this.config.vwatoken, @@ -3239,7 +3249,7 @@ class VwWeconnect extends utils.Adapter { { url: url, headers: { - "user-agent": "okhttp/3.7.0", + "user-agent": this.userAgent, "Content-Type": "application/json", "X-App-version": this.xappversion, "X-App-name": this.xappname, diff --git a/package.json b/package.json index 91ae8533..3f160881 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.42" + "version": "0.0.43" } \ No newline at end of file From da79a543448a995bf7d4003eec868051e76c72f6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 23 Sep 2021 10:00:19 +0200 Subject: [PATCH 351/729] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index aeb99b0b..b4f2d35a 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,10 @@ Please update your system on Node 10. Use the state under remote control to control your car remotely. +## Discussion and Questions + +https://forum.iobroker.net/topic/26438/test-adapter-vw-connect-für-vw-id-audi-seat-skoda + ## Status fields Explanation Door and window states: From 5a4e1bc746f79fedca1f72c473ece8f53f1dbafd Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 7 Oct 2021 22:51:27 +0200 Subject: [PATCH 352/729] 0.0.45 --- io-package.json | 7 +++++-- main.js | 26 ++++++++++++++------------ package.json | 2 +- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/io-package.json b/io-package.json index 09cde92d..b2338984 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.0.43", + "version": "0.0.45", "news": { - "0.0.43": { + "0.0.45": { + "en": "improve refresh token" + }, + "0.0.44": { "en": "increase refreshToken timeouts" }, "0.0.42": { diff --git a/main.js b/main.js index 6459434a..0346245b 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,7 @@ class VwWeconnect extends utils.Adapter { this.extractKeys = extractKeys; this.jar = request.jar(); - this.userAgent = "ioBroker v43"; + this.userAgent = "ioBroker v45"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -940,6 +940,9 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "seatelli" || this.config.type === "skodapower") { this.config.atoken = tokens.token; } + if (this.refreshTokenInterval) { + clearInterval(this.refreshTokenInterval); + } this.refreshTokenInterval = setInterval(() => { this.refreshToken().catch(() => { this.log.error("Refresh Token was not successful"); @@ -982,6 +985,9 @@ class VwWeconnect extends utils.Adapter { const tokens = JSON.parse(body); this.config.vwatoken = tokens.access_token; this.config.vwrtoken = tokens.refresh_token; + if (this.vwrefreshTokenInterval) { + clearInterval(this.vwrefreshTokenInterval); + } this.vwrefreshTokenInterval = setInterval(() => { this.refreshToken(true).catch(() => { this.log.error("Refresh Token was not successful"); @@ -1040,7 +1046,7 @@ class VwWeconnect extends utils.Adapter { headers = { "Content-Type": "application/json", Accept: "application/json", - + "user-agent": this.userAgent, "Accept-Language": "de-DE", }; } @@ -1064,10 +1070,8 @@ class VwWeconnect extends utils.Adapter { body && this.log.error(body); resp && this.log.error(resp.statusCode.toString()); setTimeout(() => { - this.log.error("Relogin"); - this.login().catch(() => { - this.log.error("Failed relogin"); - }); + this.log.error("Restart adapter in 10min"); + this.restart(); }, 10 * 60 * 1000); reject(); @@ -2372,10 +2376,8 @@ class VwWeconnect extends utils.Adapter { this.xrequest = "com.volkswagen.weconnect"; this.responseType = "code id_token token"; setTimeout(() => { - this.log.error("Relogin"); - this.login().catch(() => { - this.log.error("Failed relogin"); - }); + this.log.error("restart adapter in 10min"); + this.restart(); }, 10 * 60 * 1000); reject(); return; @@ -2667,7 +2669,7 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - this.log("Refresh Token in 10min"); + this.log.error("Refresh Token in 10min"); if (!this.refreshTokenTimeout) { this.refreshTokenTimeout = setTimeout(() => { this.refreshTokenTimeout = null; @@ -2732,7 +2734,7 @@ class VwWeconnect extends utils.Adapter { if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { this.log.error("Error response try to refresh token " + path); this.log.error(JSON.stringify(body)); - this.log("Refresh Token in 10min"); + this.log.error("Refresh Token in 10min"); if (!this.refreshTokenTimeout) { this.refreshTokenTimeout = setTimeout(() => { this.refreshTokenTimeout = null; diff --git a/package.json b/package.json index 3f160881..6b9a1342 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.43" + "version": "0.0.45" } \ No newline at end of file From b381a570eabfe836565ea08333f7dc448bdbd7e5 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 4 Nov 2021 09:53:29 +0100 Subject: [PATCH 353/729] fix log statement --- README.md | 12 +++--------- main.js | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b4f2d35a..47658dd3 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Use the state under remote control to control your car remotely. ## Discussion and Questions -https://forum.iobroker.net/topic/26438/test-adapter-vw-connect-für-vw-id-audi-seat-skoda + ## Status fields Explanation @@ -124,7 +124,6 @@ Door and window states: - fix skoda login - ### 0.0.40 - add climate v3 for newer cars. Add Powerpass and Seat Elli @@ -139,9 +138,8 @@ Door and window states: ### 0.0.35 -- add nodeJS v10 compatibility +- add nodeJS v10 compatibility - ### 0.0.34 - add auto accept of new privacy consent @@ -149,11 +147,7 @@ Door and window states: ### 0.0.32 - correct selection of last recent trips - -### 0.0.32 -- correct selection of last recent trips - ### 0.0.31 - enable multiple selection of trip types @@ -172,7 +166,7 @@ Door and window states: ### 0.0.25 -- add we charge +- add we charge ### 0.0.24 diff --git a/main.js b/main.js index 0346245b..231d86e8 100644 --- a/main.js +++ b/main.js @@ -674,7 +674,7 @@ class VwWeconnect extends utils.Adapter { if (err) { this.getTokens(getRequest, code_verifier, reject, resolve); } else { - this.log.error("No Token received. Please try to login in via app or type VWv2 in the settings"); + this.log.error("No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings"); try { this.log.debug(JSON.stringify(body)); } catch (err) { @@ -2544,7 +2544,7 @@ class VwWeconnect extends utils.Adapter { adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); }) .catch((error) => { - this.log.error(error); + adapter.log.error(error); }); } } From 3277c5120852f8a57c34430dd7baac6503b0dcb6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 12 Nov 2021 14:10:32 +0100 Subject: [PATCH 354/729] add audi data --- admin/index_m.html | 5 +- main.js | 159 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 158 insertions(+), 6 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 37e78060..1d656e62 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -83,12 +83,13 @@ diff --git a/main.js b/main.js index 231d86e8..fba8db08 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,7 @@ class VwWeconnect extends utils.Adapter { this.extractKeys = extractKeys; this.jar = request.jar(); - this.userAgent = "ioBroker v45"; + this.userAgent = "ioBroker v46"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -188,6 +188,14 @@ class VwWeconnect extends utils.Adapter { this.xappversion = "3.22.0"; this.xappname = "myAudi"; } + if (this.config.type === "audidata") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "ec6198b1-b31e-41ec-9a69-95d42d6497ed@apps_vw-dilab_com"; + this.scope = "openid profile address email phone"; + this.redirect = "acpp://de.audi.connectplugandplay/oauth2redirect/identitykit"; + this.responseType = "code"; + } if (this.config.type === "go") { this.type = ""; this.country = ""; @@ -252,6 +260,10 @@ class VwWeconnect extends utils.Adapter { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); }); + } else if (this.config.type === "audidata") { + this.getAudiDataStatus(vin).catch(() => { + this.log.error("get audi data status Failed"); + }); } else if (this.config.type === "skodae") { this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; this.scope = "openid dealers profile email cars address"; @@ -324,6 +336,12 @@ class VwWeconnect extends utils.Adapter { this.log.error("get skodae status Failed"); }); }); + } else if (this.config.type === "audidata") { + this.vinArray.forEach((vin) => { + this.getAudiDataStatus(vin).catch(() => { + this.log.error("get audi data status Failed"); + }); + }); } else if (this.config.type === "id") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { @@ -418,7 +436,14 @@ class VwWeconnect extends utils.Adapter { nonce + "&state=" + state; - if (this.config.type === "vw" || this.config.type === "vwv2" || this.config.type === "go" || this.config.type === "seatelli" || this.config.type === "skodapower") { + if ( + this.config.type === "vw" || + this.config.type === "vwv2" || + this.config.type === "go" || + this.config.type === "seatelli" || + this.config.type === "skodapower" || + this.config.type === "audidata" + ) { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } if (this.config.type === "audi") { @@ -812,6 +837,10 @@ class VwWeconnect extends utils.Adapter { "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + code_verifier; } + if (this.config.type === "audidata") { + url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = "code=" + jwtauth_code + "&client_id=" + this.clientId + "&redirect_uri=acpp://de.audi.connectplugandplay/oauth2redirect/identitykit&grant_type=authorization_code"; + } if (this.config.type === "id") { url = "https://login.apps.emea.vwapps.io/login/v1"; let redirerctUri = "weconnect://authenticated"; @@ -949,7 +978,14 @@ class VwWeconnect extends utils.Adapter { }); }, 0.9 * 60 * 60 * 1000); // 0.9hours } - if (this.config.type === "go" || this.config.type === "id" || this.config.type === "skodae" || this.config.type === "seatelli" || this.config.type === "skodapower") { + if ( + this.config.type === "go" || + this.config.type === "id" || + this.config.type === "skodae" || + this.config.type === "seatelli" || + this.config.type === "skodapower" || + this.config.type === "audidata" + ) { resolve(); return; } @@ -1035,6 +1071,16 @@ class VwWeconnect extends utils.Adapter { grant_type: "refresh_token", refresh_token: rtoken, }; + } else if (this.config.type === "audidata") { + url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = ""; + // @ts-ignore + form = { + scope: "openid+profile+address+email+phone", + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: rtoken, + }; } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdkit"; body = JSON.stringify({ @@ -1126,7 +1172,14 @@ class VwWeconnect extends utils.Adapter { getPersonalData() { return new Promise((resolve, reject) => { - if (this.config.type === "audi" || this.config.type === "go" || this.config.type === "id" || this.config.type === "seatelli" || this.config.type === "skodapower") { + if ( + this.config.type === "audi" || + this.config.type === "go" || + this.config.type === "audidata" || + this.config.type === "id" || + this.config.type === "seatelli" || + this.config.type === "skodapower" + ) { resolve(); return; } @@ -1321,6 +1374,18 @@ class VwWeconnect extends utils.Adapter { accept: "application/json;charset=UTF-8", }; } + if (this.config.type === "audidata") { + url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + // @ts-ignore + headers = { + "user-agent": "okhttp/3.9.1", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": this.userAgent, + accept: "application/json;charset=UTF-8", + }; + } if (this.config.type === "id") { url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; // @ts-ignore @@ -1483,6 +1548,25 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } + if (this.config.type === "audidata") { + body.forEach(async (element) => { + const vin = element.vehicle.vin; + this.vinArray.push(vin); + await this.setObjectNotExistsAsync(vin, { + type: "device", + common: { + name: element.specification.title, + role: "indicator", + type: "string", + write: false, + read: true, + }, + native: {}, + }); + }); + resolve(); + return; + } if (this.config.type === "skodae") { body.forEach(async (element) => { const vin = element.vin; @@ -1802,6 +1886,73 @@ class VwWeconnect extends utils.Adapter { ); }); } + getAudiDataStatus(vin) { + return new Promise((resolve, reject) => { + const statusArray = [ + { + path: "driverlog", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/driverlogs?page=0&limit=100&returnPollData=true", + }, + { + path: "lastParkingPosition", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", + }, + { + path: "status", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicles", + }, + ]; + statusArray.forEach((element) => { + const url = element.url; + this.log.debug(url); + request.get( + { + url: url, + + headers: { + accept: "application/json;charset=UTF-8", + "dmp-api-version": "v2.0", + "accept-language": "de-DE", + "dmp-client-info": "Android/8.0.0/Audi Connect/App/2.5.0", + "content-type": "application/json;charset=UTF-8", + "user-agent": this.userAgent, + "If-None-Match": this.etags[url] || "", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.debug(err); + resp && this.log.debug(resp.statusCode.toString()); + body && this.log.debug(JSON.stringify(body)); + reject(); + return; + } + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } + this.log.debug(JSON.stringify(body)); + try { + this.extractKeys(this, vin + "." + element.path, body); + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + }); + } getSkodaEStatus(vin) { return new Promise((resolve, reject) => { const typeArray = ["air-conditioning", "charging"]; From 434d08f5f1141553cc0e01e08c52b5a15010ada1 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 12 Nov 2021 14:22:14 +0100 Subject: [PATCH 355/729] fix audidata --- main.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index fba8db08..ac1a5901 100644 --- a/main.js +++ b/main.js @@ -839,7 +839,13 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "audidata") { url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = "code=" + jwtauth_code + "&client_id=" + this.clientId + "&redirect_uri=acpp://de.audi.connectplugandplay/oauth2redirect/identitykit&grant_type=authorization_code"; + body = + "code=" + + jwtauth_code + + "&client_id=" + + this.clientId + + "&redirect_uri=acpp://de.audi.connectplugandplay/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + + code_verifier; } if (this.config.type === "id") { url = "https://login.apps.emea.vwapps.io/login/v1"; @@ -1555,7 +1561,7 @@ class VwWeconnect extends utils.Adapter { await this.setObjectNotExistsAsync(vin, { type: "device", common: { - name: element.specification.title, + name: vin, role: "indicator", type: "string", write: false, @@ -1939,9 +1945,17 @@ class VwWeconnect extends utils.Adapter { return; } } + let preferedName = null; + if (element.path === "status") { + body = body[0]; + } + if (element.path === "driverlog") { + preferedName = "driverLogId"; + } this.log.debug(JSON.stringify(body)); + try { - this.extractKeys(this, vin + "." + element.path, body); + this.extractKeys(this, vin + "." + element.path, body, preferedName); resolve(); } catch (err) { From 935971ee5f4ad1dd9ffc64602cbee25a692cbf4b Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 09:48:39 +0100 Subject: [PATCH 356/729] Add geohash --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6b9a1342..641462e3 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "@peculiar/webcrypto": "^1.1.6", "request": "^2.88.2", "traverse": "^0.6.6", - "uuid": "^8.3.2" + "uuid": "^8.3.2", + "latlon-geohash": "^2.0.0" }, "deprecated": false, "description": "Adapter for VW Connect", @@ -75,4 +76,4 @@ "test:unit": "mocha test/unit --exit" }, "version": "0.0.45" -} \ No newline at end of file +} From 4ec2ade312356538fd14b923c35ebc192284693f Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 10:02:51 +0100 Subject: [PATCH 357/729] add geohash --- main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.js b/main.js index ac1a5901..0defa00b 100644 --- a/main.js +++ b/main.js @@ -4043,6 +4043,20 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + + this.setState(vin + ".position.geohash", state.val / 1000000, true); + await this.setObjectNotExistsAsync(vin + ".position.geohash", { + type: "state", + common: { + name: "geohash converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); From 4c3d071a4a3acab003ee3c037e895ca3aaaaef58 Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 10:09:50 +0100 Subject: [PATCH 358/729] add ngeohash dep --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 641462e3..60213f7b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "request": "^2.88.2", "traverse": "^0.6.6", "uuid": "^8.3.2", - "latlon-geohash": "^2.0.0" + "ngeohash": "^0.6.3" }, "deprecated": false, "description": "Adapter for VW Connect", From bef42fc6974d8e01469e22df900869855a37a239 Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 10:15:10 +0100 Subject: [PATCH 359/729] add geohash --- main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 0defa00b..437460be 100644 --- a/main.js +++ b/main.js @@ -14,6 +14,7 @@ const crypto = require("crypto"); const { Crypto } = require("@peculiar/webcrypto"); const { v4: uuidv4 } = require("uuid"); const traverse = require("traverse"); +const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); class VwWeconnect extends utils.Adapter { /** @@ -4043,8 +4044,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - - this.setState(vin + ".position.geohash", state.val / 1000000, true); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); + await this.setObjectNotExistsAsync(vin + ".position.geohash", { type: "state", common: { @@ -4056,8 +4057,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setState(vin + ".position.geohash", geohash.encode(state.val / 1000000, longitudeValue / 1000000), true); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); return; From 05bbaa0d5524444a7df20e256168de5a824b0329 Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 10:21:07 +0100 Subject: [PATCH 360/729] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 60213f7b..d580285a 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.45" + "version": "0.0.46" } From 2f1d043a43440c07ef0a307b63d8e7ac78ed6582 Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 10:49:50 +0100 Subject: [PATCH 361/729] add ngeohash --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d580285a..9b8f638f 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,7 @@ "@peculiar/webcrypto": "^1.1.6", "request": "^2.88.2", "traverse": "^0.6.6", - "uuid": "^8.3.2", - "ngeohash": "^0.6.3" + "uuid": "^8.3.2" }, "deprecated": false, "description": "Adapter for VW Connect", @@ -44,7 +43,8 @@ "mocha": "^9.0.1", "proxyquire": "^2.1.3", "sinon": "^11.1.0", - "sinon-chai": "^3.5.0" + "sinon-chai": "^3.5.0", + "ngeohash": "^0.6.3" }, "engines": { "node": ">=10.0.0" From caa094089cfd09ba3de12a43a668d2cc1458b997 Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 10:50:14 +0100 Subject: [PATCH 362/729] Update io-package.json --- io-package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io-package.json b/io-package.json index b2338984..b5927817 100644 --- a/io-package.json +++ b/io-package.json @@ -1,7 +1,7 @@ { "common": { "name": "vw-connect", - "version": "0.0.45", + "version": "0.0.46", "news": { "0.0.45": { "en": "improve refresh token" @@ -172,4 +172,4 @@ "native": {} } ] -} \ No newline at end of file +} From 1844963580f1b548efe9b8323be2d494c84450b3 Mon Sep 17 00:00:00 2001 From: phlupp Date: Tue, 16 Nov 2021 11:17:45 +0100 Subject: [PATCH 363/729] Add ngeohash --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9b8f638f..d580285a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "@peculiar/webcrypto": "^1.1.6", "request": "^2.88.2", "traverse": "^0.6.6", - "uuid": "^8.3.2" + "uuid": "^8.3.2", + "ngeohash": "^0.6.3" }, "deprecated": false, "description": "Adapter for VW Connect", @@ -43,8 +44,7 @@ "mocha": "^9.0.1", "proxyquire": "^2.1.3", "sinon": "^11.1.0", - "sinon-chai": "^3.5.0", - "ngeohash": "^0.6.3" + "sinon-chai": "^3.5.0" }, "engines": { "node": ">=10.0.0" From df262c2da99fec89d518564869762e8a3526f5b6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 24 Nov 2021 13:15:06 +0100 Subject: [PATCH 364/729] add refresh state --- main.js | 111 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 47 deletions(-) diff --git a/main.js b/main.js index ac1a5901..b80c2d07 100644 --- a/main.js +++ b/main.js @@ -250,6 +250,16 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.log.debug("Login successful"); this.setState("info.connection", true, true); + this.setObjectNotExists("refresh", { + type: "state", + common: { + name: "Refresh All States", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); this.getPersonalData() .then(() => { this.getVehicles() @@ -327,53 +337,7 @@ class VwWeconnect extends utils.Adapter { } this.updateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } else if (this.config.type === "skodae") { - this.vinArray.forEach((vin) => { - this.getSkodaEStatus(vin).catch(() => { - this.log.error("get skodae status Failed"); - }); - }); - } else if (this.config.type === "audidata") { - this.vinArray.forEach((vin) => { - this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status Failed"); - }); - }); - } else if (this.config.type === "id") { - this.vinArray.forEach((vin) => { - this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); - this.refreshIDToken().catch(() => {}); - }); - this.getWcData(); - }); - return; - } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { - this.getElliData(this.config.type).catch(() => { - this.log.error("get elli Failed"); - }); - - return; - } else { - this.vinArray.forEach((vin) => { - this.statesArray.forEach((state) => { - if (state.path == "tripdata") { - this.tripTypes.forEach((tripType) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - } else { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - } - }); - }); - } + this.updateStatus(); }, this.config.interval * 60 * 1000); if (this.config.type !== "id" && this.config.type !== "skodae") { @@ -735,6 +699,55 @@ class VwWeconnect extends utils.Adapter { ); }); } + updateStatus() { + if (this.config.type === "go") { + this.getVehicles(); + return; + } else if (this.config.type === "skodae") { + this.vinArray.forEach((vin) => { + this.getSkodaEStatus(vin).catch(() => { + this.log.error("get skodae status Failed"); + }); + }); + } else if (this.config.type === "audidata") { + this.vinArray.forEach((vin) => { + this.getAudiDataStatus(vin).catch(() => { + this.log.error("get audi data status Failed"); + }); + }); + } else if (this.config.type === "id") { + this.vinArray.forEach((vin) => { + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + this.refreshIDToken().catch(() => {}); + }); + this.getWcData(); + }); + return; + } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { + this.getElliData(this.config.type).catch(() => { + this.log.error("get elli Failed"); + }); + + return; + } else { + this.vinArray.forEach((vin) => { + this.statesArray.forEach((state) => { + if (state.path == "tripdata") { + this.tripTypes.forEach((tripType) => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { + this.log.debug("error while getting " + state.url); + }); + }); + } else { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); + }); + } + }); + }); + } + } receiveLoginUrl() { return new Promise((resolve, reject) => { request( @@ -3611,6 +3624,10 @@ class VwWeconnect extends utils.Adapter { const vin = id.split(".")[2]; let body = ""; let contentType = ""; + if (vin === "refresh") { + this.updateStatus(); + return; + } if (id.indexOf("Settings.") != -1) { if (this.config.type === "id") { const action = id.split(".")[5]; From f2b3ec423559cc11df483bbac2986f5e2424568b Mon Sep 17 00:00:00 2001 From: phlupp Date: Mon, 29 Nov 2021 15:49:02 +0100 Subject: [PATCH 365/729] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d580285a..60213f7b 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.46" + "version": "0.0.45" } From ceca3c24ed4dbc735eba4cada64cf5eacb8e8594 Mon Sep 17 00:00:00 2001 From: phlupp Date: Mon, 29 Nov 2021 15:49:28 +0100 Subject: [PATCH 366/729] Update io-package.json --- io-package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io-package.json b/io-package.json index b5927817..4640ae88 100644 --- a/io-package.json +++ b/io-package.json @@ -1,7 +1,7 @@ { "common": { "name": "vw-connect", - "version": "0.0.46", + "version": "0.0.45", "news": { "0.0.45": { "en": "improve refresh token" From d74d6eb66b41ee2b9cb7149af5c46d5e21dd75c2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 30 Nov 2021 14:57:53 +0100 Subject: [PATCH 367/729] force index for sessions --- main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index ce7b757b..09c75864 100644 --- a/main.js +++ b/main.js @@ -2441,7 +2441,12 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); }); } - this.extractKeys(this, path, body); + let preferedArrayName = null; + let forceIndex = null; + if (path === "chargingsessions" || path === "sessions") { + forceIndex = true; + } + this.extractKeys(this, path, body, preferedArrayName, forceIndex); resolve(body); } catch (err) { this.log.error(err); From 882b7ff32cd12e3a87176a391ea75d87e86c3712 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 1 Dec 2021 12:00:17 +0100 Subject: [PATCH 368/729] add chargeMinLimit --- main.js | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 09c75864..3773289c 100644 --- a/main.js +++ b/main.js @@ -1697,6 +1697,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.chargeMinLimit", { + type: "state", + common: { + name: "Set chargeMinLimit", + type: "number", + role: "number", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vehicle + ".remote.climatisation", { type: "state", common: { @@ -3703,6 +3713,26 @@ class VwWeconnect extends utils.Adapter { this.log.error("failed set state"); }); } + if (action === "chargeMinLimit") { + body = ` + + setChargeMinLimit + + + + + + + ${state.val} + + + `; + + contentType = "application/vnd.vwg.mbb.timeraction_v1_0_0+xml"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/timer/actions", body, contentType).catch(() => { + this.log.error("failed set min limit state"); + }); + } if (action === "maxChargeCurrent") { body = '\nsetSettings \n \n' + @@ -4067,7 +4097,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - + await this.setObjectNotExistsAsync(vin + ".position.geohash", { type: "state", common: { @@ -4080,7 +4110,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.geohash", geohash.encode(state.val / 1000000, longitudeValue / 1000000), true); - + if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); return; From d36257e0ecadd811a13e04914a605edeadee806e Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 1 Dec 2021 19:16:41 +0100 Subject: [PATCH 369/729] fix url --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 3773289c..3206989f 100644 --- a/main.js +++ b/main.js @@ -3729,7 +3729,7 @@ class VwWeconnect extends utils.Adapter { `; contentType = "application/vnd.vwg.mbb.timeraction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/timer/actions", body, contentType).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer/actions", body, contentType).catch(() => { this.log.error("failed set min limit state"); }); } From c827e09ea64bfd5413821a1a5bf751d4d656621a Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 1 Dec 2021 21:59:34 +0100 Subject: [PATCH 370/729] fix check --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 3206989f..af687125 100644 --- a/main.js +++ b/main.js @@ -2453,7 +2453,7 @@ class VwWeconnect extends utils.Adapter { } let preferedArrayName = null; let forceIndex = null; - if (path === "chargingsessions" || path === "sessions") { + if (path.indexOf("chargingsessions") !== -1 || path.indexOf("sessions") !== -1) { forceIndex = true; } this.extractKeys(this, path, body, preferedArrayName, forceIndex); From 89e41b9d07d934d2c0b6233f317903e51091c1b3 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 14 Jan 2022 08:54:10 +0100 Subject: [PATCH 371/729] add new stadnheizung --- main.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index af687125..24c94726 100644 --- a/main.js +++ b/main.js @@ -1807,6 +1807,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.ventilationv3", { + type: "state", + common: { + name: "Ventilation/Standheizung Audi aktiviert/deaktivieren", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vehicle + ".remote.standheizungv2", { type: "state", common: { @@ -3872,7 +3882,7 @@ class VwWeconnect extends utils.Adapter { } } - if (action === "ventilation" || action === "ventilationv2") { + if (action === "ventilation" || action === "ventilationv2" || action === "ventilationv3") { const idArray = id.split("."); idArray.pop(); idArray.push(action + "Duration"); @@ -3901,7 +3911,15 @@ class VwWeconnect extends utils.Adapter { contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; } - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + let secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + if (action === "ventilationv3") { + body = '{"performAction":{"quickstart":{"active":true,"climatisationDuration":' + duration + "}}}"; + if (state.val === false) { + body = '{"performAction":{"quickstop":{"active":false}}}'; + secToken = null; + } + contentType = "application/json; charset=utf-8"; + } this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { this.log.error("failed set state"); }); From 32e4bc0a7515b3b931f29fda1949f2dfc3d166c0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 27 Jan 2022 10:46:07 +0100 Subject: [PATCH 372/729] add force refresh for audi --- main.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 24c94726..06c8b542 100644 --- a/main.js +++ b/main.js @@ -33,7 +33,7 @@ class VwWeconnect extends utils.Adapter { this.extractKeys = extractKeys; this.jar = request.jar(); - this.userAgent = "ioBroker v46"; + this.userAgent = "ioBroker v47"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -1493,6 +1493,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.climatisation", { type: "state", common: { @@ -1677,6 +1678,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.forceRefresh", { + type: "state", + common: { + name: "force Refresh", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vehicle + ".remote.batterycharge", { type: "state", common: { @@ -2767,14 +2778,13 @@ class VwWeconnect extends utils.Adapter { requestStatusUpdate(vin) { return new Promise((resolve, reject) => { try { - if (this.config.type === "audi") { - resolve(); - return; - } let method = "POST"; let url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); let accept = "application/json"; + if (this.config.type === "audi") { + url = this.replaceVarInUrl("$homeregion/api/bs/vsr/v1/vehicles/$vin/requests", vin); + } if (this.config.type === "vw") { accept = "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; @@ -3654,6 +3664,10 @@ class VwWeconnect extends utils.Adapter { this.updateStatus(); return; } + if (id.indexOf("remote.forceRefresh") !== -1) { + this.requestStatusUpdate(vin); + return; + } if (id.indexOf("Settings.") != -1) { if (this.config.type === "id") { const action = id.split(".")[5]; From df98a6338558f4cb2a106870ab2673444cf4d909 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 27 Jan 2022 10:51:32 +0100 Subject: [PATCH 373/729] fix typo --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 06c8b542..3d1262b9 100644 --- a/main.js +++ b/main.js @@ -1678,7 +1678,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.forceRefresh", { + this.setObjectNotExists(vehicle + ".remote.forceRefresh", { type: "state", common: { name: "force Refresh", From 732b7c78d10f22a0dd1a23c1f4ad0f694ab0b1bf Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 27 Jan 2022 11:00:53 +0100 Subject: [PATCH 374/729] update url --- io-package.json | 348 ++++++++++++++++++++++++------------------------ main.js | 8 +- package.json | 154 ++++++++++----------- 3 files changed, 259 insertions(+), 251 deletions(-) diff --git a/io-package.json b/io-package.json index 4640ae88..0605863d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,175 +1,181 @@ { - "common": { - "name": "vw-connect", - "version": "0.0.45", - "news": { - "0.0.45": { - "en": "improve refresh token" - }, - "0.0.44": { - "en": "increase refreshToken timeouts" - }, - "0.0.42": { - "en": "fix Skoda Login" - }, - "0.0.41": { - "en": "fix VWv2 refreshToken" - }, - "0.0.40": { - "en": "add climate v3 for newer cars. Add Powerpass and Seat Elli" - }, - "0.0.39": { - "en": "fix id logn" - }, - "0.0.36": { - "en": "add Skoda Enyaq support" - }, - "0.0.35": { - "en": "add nodeJs v10 compatibility" - }, - "0.0.34": { - "en": "add auto accept of new privacy consent" - }, - "0.0.32": { - "en": "correct selection of last recent trips" - }, - "0.0.31": { - "en": "enable multiple selection of trip types" - }, - "0.0.30": { - "en": "fix problem with multiple cars, add VWv2 mode, VW and VWv2 are equal at the moment" - }, - "0.0.29": { - "en": "fix skoda refreshToken, smaller improvements" - }, - "0.0.26": { - "en": "bugfixes" - }, - "0.0.25": { - "en": "add we charge" - }, - "0.0.24": { - "en": "add remote state update" - }, - "0.0.23": { - "en": "add Seat and new climatisation v2" - }, - "0.0.22": { - "en": "calculate outside temperatur in °C also for Skoda and Audi" - }, - "0.0.21": { - "en": "add remotes for id" - } + "common": { + "name": "vw-connect", + "version": "0.0.47", + "news": { + "0.0.47": { + "en": "add audi standheizung" + }, + "0.0.46": { + "en": "add audi dataplug" + }, + "0.0.45": { + "en": "improve refresh token" + }, + "0.0.44": { + "en": "increase refreshToken timeouts" + }, + "0.0.42": { + "en": "fix Skoda Login" + }, + "0.0.41": { + "en": "fix VWv2 refreshToken" + }, + "0.0.40": { + "en": "add climate v3 for newer cars. Add Powerpass and Seat Elli" + }, + "0.0.39": { + "en": "fix id logn" + }, + "0.0.36": { + "en": "add Skoda Enyaq support" + }, + "0.0.35": { + "en": "add nodeJs v10 compatibility" + }, + "0.0.34": { + "en": "add auto accept of new privacy consent" + }, + "0.0.32": { + "en": "correct selection of last recent trips" + }, + "0.0.31": { + "en": "enable multiple selection of trip types" + }, + "0.0.30": { + "en": "fix problem with multiple cars, add VWv2 mode, VW and VWv2 are equal at the moment" + }, + "0.0.29": { + "en": "fix skoda refreshToken, smaller improvements" + }, + "0.0.26": { + "en": "bugfixes" + }, + "0.0.25": { + "en": "add we charge" + }, + "0.0.24": { + "en": "add remote state update" + }, + "0.0.23": { + "en": "add Seat and new climatisation v2" + }, + "0.0.22": { + "en": "calculate outside temperatur in °C also for Skoda and Audi" + }, + "0.0.21": { + "en": "add remotes for id" + } + }, + "title": "VW Connect", + "titleLang": { + "en": "VW Connect", + "de": "VW Connect", + "ru": "VW мы соединяемся", + "pt": "VW Connect", + "nl": "VW Connect", + "fr": "VW Connect", + "it": "VW Connect", + "es": "VW Connect", + "pl": "VW Connect", + "zh-cn": "大众我们连接" + }, + "desc": { + "en": "Adapter for VW Connect", + "de": "Adapter für VW Connect", + "ru": "Адаптер для VW Connect", + "pt": "Adaptador para VW Connect", + "nl": "Adapter voor VW Connect", + "fr": "Adaptateur pour VW Connect", + "it": "Adattatore per VW Connect", + "es": "Adaptador para VW Connect", + "pl": "Adapter do VW Connect", + "zh-cn": "大众我们连接的适配器" + }, + "authors": [ + "ta2k ", + "Sneak-L8 " + ], + "keywords": [ + "VW", + "Connect", + "Audi", + "myAudi", + "Skoda", + "Skoda Connect", + "VW Connect", + "VW Connect ID", + "ID.3", + "VW Connect Go", + "Seat" + ], + "license": "MIT", + "platform": "Javascript/Node.js", + "main": "main.js", + "icon": "vw-connect.png", + "enabled": true, + "extIcon": "https://raw.githubusercontent.com/ta2k/ioBroker.vw-connect/master/admin/vw-connect.png", + "readme": "https://github.com/ta2k/ioBroker.vw-connect/blob/master/README.md", + "loglevel": "info", + "mode": "daemon", + "type": "vehicle", + "compact": true, + "connectionType": "cloud", + "dataSource": "poll", + "materialize": true, + "plugins": { + "sentry": { + "dsn": "https://8318f3635f334042a0525ee37a87a587@sentry.iobroker.net/66" + } + }, + "dependencies": [ + { + "js-controller": ">=1.4.2" + } + ] }, - "title": "VW Connect", - "titleLang": { - "en": "VW Connect", - "de": "VW Connect", - "ru": "VW мы соединяемся", - "pt": "VW Connect", - "nl": "VW Connect", - "fr": "VW Connect", - "it": "VW Connect", - "es": "VW Connect", - "pl": "VW Connect", - "zh-cn": "大众我们连接" + "native": { + "user": "", + "password": "", + "atoken": "", + "rtoken": "", + "vwatoken": "", + "vwrtoken": "", + "wc_access_token": "", + "wc_refresh_token": "", + "userid": "", + "pin": "", + "identifier": "", + "interval": 15, + "forceinterval": 360, + "type": "vw", + "reversePos": false, + "rights": false, + "tripType": "none", + "numberOfTrips": 1 }, - "desc": { - "en": "Adapter for VW Connect", - "de": "Adapter für VW Connect", - "ru": "Адаптер для VW Connect", - "pt": "Adaptador para VW Connect", - "nl": "Adapter voor VW Connect", - "fr": "Adaptateur pour VW Connect", - "it": "Adattatore per VW Connect", - "es": "Adaptador para VW Connect", - "pl": "Adapter do VW Connect", - "zh-cn": "大众我们连接的适配器" - }, - "authors": [ - "ta2k ", - "Sneak-L8 " - ], - "keywords": [ - "VW", - "Connect", - "Audi", - "myAudi", - "Skoda", - "Skoda Connect", - "VW Connect", - "VW Connect ID", - "ID.3", - "VW Connect Go", - "Seat" - ], - "license": "MIT", - "platform": "Javascript/Node.js", - "main": "main.js", - "icon": "vw-connect.png", - "enabled": true, - "extIcon": "https://raw.githubusercontent.com/ta2k/ioBroker.vw-connect/master/admin/vw-connect.png", - "readme": "https://github.com/ta2k/ioBroker.vw-connect/blob/master/README.md", - "loglevel": "info", - "mode": "daemon", - "type": "vehicle", - "compact": true, - "connectionType": "cloud", - "dataSource": "poll", - "materialize": true, - "plugins": { - "sentry": { - "dsn": "https://8318f3635f334042a0525ee37a87a587@sentry.iobroker.net/66" - } - }, - "dependencies": [ - { - "js-controller": ">=1.4.2" - } + "objects": [], + "instanceObjects": [ + { + "_id": "info", + "type": "channel", + "common": { + "name": "Information" + }, + "native": {} + }, + { + "_id": "info.connection", + "type": "state", + "common": { + "role": "indicator.connected", + "name": "Device or service connected", + "type": "boolean", + "read": true, + "write": false, + "def": false + }, + "native": {} + } ] - }, - "native": { - "user": "", - "password": "", - "atoken": "", - "rtoken": "", - "vwatoken": "", - "vwrtoken": "", - "wc_access_token": "", - "wc_refresh_token": "", - "userid": "", - "pin": "", - "identifier": "", - "interval": 15, - "forceinterval": 360, - "type": "vw", - "reversePos": false, - "rights": false, - "tripType": "none", - "numberOfTrips": 1 - }, - "objects": [], - "instanceObjects": [ - { - "_id": "info", - "type": "channel", - "common": { - "name": "Information" - }, - "native": {} - }, - { - "_id": "info.connection", - "type": "state", - "common": { - "role": "indicator.connected", - "name": "Device or service connected", - "type": "boolean", - "read": true, - "write": false, - "def": false - }, - "native": {} - } - ] -} +} \ No newline at end of file diff --git a/main.js b/main.js index 3d1262b9..aa09c29b 100644 --- a/main.js +++ b/main.js @@ -2782,9 +2782,9 @@ class VwWeconnect extends utils.Adapter { let url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); let accept = "application/json"; - if (this.config.type === "audi") { - url = this.replaceVarInUrl("$homeregion/api/bs/vsr/v1/vehicles/$vin/requests", vin); - } + // if (this.config.type === "audi") { + // url = this.replaceVarInUrl("https://mal-3a.prd.eu.dp.vwg-connect.com/api/bs/vsr/v1/vehicles/$vin/requests", vin); + // } if (this.config.type === "vw") { accept = "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; @@ -2794,6 +2794,7 @@ class VwWeconnect extends utils.Adapter { url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; } + this.log.debug("Request update " +url) request( { method: method, @@ -2826,6 +2827,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); resolve(); } catch (err) { + this.log.error("Request update failed: " + url) this.log.error(vin); this.log.error(err); reject(); diff --git a/package.json b/package.json index 60213f7b..b9857b83 100644 --- a/package.json +++ b/package.json @@ -1,79 +1,79 @@ { - "author": { - "name": "ta2k", - "email": "tombox2020@gmail.com" - }, - "contributors": [ - { - "name": "ta2k", - "email": "tombox2020@gmail.com" + "author": { + "name": "ta2k", + "email": "tombox2020@gmail.com" }, - { - "name": "Sneak-L8", - "email": "git@sengler.de" - } - ], - "bugs": { - "url": "https://github.com/ta2k/ioBroker.vw-connect/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@iobroker/adapter-core": "^2.4.0", - "@peculiar/webcrypto": "^1.1.6", - "request": "^2.88.2", - "traverse": "^0.6.6", - "uuid": "^8.3.2", - "ngeohash": "^0.6.3" - }, - "deprecated": false, - "description": "Adapter for VW Connect", - "devDependencies": { - "@iobroker/testing": "^2.4.2", - "@types/chai": "^4.2.15", - "@types/chai-as-promised": "^7.1.3", - "@types/gulp": "^4.0.8", - "@types/mocha": "^9.0.0", - "@types/node": "^16.0.0", - "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.0", - "@types/sinon-chai": "^3.2.5", - "chai": "^4.3.0", - "chai-as-promised": "^7.1.1", - "eslint": "^7.21.0", - "gulp": "^4.0.2", - "mocha": "^9.0.1", - "proxyquire": "^2.1.3", - "sinon": "^11.1.0", - "sinon-chai": "^3.5.0" - }, - "engines": { - "node": ">=10.0.0" - }, - "homepage": "https://github.com/ta2k/ioBroker.vw-connect", - "keywords": [ - "VW", - "Connect", - "Audi", - "myAudi", - "Skoda", - "Skoda Connect", - "VW Connect", - "VW Connect Go" - ], - "license": "MIT", - "main": "main.js", - "name": "iobroker.vw-connect", - "repository": { - "type": "git", - "url": "git+https://github.com/TA2k/ioBroker.vw-connect.git" - }, - "scripts": { - "lint": "eslint", - "test": "npm run test:js && npm run test:package", - "test:integration": "mocha test/integration --exit", - "test:js": "mocha --opts test/mocha.custom.opts", - "test:package": "mocha test/package --exit", - "test:unit": "mocha test/unit --exit" - }, - "version": "0.0.45" -} + "contributors": [ + { + "name": "ta2k", + "email": "tombox2020@gmail.com" + }, + { + "name": "Sneak-L8", + "email": "git@sengler.de" + } + ], + "bugs": { + "url": "https://github.com/ta2k/ioBroker.vw-connect/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@iobroker/adapter-core": "^2.4.0", + "@peculiar/webcrypto": "^1.1.6", + "request": "^2.88.2", + "traverse": "^0.6.6", + "uuid": "^8.3.2", + "ngeohash": "^0.6.3" + }, + "deprecated": false, + "description": "Adapter for VW Connect", + "devDependencies": { + "@iobroker/testing": "^2.4.2", + "@types/chai": "^4.2.15", + "@types/chai-as-promised": "^7.1.3", + "@types/gulp": "^4.0.8", + "@types/mocha": "^9.0.0", + "@types/node": "^16.0.0", + "@types/proxyquire": "^1.3.28", + "@types/sinon": "^10.0.0", + "@types/sinon-chai": "^3.2.5", + "chai": "^4.3.0", + "chai-as-promised": "^7.1.1", + "eslint": "^7.21.0", + "gulp": "^4.0.2", + "mocha": "^9.0.1", + "proxyquire": "^2.1.3", + "sinon": "^11.1.0", + "sinon-chai": "^3.5.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "homepage": "https://github.com/ta2k/ioBroker.vw-connect", + "keywords": [ + "VW", + "Connect", + "Audi", + "myAudi", + "Skoda", + "Skoda Connect", + "VW Connect", + "VW Connect Go" + ], + "license": "MIT", + "main": "main.js", + "name": "iobroker.vw-connect", + "repository": { + "type": "git", + "url": "git+https://github.com/TA2k/ioBroker.vw-connect.git" + }, + "scripts": { + "lint": "eslint", + "test": "npm run test:js && npm run test:package", + "test:integration": "mocha test/integration --exit", + "test:js": "mocha --opts test/mocha.custom.opts", + "test:package": "mocha test/package --exit", + "test:unit": "mocha test/unit --exit" + }, + "version": "0.0.47" +} \ No newline at end of file From 3b3cd31dadb3136481da61a11904dda34ddfcddf Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 27 Jan 2022 11:07:09 +0100 Subject: [PATCH 375/729] remove news --- io-package.json | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/io-package.json b/io-package.json index 0605863d..a145ee32 100644 --- a/io-package.json +++ b/io-package.json @@ -47,24 +47,6 @@ }, "0.0.29": { "en": "fix skoda refreshToken, smaller improvements" - }, - "0.0.26": { - "en": "bugfixes" - }, - "0.0.25": { - "en": "add we charge" - }, - "0.0.24": { - "en": "add remote state update" - }, - "0.0.23": { - "en": "add Seat and new climatisation v2" - }, - "0.0.22": { - "en": "calculate outside temperatur in °C also for Skoda and Audi" - }, - "0.0.21": { - "en": "add remotes for id" } }, "title": "VW Connect", From 604cdc1aacee0d13f189829aed985f35281f2016 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Jan 2022 20:15:22 +0100 Subject: [PATCH 376/729] fix login --- admin/index_m.html | 17 ++++++++++++++--- io-package.json | 1 + main.js | 33 ++++++++++++++++++++++----------- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 1d656e62..d0de5dc4 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -116,11 +116,20 @@ >
+
+
+ + +
+
- - + Auswahl der abzurufenden Fahrdaten (Trips)
@@ -131,7 +140,9 @@ - +
diff --git a/io-package.json b/io-package.json index a145ee32..b9274b81 100644 --- a/io-package.json +++ b/io-package.json @@ -130,6 +130,7 @@ "identifier": "", "interval": 15, "forceinterval": 360, + "historyLimit": 100, "type": "vw", "reversePos": false, "rights": false, diff --git a/main.js b/main.js index aa09c29b..eaaef313 100644 --- a/main.js +++ b/main.js @@ -505,10 +505,21 @@ class VwWeconnect extends utils.Adapter { return; } try { - if (body.indexOf("credentialsForm") !== -1) { - this.log.debug("credentialsForm"); - form = this.extractHidden(body); - form["password"] = this.config.password; + if (body.indexOf("emailPasswordForm") !== -1) { + this.log.debug("emailPasswordForm2"); + + /* + const stringJson =body.split("window._IDK = ")[1].split(";")[0].replace(/\n/g, "") + const json =stringJson.replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ').replace(/'/g, '"') + const jsonObj = JSON.parse(json); + */ + form = { + _csrf: body.split("csrf_token: '")[1].split("'")[0], + email: this.config.user, + password: this.config.password, + hmac: body.split('"hmac":"')[1].split('"')[0], + relayState: body.split('"relayState":"')[1].split('"')[0], + }; } else { this.log.error("No Login Form found. Please check your E-Mail in the app."); this.log.debug(JSON.stringify(body)); @@ -953,7 +964,7 @@ class VwWeconnect extends utils.Adapter { this.config.wc_access_token = tokens.wc_access_token; this.config.wc_refresh_token = tokens.refresh_token; this.log.debug("Wallcharging login successfull"); - this.getWcData(100); + this.getWcData(this.config.historyLimit); resolve(); return; } @@ -1493,7 +1504,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - + this.setObjectNotExists(vin + ".remote.climatisation", { type: "state", common: { @@ -2201,7 +2212,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); }); }); - this.genericRequest("https://api.elli.eco/customer/v1/charging/records?limit=100&offset=0", header, path + ".records", [404]).catch((hideError, err) => { + this.genericRequest("https://api.elli.eco/customer/v1/charging/records?limit=" + this.config.historyLimit + "&offset=0", header, path + ".records", [404]).catch((hideError, err) => { if (hideError) { return; } @@ -2219,7 +2230,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to get sessions"); }); this.genericRequest( - "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=100&offset=0", + "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", header, path + ".stations." + station.name + ".chargingrecords", [404] @@ -2231,7 +2242,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to get sessions"); }); this.genericRequest( - "https://api.elli.eco/chargeathome/v1/chargingrecords/total-charged?station_id=" + station.id + "&limit=100&offset=0", + "https://api.elli.eco/chargeathome/v1/chargingrecords/total-charged?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", header, path + ".stations." + station.name + ".chargingrecords.total-charged", [404] @@ -2794,7 +2805,7 @@ class VwWeconnect extends utils.Adapter { url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; } - this.log.debug("Request update " +url) + this.log.debug("Request update " + url); request( { method: method, @@ -2827,7 +2838,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); resolve(); } catch (err) { - this.log.error("Request update failed: " + url) + this.log.error("Request update failed: " + url); this.log.error(vin); this.log.error(err); reject(); From 70864e484df2ccf3e7e13c0b79798af7e50ee7ae Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Jan 2022 20:16:28 +0100 Subject: [PATCH 377/729] 0.0.48 --- README.md | 5 +++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47658dd3..da89d8a7 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,11 @@ Door and window states: ## Changelog +### 0.0.48 + +- fix login, fix audi update, add limit for wallbox + + ### 0.0.43 - increase refresh token timeouts diff --git a/io-package.json b/io-package.json index b9274b81..cce12220 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.47", + "version": "0.0.48", "news": { + "0.0.48": { + "en": "fix login, fix audi update, add limit for wallbox" + }, "0.0.47": { "en": "add audi standheizung" }, diff --git a/package.json b/package.json index b9857b83..0e6495e9 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.47" + "version": "0.0.48" } \ No newline at end of file From 1a4d5f604b92747f2042fdeef4c19c943608ab7d Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 11 Feb 2022 19:44:31 +0100 Subject: [PATCH 378/729] fix index for charging records --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index eaaef313..0271405e 100644 --- a/main.js +++ b/main.js @@ -2485,7 +2485,7 @@ class VwWeconnect extends utils.Adapter { } let preferedArrayName = null; let forceIndex = null; - if (path.indexOf("chargingsessions") !== -1 || path.indexOf("sessions") !== -1) { + if (path.indexOf("chargingsessions") !== -1 || path.indexOf("chargingrecords") !== -1 || path.indexOf("sessions") !== -1) { forceIndex = true; } this.extractKeys(this, path, body, preferedArrayName, forceIndex); From 2535e3a80fe533a2b6e6ff8f67c46a23ba1a7d82 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 13 Feb 2022 19:23:24 +0100 Subject: [PATCH 379/729] add -1 limit check --- admin/index_m.html | 2 +- main.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index d0de5dc4..94d3215e 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -119,7 +119,7 @@
- +
diff --git a/main.js b/main.js index 0271405e..05a88f40 100644 --- a/main.js +++ b/main.js @@ -233,7 +233,7 @@ class VwWeconnect extends utils.Adapter { this.xappversion = ""; this.xappname = ""; } - if (this.config.interval === 0) { + if (!this.config.interval || this.config.interval < 0.5) { this.log.info("Interval of 0 is not allowed reset to 1"); this.config.interval = 1; } @@ -733,7 +733,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get id status Failed"); this.refreshIDToken().catch(() => {}); }); - this.getWcData(); + this.getWcData(this.config.historyLimit); }); return; } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { @@ -2267,6 +2267,10 @@ class VwWeconnect extends utils.Adapter { } getWcData(limit) { + if (limit === -1) { + this.log.debug("We Charge disabled in config"); + return; + } if (!limit) { limit = 25; } From fc58f81ee711733c1a7be26494e6f5b30ba38cfa Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 13 Feb 2022 19:24:40 +0100 Subject: [PATCH 380/729] remove depend --- .github/auto-merge.yml | 17 ----------------- .github/dependabot.yml | 12 ------------ 2 files changed, 29 deletions(-) delete mode 100644 .github/auto-merge.yml delete mode 100644 .github/dependabot.yml diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml deleted file mode 100644 index 4f6d185f..00000000 --- a/.github/auto-merge.yml +++ /dev/null @@ -1,17 +0,0 @@ -# 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 diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 4a5b6fee..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: monthly - time: "04:00" - timezone: Europe/Berlin - open-pull-requests-limit: 20 - assignees: - - TA2k - versioning-strategy: increase From ac424162a9d1012f98301cebcf9fdc86e167e529 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 14 Mar 2022 16:38:49 +0100 Subject: [PATCH 381/729] add etron --- admin/index_m.html | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/index_m.html b/admin/index_m.html index 94d3215e..da4e0145 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -87,6 +87,7 @@ + From 24cce87e495fb971ba84d1ec2ce4ec0bff7568a3 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 14 Mar 2022 16:39:51 +0100 Subject: [PATCH 382/729] add audi etron --- main.js | 259 +++++++++++++++++++++++++++++++++++++++++++++++++-- package.json | 7 +- 2 files changed, 253 insertions(+), 13 deletions(-) diff --git a/main.js b/main.js index 05a88f40..6233dbc2 100644 --- a/main.js +++ b/main.js @@ -10,6 +10,7 @@ const utils = require("@iobroker/adapter-core"); const request = require("request"); +const qs = require("qs"); const crypto = require("crypto"); const { Crypto } = require("@peculiar/webcrypto"); const { v4: uuidv4 } = require("uuid"); @@ -189,6 +190,16 @@ class VwWeconnect extends utils.Adapter { this.xappversion = "3.22.0"; this.xappname = "myAudi"; } + if (this.config.type === "audietron") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "f4d0934f-32bf-4ce4-b3c4-699a7049ad26@apps_vw-dilab_com"; + this.scope = "address badge birthdate birthplace email gallery mbb name nationalIdentifier nationality nickname phone picture profession profile vin openid"; + this.redirect = "myaudi:///"; + this.responseType = "code"; + this.xappversion = "3.22.0"; + this.xappname = "myAudi"; + } if (this.config.type === "audidata") { this.type = "Audi"; this.country = "DE"; @@ -267,7 +278,7 @@ class VwWeconnect extends utils.Adapter { .then(() => { if (this.config.type !== "go") { this.vinArray.forEach((vin) => { - if (this.config.type === "id") { + if (this.config.type === "id" || this.config.type === "audietron") { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); }); @@ -341,7 +352,7 @@ class VwWeconnect extends utils.Adapter { this.updateStatus(); }, this.config.interval * 60 * 1000); - if (this.config.type !== "id" && this.config.type !== "skodae") { + if (this.config.type !== "id" && this.config.type !== "skodae" && this.config.type !== "audietron") { if (this.config.forceinterval > 0) { this.fupdateInterval = setInterval(() => { if (this.config.type === "go") { @@ -407,7 +418,8 @@ class VwWeconnect extends utils.Adapter { this.config.type === "go" || this.config.type === "seatelli" || this.config.type === "skodapower" || - this.config.type === "audidata" + this.config.type === "audidata" || + this.config.type === "audietron" ) { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } @@ -727,13 +739,15 @@ class VwWeconnect extends utils.Adapter { this.log.error("get audi data status Failed"); }); }); - } else if (this.config.type === "id") { + } else if (this.config.type === "id" || this.config.type === "audietron") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); this.refreshIDToken().catch(() => {}); }); - this.getWcData(this.config.historyLimit); + if (this.config.type === "id") { + this.getWcData(); + } }); return; } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { @@ -799,7 +813,135 @@ class VwWeconnect extends utils.Adapter { .replace("/$country/", "/" + this.country + "/") .replace("/$tripType", "/" + tripType); } + getQmauth() { + const timestamp = parseInt(Date.now() / 100000); + this.log.debug(timestamp.toString()); + //credits to https://github.com/arjenvrh/audi_connect_ha/blob/master/custom_components/audiconnect/audi_services.py + const xqmauth_secret = Buffer.from([ + 55, + 24, + 256 - 56, + 256 - 96, + 256 - 72, + 256 - 110, + 57, + 256 - 87, + 3, + 256 - 86, + 256 - 41, + 256 - 103, + 33, + 256 - 30, + 99, + 103, + 81, + 125, + 256 - 39, + 256 - 39, + 71, + 18, + 256 - 107, + 256 - 112, + 256 - 120, + 256 - 12, + 256 - 104, + 89, + 103, + 113, + 256 - 128, + 256 - 91, + ]); + const xqmauth_val = crypto.createHmac("sha256", xqmauth_secret).update(timestamp.toString()).digest("hex"); + + return "v1:55f755b0:" + xqmauth_val; + } + getTokensv2(getRequest, code_verifier, reject, resolve) { + const url = getRequest.uri.query; + const queries = qs.parse(url); + const body = { + client_id: this.clientId, + grant_type: "authorization_code", + code: queries.code, + redirect_uri: "myaudi:///", + response_type: "token id_token", + code_verifier: code_verifier, + }; + const qmAuth = this.getQmauth(); + this.log.debug(qmAuth); + + request( + { + method: "POST", + url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", + headers: { + accept: "application/json", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + "accept-charset": "utf-8", + "x-qmauth": qmAuth, + "accept-language": "de-de", + "user-agent": this.userAgent, + }, + jar: this.jar, + gzip: true, + followAllRedirects: false, + body: qs.stringify(body), + }, + (err, resp) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + const idktokens = JSON.parse(resp.body); + this.config.atoken = idktokens.access_token; + this.config.rtoken = idktokens.refresh_token; + request( + { + method: "POST", + url: "https://aazsproxy-service.apps.emea.vwapps.io/token", + headers: { + accept: "application/json", + "content-type": "application/json; charset=utf-8", + "accept-charset": "utf-8", + "x-app-version": "4.6.0", + "x-app-name": "myAudi", + "accept-language": "de-de", + "user-agent": this.userAgent, + }, + jar: this.jar, + gzip: true, + followAllRedirects: false, + body: JSON.stringify({ + token: this.config.atoken, + grant_type: "id_token", + stage: "live", + config: "myaudi", + }), + }, + (err, resp) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.aaztoken = JSON.parse(resp.body); + + resolve(); + } + ); + } + ); + } getTokens(getRequest, code_verifier, reject, resolve) { + if ((this.type = "audietron")) { + this.getTokensv2(getRequest, code_verifier, reject, resolve); + return; + } + let hash = ""; if (getRequest.uri.hash) { hash = getRequest.uri.hash; @@ -1015,6 +1157,7 @@ class VwWeconnect extends utils.Adapter { this.config.type === "skodae" || this.config.type === "seatelli" || this.config.type === "skodapower" || + this.config.type === "audietron" || this.config.type === "audidata" ) { resolve(); @@ -1207,6 +1350,7 @@ class VwWeconnect extends utils.Adapter { this.config.type === "audi" || this.config.type === "go" || this.config.type === "audidata" || + this.config.type === "audietron" || this.config.type === "id" || this.config.type === "seatelli" || this.config.type === "skodapower" @@ -1385,6 +1529,8 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } + let method = "get"; + let body = ""; let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); let headers = { "User-Agent": this.userAgent, @@ -1417,6 +1563,22 @@ class VwWeconnect extends utils.Adapter { accept: "application/json;charset=UTF-8", }; } + if (this.config.type === "audietron") { + method = "post"; + url = "https://app-api.live-my.audi.com/vgql/v1/graphql"; + // @ts-ignore + headers = { + "user-agent": this.userAgent, + authorization: "Bearer " + this.aaztoken.access_token, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": this.userAgent, + accept: "application/json;charset=UTF-8", + }; + body = { + query: "query vehicleList {\n userVehicles {\n vin\n mappingVin\n csid\n commissionNumber\n type\n devicePlatform\n mbbConnect\n userRole {\n role\n }\n vehicle {\n classification {\n driveTrain\n }\n }\n nickname\n }\n}", + }; + } if (this.config.type === "id") { url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; // @ts-ignore @@ -1441,13 +1603,15 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, }; } - request.get( + request( { + method: method, url: url, headers: headers, followAllRedirects: true, gzip: true, json: true, + body: body, }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { @@ -1455,8 +1619,10 @@ class VwWeconnect extends utils.Adapter { this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); + body && this.log.error(JSON.stringify(body)); resp && this.log.error(resp.statusCode.toString()); reject(); + return; } try { if (body.errorCode) { @@ -1662,6 +1828,79 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } + + if (this.config.type === "audietron") { + if (body.errors) { + this.log.error(JSON.stringify(body.errors)); + reject(); + return; + } + body.data.userVehicles.forEach(async (element) => { + const vin = element.vin; + this.vinArray.push(vin); + await this.setObjectNotExistsAsync(element.vin, { + type: "device", + common: { + name: element.nickname, + role: "indicator", + type: "string", + write: false, + read: true, + }, + native: {}, + }); + + this.extractKeys(this, element.vin + ".general", element).catch((error) => { + this.log.error("Failed to extract"); + this.log.error(error); + }); + + this.setObjectNotExists(element.vin, { + type: "device", + common: { + name: element.nickname, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.extractKeys(this, vin + ".general", element); + + this.setObjectNotExists(vin + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.charging", { + type: "state", + common: { + name: "Start/Stop Battery Charge", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + + this.setObjectNotExists(vin + ".remote.climatisation", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + }); + resolve(); + return; + } if (!body.userVehicles) { this.log.info("No Vehicles found"); resolve(); @@ -3686,7 +3925,7 @@ class VwWeconnect extends utils.Adapter { return; } if (id.indexOf("Settings.") != -1) { - if (this.config.type === "id") { + if (this.config.type === "id" || this.config.type === "audietron") { const action = id.split(".")[5]; const settingsPath = id.split(".")[4]; const pre = this.name + "." + this.instance; @@ -3785,7 +4024,7 @@ class VwWeconnect extends utils.Adapter { }); } if (action === "charging") { - if (this.config.type === "id") { + if (this.config.type === "id" || this.config.type === "audietron") { const value = state.val ? "start" : "stop"; this.setIdRemote(vin, action, value).catch(() => { this.log.error("failed set state " + action); @@ -3815,7 +4054,7 @@ class VwWeconnect extends utils.Adapter { } } if (action === "climatisation" || action === "climatisationv2" || action === "climatisationv3") { - if (this.config.type === "id") { + if (this.config.type === "id" || this.config.type === "audietron") { const value = state.val ? "start" : "stop"; this.setIdRemote(vin, action, value).catch(() => { this.log.error("failed set state " + action); @@ -4093,7 +4332,7 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.climatisation", value, true); } if (id.indexOf("chargingStatus.chargingState") !== -1) { - if (this.config.type === "id") { + if (this.config.type === "id" || this.config.type === "audietron") { this.setState(vin + ".remote.charging", state.val !== "readyForCharging" ? true : false, true); } else { this.setState(vin + ".remote.batterycharge", state.val !== "readyForCharging" ? true : false, true); diff --git a/package.json b/package.json index 0e6495e9..ac6ac8c0 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,11 @@ "dependencies": { "@iobroker/adapter-core": "^2.4.0", "@peculiar/webcrypto": "^1.1.6", + "ngeohash": "^0.6.3", + "qs": "^6.10.3", "request": "^2.88.2", "traverse": "^0.6.6", - "uuid": "^8.3.2", - "ngeohash": "^0.6.3" + "uuid": "^8.3.2" }, "deprecated": false, "description": "Adapter for VW Connect", @@ -76,4 +77,4 @@ "test:unit": "mocha test/unit --exit" }, "version": "0.0.48" -} \ No newline at end of file +} From 706d6bef78aa6f70e0a6a5b0d718cb6d9a2f18c9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 14 Mar 2022 21:27:02 +0100 Subject: [PATCH 383/729] add new refreshtoken --- main.js | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 6233dbc2..ac92bd3e 100644 --- a/main.js +++ b/main.js @@ -739,7 +739,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get audi data status Failed"); }); }); - } else if (this.config.type === "id" || this.config.type === "audietron") { + } else if (this.config.type === "id") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); @@ -750,6 +750,14 @@ class VwWeconnect extends utils.Adapter { } }); return; + } else if (this.config.type === "audietron") { + this.vinArray.forEach((vin) => { + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + this.refreshTokenv2().catch(() => {}); + }); + }); + return; } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { this.getElliData(this.config.type).catch(() => { this.log.error("get elli Failed"); @@ -2811,6 +2819,59 @@ class VwWeconnect extends utils.Adapter { ); }); } + refreshTokenv2() { + return new Promise((resolve, reject) => { + this.log.debug("Token Refresh started"); + request.get( + { + method: "POST", + url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", + headers: { + accept: "application/json", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + "accept-charset": "utf-8", + "x-qmauth": this.getQmauth(), + "accept-language": "de-de", + "user-agent": this.userAgent, + }, + followAllRedirects: true, + gzip: true, + json: true, + body: JSON.stringify({ + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: this.config.rtoken, + response_type: "token id_token", + }), + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.log.error("Failed refresh token. restart adapter in 10min"); + setTimeout(() => { + this.log.error("restart adapter"); + this.restart(); + }, 10 * 60 * 1000); + reject(); + return; + } + try { + this.log.debug("Token Refresh successful"); + this.config.atoken = body.access_token; + this.config.rtoken = body.refresh_token; + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + refreshIDToken() { return new Promise((resolve, reject) => { this.log.debug("Token Refresh started"); From 1ef59c2c604ebea0cc0a7e963c3394b7dc026e0e Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 15 Mar 2022 20:31:03 +0100 Subject: [PATCH 384/729] fix refreshtoken --- main.js | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/main.js b/main.js index ac92bd3e..1427f8e8 100644 --- a/main.js +++ b/main.js @@ -891,7 +891,7 @@ class VwWeconnect extends utils.Adapter { }, jar: this.jar, gzip: true, - followAllRedirects: false, + followAllRedirects: true, body: qs.stringify(body), }, (err, resp) => { @@ -937,6 +937,10 @@ class VwWeconnect extends utils.Adapter { return; } this.aaztoken = JSON.parse(resp.body); + this.refreshTokenInterval && clearInterval(this.refreshTokenInterval); + this.refreshTokenInterval = setInterval(() => { + this.refreshTokenv2().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours resolve(); } @@ -945,7 +949,7 @@ class VwWeconnect extends utils.Adapter { ); } getTokens(getRequest, code_verifier, reject, resolve) { - if ((this.type = "audietron")) { + if (this.config.type === "audietron") { this.getTokensv2(getRequest, code_verifier, reject, resolve); return; } @@ -2797,7 +2801,11 @@ class VwWeconnect extends utils.Adapter { err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - this.refreshIDToken().catch(() => {}); + if (this.config.type === "audietron") { + this.refreshTokenv2().catch(() => {}); + } else { + this.refreshIDToken().catch(() => {}); + } this.log.error("Refresh Token"); reject(); return; @@ -2822,27 +2830,29 @@ class VwWeconnect extends utils.Adapter { refreshTokenv2() { return new Promise((resolve, reject) => { this.log.debug("Token Refresh started"); + const body = { + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: this.config.rtoken, + response_type: "token id_token", + }; + const headers = { + accept: "application/json", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + "accept-charset": "utf-8", + "x-qmauth": this.getQmauth(), + "accept-language": "de-de", + "user-agent": "myAudi-Android/4.6.0 (Build 800236847.2111261819) Android/11", + }; request.get( { method: "POST", url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", - headers: { - accept: "application/json", - "content-type": "application/x-www-form-urlencoded; charset=utf-8", - "accept-charset": "utf-8", - "x-qmauth": this.getQmauth(), - "accept-language": "de-de", - "user-agent": this.userAgent, - }, + headers: headers, followAllRedirects: true, gzip: true, json: true, - body: JSON.stringify({ - client_id: this.clientId, - grant_type: "refresh_token", - refresh_token: this.config.rtoken, - response_type: "token id_token", - }), + body: qs.stringify(body), }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { From 2ce8d0ae611bc219caabd9ca2b11eb2d5de47b60 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 17 Mar 2022 13:39:23 +0100 Subject: [PATCH 385/729] fix refresh --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 1427f8e8..c8622e9d 100644 --- a/main.js +++ b/main.js @@ -570,7 +570,7 @@ class VwWeconnect extends utils.Adapter { if (resp.headers.location.split("&").length <= 2 || resp.headers.location.indexOf("/terms-and-conditions?") !== -1) { this.log.warn(resp.headers.location); - this.log.warn("No valid userid, please visit this link or logout and login in your app account:"); + this.log.warn("No valid userid, please check username and password or visit this link or logout and login in your app account:"); this.log.warn("https://" + resp.request.host + resp.headers.location); this.log.warn("Try to auto accept new consent"); @@ -860,7 +860,7 @@ class VwWeconnect extends utils.Adapter { 256 - 91, ]); const xqmauth_val = crypto.createHmac("sha256", xqmauth_secret).update(timestamp.toString()).digest("hex"); - + this.log.debug(timestamp.toString()); return "v1:55f755b0:" + xqmauth_val; } getTokensv2(getRequest, code_verifier, reject, resolve) { @@ -2844,7 +2844,7 @@ class VwWeconnect extends utils.Adapter { "accept-language": "de-de", "user-agent": "myAudi-Android/4.6.0 (Build 800236847.2111261819) Android/11", }; - request.get( + request( { method: "POST", url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", From 6c85d4c5f33528077c37191d60fec5d11325ca6e Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 19 Mar 2022 12:52:51 +0100 Subject: [PATCH 386/729] fix log statement --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index c8622e9d..6956b677 100644 --- a/main.js +++ b/main.js @@ -1750,7 +1750,7 @@ class VwWeconnect extends utils.Adapter { adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); }) .catch((error) => { - this.log.error(error); + adapter.log.error(error); }); } }); From 555f7462a16f0d363f734d5262860a099d958218 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 21 Mar 2022 22:24:46 +0100 Subject: [PATCH 387/729] add start stop via wallbox --- lib/extractKeys.js | 25 ++++++++++++++ main.js | 83 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 5360bf71..82b382fc 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -56,6 +56,31 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex } else if (element[key] !== null && typeof element[key] === "object") { extractKeys(adapter, path + "." + key, element[key], preferedArrayName, forceIndex); } else { + if (path.indexOf("stations.") > -1 && path.indexOf("sessions.") > -1 && key === "id") { + adapter.setObjectNotExistsAsync(path + ".stopCharging", { + type: "state", + common: { + name: "Stoppe Ladung", + type: "boolean", + role: "boolean", + write: true, + }, + native: { id: element[key] }, + }); + } + if (path.indexOf("stations.") > -1 && path.split(".").length === 4 && key === "id") { + adapter.setObjectNotExistsAsync(path + ".startCharging", { + type: "state", + common: { + name: "Starte Ladung", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + } + adapter .setObjectNotExistsAsync(path + "." + key, { type: "state", diff --git a/main.js b/main.js index 6956b677..acbd8e61 100644 --- a/main.js +++ b/main.js @@ -2740,9 +2740,10 @@ class VwWeconnect extends utils.Adapter { } let preferedArrayName = null; let forceIndex = null; - if (path.indexOf("chargingsessions") !== -1 || path.indexOf("chargingrecords") !== -1 || path.indexOf("sessions") !== -1) { + if (path.indexOf("chargingsessions") !== -1 || path.indexOf("chargingrecords") !== -1 || path.indexOf("records") !== -1 || path.indexOf("sessions") !== -1) { forceIndex = true; } + this.extractKeys(this, path, body, preferedArrayName, forceIndex); resolve(body); } catch (err) { @@ -3995,6 +3996,86 @@ class VwWeconnect extends utils.Adapter { this.requestStatusUpdate(vin); return; } + if (id.indexOf("startCharging") !== -1) { + const stationID = (await this.getObjectAsync(id)).native.id; + request( + { + method: "POST", + url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/start", + headers: { + Host: "wecharge.apps.emea.vwapps.io", + accept: "application/json", + wc_access_token: this.config.wc_access_token, + authorization: "Bearer " + this.config.atoken, + "user-agent": this.userAgent, + "content-type": "application/json", + origin: "https://web-home-mobile.apps.emea.vwapps.io", + "x-requested-with": "com.volkswagen.weconnect", + "sec-fetch-site": "same-site", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "empty", + referer: "https://web-home-mobile.apps.emea.vwapps.io/", + "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", + }, + gzip: true, + json: true, + body: { + station_id: stationID, + }, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to start Charging"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + + return; + } + body && this.log.info(JSON.stringify(body)); + } + ); + } + if (id.indexOf("stopCharging") !== -1) { + const idArray = id.split("."); + idArray.pop(); + idArray.push("id"); + const sessionId = (await this.getStateAsync(idArray.join("."))).val; + request( + { + method: "POST", + url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/" + sessionId + "/stop", + headers: { + Host: "wecharge.apps.emea.vwapps.io", + accept: "application/json", + wc_access_token: this.config.wc_access_token, + authorization: "Bearer " + this.config.atoken, + "user-agent": this.userAgent, + "content-type": "application/json", + origin: "https://web-home-mobile.apps.emea.vwapps.io", + "x-requested-with": "com.volkswagen.weconnect", + "sec-fetch-site": "same-site", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "empty", + referer: "https://web-home-mobile.apps.emea.vwapps.io/", + "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", + }, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to stop Charging"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + + return; + } + body && this.log.info(JSON.stringify(body)); + } + ); + } if (id.indexOf("Settings.") != -1) { if (this.config.type === "id" || this.config.type === "audietron") { const action = id.split(".")[5]; From 36f2d3abf8e7cb1fbc507eb4bdf5a1f2df131076 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 21 Mar 2022 22:29:08 +0100 Subject: [PATCH 388/729] add refresh timeout --- main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.js b/main.js index acbd8e61..7cea55d7 100644 --- a/main.js +++ b/main.js @@ -3970,6 +3970,7 @@ class VwWeconnect extends utils.Adapter { clearInterval(this.updateInterval); clearInterval(this.fupdateInterval); clearTimeout(this.refreshTokenTimeout); + clearTimeout(this.refreshTimeout); callback(); } catch (e) { callback(); @@ -4463,6 +4464,11 @@ class VwWeconnect extends utils.Adapter { }); } } + + this.refreshTimeout && clearTimeout(this.refreshTimeout); + this.refreshTimeout = setTimeout(async () => { + this.updateStatus(); + }, 10 * 1000); } else { const vin = id.split(".")[2]; if (id.indexOf("climatisationState.content") !== -1) { From 2cea32633ad4951cfb82c0b1bd7556d90a95af8e Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 21 Mar 2022 23:07:49 +0100 Subject: [PATCH 389/729] add log --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 7cea55d7..38cdd5ec 100644 --- a/main.js +++ b/main.js @@ -3999,6 +3999,7 @@ class VwWeconnect extends utils.Adapter { } if (id.indexOf("startCharging") !== -1) { const stationID = (await this.getObjectAsync(id)).native.id; + this.log.info("Start charging for id: " + stationID); request( { method: "POST", From f4b7210d52102ef1d7abd28ecc799d21164e842e Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 21 Mar 2022 23:17:47 +0100 Subject: [PATCH 390/729] fix start charging --- lib/extractKeys.js | 2 +- main.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 82b382fc..025a0c3a 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -65,7 +65,7 @@ async function extractKeys(adapter, path, element, preferedArrayName, forceIndex role: "boolean", write: true, }, - native: { id: element[key] }, + native: {}, }); } if (path.indexOf("stations.") > -1 && path.split(".").length === 4 && key === "id") { diff --git a/main.js b/main.js index 38cdd5ec..090432bc 100644 --- a/main.js +++ b/main.js @@ -3998,7 +3998,10 @@ class VwWeconnect extends utils.Adapter { return; } if (id.indexOf("startCharging") !== -1) { - const stationID = (await this.getObjectAsync(id)).native.id; + const idArray = id.split("."); + idArray.pop(); + idArray.push("id"); + const stationID = (await this.getStateAsync(idArray.join("."))).val; this.log.info("Start charging for id: " + stationID); request( { From c60d3b297b9be84d37970c08599b0ce9d3efba03 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 23 Mar 2022 15:31:56 +0100 Subject: [PATCH 391/729] add catch --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index 090432bc..461297d6 100644 --- a/main.js +++ b/main.js @@ -486,6 +486,10 @@ class VwWeconnect extends utils.Adapter { form = this.extractHidden(body); form["email"] = this.config.user; } else { + if (this.type === "Wc") { + resolve(); + return; + } this.log.error("No Login Form found for type: " + this.type); this.log.debug(JSON.stringify(body)); reject(); From e4c74ed12dea00c4d0e805a3d1c6ff3e934de682 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 23 Mar 2022 19:38:08 +0100 Subject: [PATCH 392/729] change order --- admin/index_m.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/index_m.html b/admin/index_m.html index da4e0145..bd14ab9f 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -81,8 +81,8 @@
diff --git a/package.json b/package.json index 8f1cc68c..e0e460db 100644 --- a/package.json +++ b/package.json @@ -79,4 +79,4 @@ "test:unit": "mocha test/unit --exit" }, "version": "0.0.50" -} +} \ No newline at end of file From ddce490b3d798f07dcd8058a1daabcd1022fee7e Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 5 May 2022 20:36:36 +0200 Subject: [PATCH 401/729] add additional wc check --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b768a728..e379dbad 100644 --- a/main.js +++ b/main.js @@ -768,7 +768,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get id status Failed"); this.refreshIDToken().catch(() => {}); }); - if (this.config.type === "id") { + if (this.config.type === "id" && this.config.wc_access_token) { this.getWcData(); } }); From 7e8fafeda6e7f1cf5a2359bb9877ffc3abfa6819 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 6 May 2022 07:44:20 +0200 Subject: [PATCH 402/729] add additional wc checks --- main.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index e379dbad..cdadf805 100644 --- a/main.js +++ b/main.js @@ -769,7 +769,7 @@ class VwWeconnect extends utils.Adapter { this.refreshIDToken().catch(() => {}); }); if (this.config.type === "id" && this.config.wc_access_token) { - this.getWcData(); + this.getWcData(this.config.historyLimit); } }); return; @@ -1184,9 +1184,13 @@ class VwWeconnect extends utils.Adapter { this.responseType = "code id_token token"; this.xappversion = ""; this.xappname = ""; - this.login().catch(() => { - this.log.warn("Failled wall charger login"); - }); + this.login() + .then(() => { + this.log.info("Wallcharging login was successfull"); + }) + .catch(() => { + this.log.warn("Failled wall charger login"); + }); resolve(); return; } @@ -2819,7 +2823,7 @@ class VwWeconnect extends utils.Adapter { } getWcData(limit) { - if (limit === -1) { + if (limit == -1) { this.log.debug("We Charge disabled in config"); return; } From f4917d1ab56ee937f1a478f7ca2f4feef4a5a1b9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 14 Jun 2022 17:52:45 +0200 Subject: [PATCH 403/729] add logs --- main.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index cdadf805..3290b24b 100644 --- a/main.js +++ b/main.js @@ -269,7 +269,7 @@ class VwWeconnect extends utils.Adapter { } this.login() .then(() => { - this.log.debug("Login successful"); + this.log.info("Login successful"); this.setState("info.connection", true, true); this.setObjectNotExists("refresh", { type: "state", @@ -1159,7 +1159,7 @@ class VwWeconnect extends utils.Adapter { if (this.type === "Wc") { this.config.wc_access_token = tokens.wc_access_token; this.config.wc_refresh_token = tokens.refresh_token; - this.log.debug("Wallcharging login successfull"); + this.log.info("Wallcharging login successfull"); this.getWcData(this.config.historyLimit); resolve(); return; @@ -1172,7 +1172,14 @@ class VwWeconnect extends utils.Adapter { this.refreshTokenInterval = setInterval(() => { this.refreshIDToken().catch(() => {}); }, 0.9 * 60 * 60 * 1000); // 0.9hours - + this.log.info("ID login successfull"); + this.log.info(`History limit: ${this.config.historyLimit}, set to -1 to disable wallcharging login`); + if (this.config.historyLimit == -1) { + this.log.info("History limit is set to -1, no wall charging login"); + resolve(); + return; + } + this.log.info("Start Wallcharging login"); //this.config.type === "wc" this.type = "Wc"; this.country = "DE"; From 76b710286da749bb99e292e06e02b7a37ddc8a66 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 17 Jun 2022 11:20:44 +0200 Subject: [PATCH 404/729] updat audi etron key --- main.js | 64 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/main.js b/main.js index 3290b24b..8322bb80 100644 --- a/main.js +++ b/main.js @@ -857,42 +857,42 @@ class VwWeconnect extends utils.Adapter { this.log.debug(timestamp.toString()); //credits to https://github.com/arjenvrh/audi_connect_ha/blob/master/custom_components/audiconnect/audi_services.py const xqmauth_secret = Buffer.from([ + 256 - 28, + 120, + 102, 55, - 24, - 256 - 56, - 256 - 96, - 256 - 72, - 256 - 110, - 57, - 256 - 87, - 3, - 256 - 86, - 256 - 41, - 256 - 103, - 33, - 256 - 30, - 99, - 103, - 81, - 125, - 256 - 39, - 256 - 39, - 71, - 18, - 256 - 107, - 256 - 112, - 256 - 120, - 256 - 12, - 256 - 104, - 89, - 103, + 256 - 114, + 256 - 16, + 101, + 256 - 116, + 256 - 25, + 93, 113, + 0, + 122, 256 - 128, - 256 - 91, + 256 - 97, + 52, + 97, + 107, + 256 - 106, + 53, + 256 - 30, + 256 - 20, + 34, + 256 - 126, + 69, + 120, + 76, + 31, + 99, + 256 - 24, + 256 - 115, + 6, ]); const xqmauth_val = crypto.createHmac("sha256", xqmauth_secret).update(timestamp.toString()).digest("hex"); this.log.debug(timestamp.toString()); - return "v1:55f755b0:" + xqmauth_val; + return "v1:c95f4fd2:" + xqmauth_val; } getTokensv2(getRequest, code_verifier, reject, resolve) { const url = getRequest.uri.query; @@ -927,9 +927,10 @@ class VwWeconnect extends utils.Adapter { }, (err, resp) => { if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed in get tokensv2 "); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); + resp && resp.body && this.log.error(JSON.stringify(resp.body)); reject(); return; } @@ -961,6 +962,7 @@ class VwWeconnect extends utils.Adapter { }, (err, resp) => { if (err || (resp && resp.statusCode >= 400)) { + this.log.error("failed get audi token"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); From bfae237315dddde422055c06b950dd063d8b2388 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 21 Jun 2022 21:37:41 +0200 Subject: [PATCH 405/729] fix rawjson --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 8322bb80..b3452fcf 100644 --- a/main.js +++ b/main.js @@ -2353,7 +2353,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }) .then(() => { - this.setState(vin + ".status" + "rawJson", body.data, true); + this.setState(vin + ".status" + "rawJson", JSON.stringify(body.data), true); }) .catch((error) => { this.log.error(error); @@ -2410,7 +2410,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }) .then(() => { - this.setState(vin + ".status" + "rawJson", body, true); + this.setState(vin + ".status" + "rawJson", JSON.stringify(body), true); }) .catch((error) => { this.log.error(error); @@ -3046,7 +3046,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }) .then(() => { - this.setState(path + "rawJson", body, true); + this.setState(path + "rawJson", JSON.stringify(body), true); }) .catch((error) => { this.log.error(error); From cb919b118d2277167ab784ae13c00f98bbc15463 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 22 Jun 2022 14:58:19 +0200 Subject: [PATCH 406/729] update packages --- .github/workflows/dependabot-auto-merge.yml | 22 - .github/workflows/test-and-release.yml | 148 +- main.js | 2 +- package-lock.json | 7739 ++++++++++++------- package.json | 22 +- 5 files changed, 4873 insertions(+), 3060 deletions(-) delete mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml deleted file mode 100644 index 4ec6b532..00000000 --- a/.github/workflows/dependabot-auto-merge.yml +++ /dev/null @@ -1,22 +0,0 @@ -# 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 diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 37946cbe..be37db46 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -5,7 +5,7 @@ name: Test and Release on: push: branches: - - "master" + - "*" tags: # normal versions - "v[0-9]+.[0-9]+.[0-9]+" @@ -20,63 +20,135 @@ jobs: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x] + steps: - - uses: ioBroker/testing-action-check@v1 + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 with: - node-version: "14.x" - # Uncomment the following line if your adapter cannot be installed using 'npm ci' - # install-command: 'npm install' - lint: true + node-version: ${{ matrix.node-version }} + + - name: Install Dependencies + run: npm ci + + - name: Lint source code + run: npm run lint + - name: Test package files + run: npm run test:package # Runs adapter tests on all supported node versions and OSes adapter-tests: if: contains(github.event.head_commit.message, '[skip ci]') == false + needs: [check-and-lint] + runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [18.x, 14.x, 16.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: ioBroker/testing-action-adapter@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 }} - os: ${{ matrix.os }} - # Uncomment the following line if your adapter cannot be installed using 'npm ci' - # install-command: 'npm install' + + - name: Install Dependencies + run: npm ci + + - name: Run unit tests + run: npm run test:unit + + - name: Run integration tests (unix only) + if: startsWith(runner.OS, 'windows') == false + run: DEBUG=testing:* npm run test:integration + + - name: Run integration tests (windows only) + if: startsWith(runner.OS, 'windows') + run: set DEBUG=testing:* & npm run test:integration # TODO: To enable automatic npm releases, create a token on npmjs.org # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options # Then uncomment the following block: -# # Deploys the final package to NPM -# deploy: -# needs: [check-and-lint, adapter-tests] +# # Deploys the final package to NPM +# deploy: +# needs: [adapter-tests] +# +# # Trigger this step only when a commit on any branch is tagged with a version number +# if: | +# contains(github.event.head_commit.message, '[skip ci]') == false && +# github.event_name == 'push' && +# startsWith(github.ref, 'refs/tags/v') +# +# runs-on: ubuntu-latest +# strategy: +# matrix: +# node-version: [14.x] +# +# steps: +# - 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 }} # -# # Trigger this step only when a commit on any branch is tagged with a version number -# if: | -# contains(github.event.head_commit.message, '[skip ci]') == false && -# github.event_name == 'push' && -# startsWith(github.ref, 'refs/tags/v') +# - name: Extract the version and commit body from the tag +# id: extract_release +# # The body may be multiline, therefore newlines and % need to be escaped +# run: | +# VERSION="${{ github.ref }}" +# VERSION=${VERSION##*/v} +# 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-output name=BODY::$BODY" # -# runs-on: ubuntu-latest +# - name: Publish package to npm +# run: | +# npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} +# npm whoami +# npm publish # -# steps: -# - uses: ioBroker/testing-action-deploy@v1 -# with: -# node-version: '14.x' -# # Uncomment the following line if your adapter cannot be installed using 'npm ci' -# # install-command: 'npm install' -# npm-token: ${{ secrets.NPM_TOKEN }} -# github-token: ${{ secrets.GITHUB_TOKEN }} +# - name: Create Github Release +# uses: actions/create-release@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# tag_name: ${{ github.ref }} +# release_name: Release v${{ steps.extract_release.outputs.VERSION }} +# draft: false +# # Prerelease versions create prereleases on Github +# prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} +# body: ${{ steps.extract_release.outputs.BODY }} # -# # When using Sentry for error reporting, Sentry can be informed about new releases -# # To enable create a API-Token in Sentry (User settings, API keys) -# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options -# # Then uncomment and customize the following block: -# sentry: true -# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }} -# sentry-project: "iobroker-device-watcher" -# sentry-version-prefix: "iobroker.device-watcher" -# # If your sentry project is linked to a GitHub repository, you can enable the following option -# # sentry-github-integration: true +# # When using Sentry for error reporting, Sentry could be informed about new releases +# # To enable create a API-Token in Sentry (User settings, API keys) +# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options +# # Then uncomment and customize the following block: +# #- name: Notify Sentry.io about the release +# # run: | +# # npm i -g @sentry/cli +# # export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} +# # export SENTRY_URL=https://sentry.iobroker.net +# # export SENTRY_ORG=iobroker +# # export SENTRY_PROJECT=iobroker-vw-connect +# # export SENTRY_VERSION=iobroker.vw-connect@${{ steps.extract_release.outputs.VERSION }} +# # sentry-cli releases new $SENTRY_VERSION +# # sentry-cli releases finalize $SENTRY_VERSION +# # # Add the following line BEFORE finalize if repositories are connected in Sentry +# # #sentry-cli releases set-commits $SENTRY_VERSION --auto +# # # Add the following line BEFORE finalize if sourcemap uploads are needed +# # #sentry-cli releases files $SENTRY_VERSION upload-sourcemaps build/ diff --git a/main.js b/main.js index b3452fcf..a18364f5 100644 --- a/main.js +++ b/main.js @@ -3811,7 +3811,7 @@ class VwWeconnect extends utils.Adapter { adapter.setState(newPath, value, true); }) .catch((error) => { - this.log.error(error); + adapter.log.error(error); }); //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { // setOutsideTemperature(vin, value); diff --git a/package-lock.json b/package-lock.json index 6ad35efc..080d0839 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,3003 +1,4768 @@ { - "name": "iobroker.vw-connect", - "version": "0.0.50", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@alcalzone/release-script": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.2.2.tgz", - "integrity": "sha512-H9cMij4uxgbnMsJFAOKrkxukt6/TOKEUv4u3n52HV9a5nxRXG2fccptJvufUeP3er2wl6ZKdW8EPJjWnhielxw==", - "dev": true, - "requires": { - "alcalzone-shared": "^4.0.0", - "axios": "^0.21.1", - "execa": "^5.1.1", - "fs-extra": "^10.0.0", - "picocolors": "1.0.0", - "semver": "^7.3.5", - "yargs": "^17.0.1" - }, - "dependencies": { - "yargs": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", - "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", - "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.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } + "name": "iobroker.vw-connect", + "version": "0.0.50", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "iobroker.vw-connect", + "version": "0.0.50", + "license": "MIT", + "dependencies": { + "@iobroker/adapter-core": "^2.6.0", + "@peculiar/webcrypto": "^1.4.0", + "ngeohash": "^0.6.3", + "qs": "^6.10.5", + "request": "^2.88.2", + "traverse": "^0.6.6", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@iobroker/testing": "^3.0.2", + "@types/chai": "^4.3.1", + "@types/chai-as-promised": "^7.1.5", + "@types/mocha": "^9.1.1", + "@types/node": "^18.0.0", + "@types/proxyquire": "^1.3.28", + "@types/sinon": "^10.0.11", + "@types/sinon-chai": "^3.2.8", + "chai": "^4.3.6", + "chai-as-promised": "^7.1.1", + "eslint": "^8.18.0", + "eslint-plugin-promise": "^6.0.0", + "mocha": "^10.0.0", + "proxyquire": "^2.1.3", + "sinon": "^14.0.0", + "sinon-chai": "^3.7.0", + "typescript": "~4.7.4" + }, + "engines": { + "node": ">=10.0.0" + } }, - "yargs-parser": { - "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 - } - } - }, - "@eslint/eslintrc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", - "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "minimatch": { - "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" - } - } - } - }, - "@google-cloud/common": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.10.0.tgz", - "integrity": "sha512-XMbJYMh/ZSaZnbnrrOFfR/oQrb0SxG4qh6hDisWCoEbFcBHV0qHQo4uXfeMCzolx2Mfkh6VDaOGg+hyJsmxrlw==", - "dev": true, - "requires": { - "@google-cloud/projectify": "^2.0.0", - "@google-cloud/promisify": "^2.0.0", - "arrify": "^2.0.1", - "duplexify": "^4.1.1", - "ent": "^2.2.0", - "extend": "^3.0.2", - "google-auth-library": "^7.14.0", - "retry-request": "^4.2.2", - "teeny-request": "^7.0.0" - }, - "dependencies": { - "duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dev": true, - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "@google-cloud/projectify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.1.1.tgz", - "integrity": "sha512-+rssMZHnlh0twl122gXY4/aCrk0G1acBqkHFfYddtsqpYXGxA29nj9V5V9SfC+GyOG00l650f6lG9KL+EpFEWQ==", - "dev": true - }, - "@google-cloud/promisify": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.4.tgz", - "integrity": "sha512-j8yRSSqswWi1QqUGKVEKOG03Q7qOoZP6/h2zN2YO+F5h2+DHU0bSrHCK9Y7lo2DI9fBd8qGAw795sf+3Jva4yA==", - "dev": true - }, - "@google-cloud/translate": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/@google-cloud/translate/-/translate-6.3.1.tgz", - "integrity": "sha512-x6/NxMzhUA2ottO0RmRT5u/nhd9Yssond5b3RpgAe1Klb4TCuYep2lh9LUzpnWuCYhBCjh2/9lNkjTWj9kXLQg==", - "dev": true, - "requires": { - "@google-cloud/common": "^3.0.0", - "@google-cloud/promisify": "^2.0.0", - "arrify": "^2.0.0", - "extend": "^3.0.2", - "google-gax": "^2.24.1", - "is-html": "^2.0.0", - "protobufjs": "^6.8.8" - } - }, - "@grpc/grpc-js": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.9.tgz", - "integrity": "sha512-un+cXqErq5P4p3+WgYVNVh7FB51MSnaoRef7QWDcMXKR6FX2R6Z/bltcJMxNNdTUMC85lkOQcpnAAetFziPSng==", - "dev": true, - "requires": { - "@grpc/proto-loader": "^0.6.4", - "@types/node": ">=12.12.47" - } - }, - "@grpc/proto-loader": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.9.tgz", - "integrity": "sha512-UlcCS8VbsU9d3XTXGiEVFonN7hXk+oMXZtoHHG2oSA1/GcDP1q6OUgs20PzHDGizzyi8ufGSUDlk3O2NyY7leg==", - "dev": true, - "requires": { - "@types/long": "^4.0.1", - "lodash.camelcase": "^4.3.0", - "long": "^4.0.0", - "protobufjs": "^6.10.0", - "yargs": "^16.2.0" - } - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "dependencies": { - "minimatch": { - "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" - } - } - } - }, - "@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 - }, - "@iobroker/adapter-core": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.0.tgz", - "integrity": "sha512-J5Cgy0NK8GWjN1th3yvWCG3tnK8iJJcPaHIoVR8PfpEsz4hffuVGi660vNXqXdiqR5Br09XSJ5h1Pn9af0/taw==", - "requires": { - "@types/iobroker": "^4.0.1" - } - }, - "@iobroker/adapter-dev": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-dev/-/adapter-dev-1.0.0.tgz", - "integrity": "sha512-BgrrdiIklZvVRrlTIlTSlEeGxSy4hUvraf1ZbODu2xGmdnDg+3uPyXigqMN7zJ2gjP9NORtlH5ZVRG4D8tb4XA==", - "dev": true, - "requires": { - "@google-cloud/translate": "^6.3.1", - "ansi-colors": "^4.1.1", - "axios": "^0.24.0", - "esbuild": "^0.14.21", - "execa": "^5.1.1", - "fs-extra": "^10.0.0", - "tiny-glob": "^0.2.9", - "yargs": "^17.3.1" - }, - "dependencies": { - "axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", - "dev": true, - "requires": { - "follow-redirects": "^1.14.4" - } + "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==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } }, - "yargs": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", - "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", - "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.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } }, - "yargs-parser": { - "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 - } - } - }, - "@iobroker/testing": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-2.5.6.tgz", - "integrity": "sha512-oK9dj3f/j6M3fsrdmwY2k4TP3+h68rA3EfMSvnwV5Yc2+vR+xyBmOnoUcL0KLA2AIv++CBcfbE//9lcvANg7NA==", - "dev": true, - "requires": { - "alcalzone-shared": "~4.0.1", - "chai": "^4.3.6", - "chai-as-promised": "^7.1.1", - "debug": "^4.3.3", - "fs-extra": "^10.0.1", - "mocha": "^9.2.1", - "sinon": "^13.0.1", - "sinon-chai": "^3.7.0" - }, - "dependencies": { - "sinon": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", - "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.0.0", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" - } + "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 }, - "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" - } - } - } - }, - "@peculiar/asn1-schema": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.0.tgz", - "integrity": "sha512-D6g4C5YRKC/iPujMAOXuZ7YGdaoMx8GsvWzfVSyx2LYeL38ECOKNywlYAuwbqQvON64lgsYdAujWQPX8hhoBLw==", - "requires": { - "@types/asn1js": "^2.0.2", - "asn1js": "^2.3.1", - "pvtsutils": "^1.2.1", - "tslib": "^2.3.1" - } - }, - "@peculiar/json-schema": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", - "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", - "requires": { - "tslib": "^2.0.0" - } - }, - "@peculiar/webcrypto": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.3.2.tgz", - "integrity": "sha512-oUgNj+8oT7uROEMEpZZ3U+kZjyxj1KXuvA8P5kiMUveTya9eyS8KTqu/dzdEtYC3u7dvjknVz+0sUfkWOBHfQg==", - "requires": { - "@peculiar/asn1-schema": "^2.0.44", - "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.2.2", - "tslib": "^2.3.1", - "webcrypto-core": "^1.7.1" - } - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=", - "dev": true - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "dev": true - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "dev": true - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=", - "dev": true - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "dev": true, - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=", - "dev": true - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=", - "dev": true - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=", - "dev": true - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=", - "dev": true - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.1.tgz", - "integrity": "sha512-Wp5vwlZ0lOqpSYGKqr53INws9HLkt6JDc/pDZcPf7bchQnrXJMXPns8CXx0hFikMSGSWfvtvvpb2gtMVfkWagA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true - }, - "@types/asn1js": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/asn1js/-/asn1js-2.0.2.tgz", - "integrity": "sha512-t4YHCgtD+ERvH0FyxvNlYwJ2ezhqw7t+Ygh4urQ7dJER8i185JPv6oIM3ey5YQmGN6Zp9EMbpohkjZi9t3UxwA==" - }, - "@types/chai": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz", - "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==", - "dev": true - }, - "@types/chai-as-promised": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", - "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", - "dev": true, - "requires": { - "@types/chai": "*" - } - }, - "@types/iobroker": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.1.tgz", - "integrity": "sha512-+lKr/gXxfYyXQXhL6FoNifaJGiylc+EFwtLqaFxORCkQlz35+0yBuZF5H728GgJWsbBidxe3q3zM2hazUAEz1g==", - "requires": { - "@types/node": "*" - }, - "dependencies": { - "@types/node": { - "version": "17.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", - "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" - } - } - }, - "@types/long": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==", - "dev": true - }, - "@types/mocha": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.0.tgz", - "integrity": "sha512-QCWHkbMv4Y5U9oW10Uxbr45qMMSzl4OzijsozynUAgx3kEHUdXB00udx2dWDQ7f2TU2a2uuiFaRZjCe3unPpeg==", - "dev": true - }, - "@types/node": { - "version": "14.18.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz", - "integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==", - "dev": true - }, - "@types/proxyquire": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", - "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", - "dev": true - }, - "@types/sinon": { - "version": "10.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", - "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinon-chai": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", - "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", - "dev": true, - "requires": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, - "@types/web": { - "version": "0.0.55", - "resolved": "https://registry.npmjs.org/@types/web/-/web-0.0.55.tgz", - "integrity": "sha512-YMH9aZrSJIMRMioCUwrgauI3iS/w2wRFN45Xxm0FE9Tt3hqaqkvOzjDFGsNjyKZzz7GJC0ilb+0tv59ytSUbrQ==" - }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "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 - }, - "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 - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "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.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.2" - } - }, - "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.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "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 - }, - "arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1js": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-2.3.2.tgz", - "integrity": "sha512-IYzujqcOk7fHaePpTyvD3KPAA0AjT3qZlaQAw76zmPPAV/XTjhO+tbHjbFbIQZIhw+fk9wCSfb0Z6K+JHe8Q2g==", - "requires": { - "pvutils": "^1.1.3" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "axios": { - "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.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 - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", - "dev": true - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "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", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", - "dev": true - }, - "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", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", - "dev": true, - "requires": { - "check-error": "^1.0.2" - } - }, - "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" - }, - "dependencies": { - "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" - } - } - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "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, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.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 - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "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", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "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=" - }, - "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" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "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" - } - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.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 - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "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" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "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 - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "esbuild": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.27.tgz", - "integrity": "sha512-MZQt5SywZS3hA9fXnMhR22dv0oPGh6QtjJRIYbgL1AeqAoQZE+Qn5ppGYQAoHv/vq827flj4tIJ79Mrdiwk46Q==", - "dev": true, - "requires": { - "esbuild-android-64": "0.14.27", - "esbuild-android-arm64": "0.14.27", - "esbuild-darwin-64": "0.14.27", - "esbuild-darwin-arm64": "0.14.27", - "esbuild-freebsd-64": "0.14.27", - "esbuild-freebsd-arm64": "0.14.27", - "esbuild-linux-32": "0.14.27", - "esbuild-linux-64": "0.14.27", - "esbuild-linux-arm": "0.14.27", - "esbuild-linux-arm64": "0.14.27", - "esbuild-linux-mips64le": "0.14.27", - "esbuild-linux-ppc64le": "0.14.27", - "esbuild-linux-riscv64": "0.14.27", - "esbuild-linux-s390x": "0.14.27", - "esbuild-netbsd-64": "0.14.27", - "esbuild-openbsd-64": "0.14.27", - "esbuild-sunos-64": "0.14.27", - "esbuild-windows-32": "0.14.27", - "esbuild-windows-64": "0.14.27", - "esbuild-windows-arm64": "0.14.27" - } - }, - "esbuild-android-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.27.tgz", - "integrity": "sha512-LuEd4uPuj/16Y8j6kqy3Z2E9vNY9logfq8Tq+oTE2PZVuNs3M1kj5Qd4O95ee66yDGb3isaOCV7sOLDwtMfGaQ==", - "dev": true, - "optional": true - }, - "esbuild-android-arm64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.27.tgz", - "integrity": "sha512-E8Ktwwa6vX8q7QeJmg8yepBYXaee50OdQS3BFtEHKrzbV45H4foMOeEE7uqdjGQZFBap5VAqo7pvjlyA92wznQ==", - "dev": true, - "optional": true - }, - "esbuild-darwin-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.27.tgz", - "integrity": "sha512-czw/kXl/1ZdenPWfw9jDc5iuIYxqUxgQ/Q+hRd4/3udyGGVI31r29LCViN2bAJgGvQkqyLGVcG03PJPEXQ5i2g==", - "dev": true, - "optional": true - }, - "esbuild-darwin-arm64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.27.tgz", - "integrity": "sha512-BEsv2U2U4o672oV8+xpXNxN9bgqRCtddQC6WBh4YhXKDcSZcdNh7+6nS+DM2vu7qWIWNA4JbRG24LUUYXysimQ==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.27.tgz", - "integrity": "sha512-7FeiFPGBo+ga+kOkDxtPmdPZdayrSzsV9pmfHxcyLKxu+3oTcajeZlOO1y9HW+t5aFZPiv7czOHM4KNd0tNwCA==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.27.tgz", - "integrity": "sha512-8CK3++foRZJluOWXpllG5zwAVlxtv36NpHfsbWS7TYlD8S+QruXltKlXToc/5ZNzBK++l6rvRKELu/puCLc7jA==", - "dev": true, - "optional": true - }, - "esbuild-linux-32": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.27.tgz", - "integrity": "sha512-qhNYIcT+EsYSBClZ5QhLzFzV5iVsP1YsITqblSaztr3+ZJUI+GoK8aXHyzKd7/CKKuK93cxEMJPpfi1dfsOfdw==", - "dev": true, - "optional": true - }, - "esbuild-linux-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.27.tgz", - "integrity": "sha512-ESjck9+EsHoTaKWlFKJpPZRN26uiav5gkI16RuI8WBxUdLrrAlYuYSndxxKgEn1csd968BX/8yQZATYf/9+/qg==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.27.tgz", - "integrity": "sha512-JnnmgUBdqLQO9hoNZQqNHFWlNpSX82vzB3rYuCJMhtkuaWQEmQz6Lec1UIxJdC38ifEghNTBsF9bbe8dFilnCw==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.27.tgz", - "integrity": "sha512-no6Mi17eV2tHlJnqBHRLekpZ2/VYx+NfGxKcBE/2xOMYwctsanCaXxw4zapvNrGE9X38vefVXLz6YCF8b1EHiQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.27.tgz", - "integrity": "sha512-NolWP2uOvIJpbwpsDbwfeExZOY1bZNlWE/kVfkzLMsSgqeVcl5YMen/cedRe9mKnpfLli+i0uSp7N+fkKNU27A==", - "dev": true, - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.27.tgz", - "integrity": "sha512-/7dTjDvXMdRKmsSxKXeWyonuGgblnYDn0MI1xDC7J1VQXny8k1qgNp6VmrlsawwnsymSUUiThhkJsI+rx0taNA==", - "dev": true, - "optional": true - }, - "esbuild-linux-riscv64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.27.tgz", - "integrity": "sha512-D+aFiUzOJG13RhrSmZgrcFaF4UUHpqj7XSKrIiCXIj1dkIkFqdrmqMSOtSs78dOtObWiOrFCDDzB24UyeEiNGg==", - "dev": true, - "optional": true - }, - "esbuild-linux-s390x": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.27.tgz", - "integrity": "sha512-CD/D4tj0U4UQjELkdNlZhQ8nDHU5rBn6NGp47Hiz0Y7/akAY5i0oGadhEIg0WCY/HYVXFb3CsSPPwaKcTOW3bg==", - "dev": true, - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.27.tgz", - "integrity": "sha512-h3mAld69SrO1VoaMpYl3a5FNdGRE/Nqc+E8VtHOag4tyBwhCQXxtvDDOAKOUQexBGca0IuR6UayQ4ntSX5ij1Q==", - "dev": true, - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.27.tgz", - "integrity": "sha512-xwSje6qIZaDHXWoPpIgvL+7fC6WeubHHv18tusLYMwL+Z6bEa4Pbfs5IWDtQdHkArtfxEkIZz77944z8MgDxGw==", - "dev": true, - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.27.tgz", - "integrity": "sha512-/nBVpWIDjYiyMhuqIqbXXsxBc58cBVH9uztAOIfWShStxq9BNBik92oPQPJ57nzWXRNKQUEFWr4Q98utDWz7jg==", - "dev": true, - "optional": true - }, - "esbuild-windows-32": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.27.tgz", - "integrity": "sha512-Q9/zEjhZJ4trtWhFWIZvS/7RUzzi8rvkoaS9oiizkHTTKd8UxFwn/Mm2OywsAfYymgUYm8+y2b+BKTNEFxUekw==", - "dev": true, - "optional": true - }, - "esbuild-windows-64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.27.tgz", - "integrity": "sha512-b3y3vTSl5aEhWHK66ngtiS/c6byLf6y/ZBvODH1YkBM+MGtVL6jN38FdHUsZasCz9gFwYs/lJMVY9u7GL6wfYg==", - "dev": true, - "optional": true - }, - "esbuild-windows-arm64": { - "version": "0.14.27", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.27.tgz", - "integrity": "sha512-I/reTxr6TFMcR5qbIkwRGvldMIaiBu2+MP0LlD7sOlNXrfqIl9uNjsuxFPGEG4IRomjfQ5q8WT+xlF/ySVkqKg==", - "dev": true, - "optional": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "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.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz", - "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.2.1", - "@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" - }, - "dependencies": { - "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" - } + "node_modules/@iobroker/adapter-core": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.0.tgz", + "integrity": "sha512-J5Cgy0NK8GWjN1th3yvWCG3tnK8iJJcPaHIoVR8PfpEsz4hffuVGi660vNXqXdiqR5Br09XSJ5h1Pn9af0/taw==", + "dependencies": { + "@types/iobroker": "^4.0.1" + } }, - "minimatch": { - "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" - } - } - } - }, - "eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", - "dev": true - }, - "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, - "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==", - "dev": true - }, - "espree": { - "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.3.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 - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true - }, - "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" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "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==" - }, - "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==" - }, - "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 - }, - "fast-text-encoding": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz", - "integrity": "sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig==", - "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-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "requires": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" - } - }, - "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==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "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": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "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.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "dev": true - }, - "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "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==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "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 - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": 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", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gaxios": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.3.2.tgz", - "integrity": "sha512-T+ap6GM6UZ0c4E6yb1y/hy2UB6hTrqhglp3XfmU9qbLCGRYhLVV5aRPpC4EmoG8N8zOnkYCgoBz+ScvGAARY6Q==", - "dev": true, - "requires": { - "abort-controller": "^3.0.0", - "extend": "^3.0.2", - "https-proxy-agent": "^5.0.0", - "is-stream": "^2.0.0", - "node-fetch": "^2.6.1" - } - }, - "gcp-metadata": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.3.1.tgz", - "integrity": "sha512-x850LS5N7V1F3UcV7PoupzGsyD6iVwTVvsh3tbXfkctZnBnjW5yu5z1/3k3SehF7TyoTIe78rJs02GMMy+LF+A==", - "dev": true, - "requires": { - "gaxios": "^4.0.0", - "json-bigint": "^1.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-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "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 - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "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" - }, - "dependencies": { - "minimatch": { - "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" - } - } - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "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" - } - }, - "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 - }, - "google-auth-library": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.14.1.tgz", - "integrity": "sha512-5Rk7iLNDFhFeBYc3s8l1CqzbEBcdhwR193RlD4vSNFajIcINKI8W8P0JLmBpwymHqqWbX34pJDQu39cSy/6RsA==", - "dev": true, - "requires": { - "arrify": "^2.0.0", - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "fast-text-encoding": "^1.0.0", - "gaxios": "^4.0.0", - "gcp-metadata": "^4.2.0", - "gtoken": "^5.0.4", - "jws": "^4.0.0", - "lru-cache": "^6.0.0" - } - }, - "google-gax": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.30.1.tgz", - "integrity": "sha512-AR00wrunctUqwKQFl15Yq5bo9NuFLnT0zguZYCf8eAqoOUMbxn9V1L0ONCtV4+P9z7sLu+cjtgl+5b4eRZvktg==", - "dev": true, - "requires": { - "@grpc/grpc-js": "~1.5.0", - "@grpc/proto-loader": "^0.6.1", - "@types/long": "^4.0.0", - "abort-controller": "^3.0.0", - "duplexify": "^4.0.0", - "fast-text-encoding": "^1.0.3", - "google-auth-library": "^7.14.0", - "is-stream-ended": "^0.1.4", - "node-fetch": "^2.6.1", - "object-hash": "^3.0.0", - "proto3-json-serializer": "^0.1.8", - "protobufjs": "6.11.2", - "retry-request": "^4.0.0" - }, - "dependencies": { - "duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dev": true, - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "google-p12-pem": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.1.3.tgz", - "integrity": "sha512-MC0jISvzymxePDVembypNefkAQp+DRP7dBE+zNUPaIjEspIlYg0++OrsNr248V9tPbz6iqtZ7rX1hxWA5B8qBQ==", - "dev": true, - "requires": { - "node-forge": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "gtoken": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.3.2.tgz", - "integrity": "sha512-gkvEKREW7dXWF8NV8pVrKfW7WqReAmjjkMBh6lNCCGOM4ucS0r0YyXXl0r/9Yj8wcW/32ISkfc8h5mPTDbtifQ==", - "dev": true, - "requires": { - "gaxios": "^4.0.0", - "google-p12-pem": "^3.1.3", - "jws": "^4.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "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==" - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", - "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", - "dev": true - }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "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 - }, - "ignore": { - "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": { - "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.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "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.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-html": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-html/-/is-html-2.0.0.tgz", - "integrity": "sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==", - "dev": true, - "requires": { - "html-tags": "^3.0.0" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "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 - }, - "is-stream-ended": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", - "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "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" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dev": true, - "requires": { - "bignumber.js": "^9.0.0" - } - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "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==" - }, - "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 - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "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" - } - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "dev": true, - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "dev": true, - "requires": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, - "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" - } - }, - "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.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "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 - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "dev": true - }, - "loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } - }, - "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" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "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 - }, - "mime-db": { - "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.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.52.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 - }, - "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } + "node_modules/@iobroker/testing": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-3.0.2.tgz", + "integrity": "sha512-UxDHAs9DpBpHVd0vaPekBB6T5B7x/5Specz3sb78qpaZIOzTXGJNiY6neNcmsCj1IwBmnNrQKi9NNj7rnXJ9OQ==", + "dev": true, + "dependencies": { + "alcalzone-shared": "~4.0.1", + "chai": "^4.3.6", + "chai-as-promised": "^7.1.1", + "debug": "^4.3.4", + "fs-extra": "^10.1.0", + "mocha": "^9.2.2", + "sinon": "^13.0.1", + "sinon-chai": "^3.7.0" + } + }, + "node_modules/@iobroker/testing/node_modules/minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@iobroker/testing/node_modules/mocha": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/@iobroker/testing/node_modules/mocha/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/@iobroker/testing/node_modules/mocha/node_modules/debug/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/@iobroker/testing/node_modules/mocha/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==", + "dev": true + }, + "node_modules/@iobroker/testing/node_modules/nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/@iobroker/testing/node_modules/sinon": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.2.tgz", + "integrity": "sha512-KvOrztAVqzSJWMDoxM4vM+GPys1df2VBoXm+YciyB/OLMamfS3VXh3oGh5WtrAGSzrgczNWFFY22oKb7Fi5eeA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^6.1.1", + "diff": "^5.0.0", + "nise": "^5.1.1", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/@iobroker/testing/node_modules/sinon/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/@iobroker/testing/node_modules/workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "dev": true + }, + "node_modules/@peculiar/asn1-schema": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", + "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", + "dependencies": { + "asn1js": "^3.0.4", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@peculiar/json-schema": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", + "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@peculiar/webcrypto": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", + "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", + "dependencies": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0", + "webcrypto-core": "^1.7.4" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", + "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "node_modules/@types/chai": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.1.tgz", + "integrity": "sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==", + "dev": true + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "dev": true, + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/iobroker": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.1.tgz", + "integrity": "sha512-+lKr/gXxfYyXQXhL6FoNifaJGiylc+EFwtLqaFxORCkQlz35+0yBuZF5H728GgJWsbBidxe3q3zM2hazUAEz1g==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", + "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" + }, + "node_modules/@types/proxyquire": { + "version": "1.3.28", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", + "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", + "dev": true + }, + "node_modules/@types/sinon": { + "version": "10.0.11", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", + "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", + "dev": true, + "dependencies": { + "@types/sinonjs__fake-timers": "*" + } + }, + "node_modules/@types/sinon-chai": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", + "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", + "dev": true, + "dependencies": { + "@types/chai": "*", + "@types/sinon": "*" + } + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", + "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "dev": true + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/acorn": { + "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" + }, + "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==", + "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/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/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "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/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dependencies": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "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/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=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==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "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", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" + } + }, + "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/chalk/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/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "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/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "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", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/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=" + }, + "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/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "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/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "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/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "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/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "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/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-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.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", + "@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.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.15.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.1.2", + "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-plugin-promise": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", + "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "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/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/espree": { + "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.1", + "acorn-jsx": "^5.3.2", + "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/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ] + }, + "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==" + }, + "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==" + }, + "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-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "dependencies": { + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" + }, + "engines": { + "node": ">=0.10.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==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=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": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "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/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs-extra": { + "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", + "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/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "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", + "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-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "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": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "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" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "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", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "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/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "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.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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=", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "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/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "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/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "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==" + }, + "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/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "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/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "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/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.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "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/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "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=", + "dev": true + }, + "node_modules/mime-db": { + "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.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.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "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" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/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==", + "dev": true + }, + "node_modules/module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", + "dev": true + }, + "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/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "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/ngeohash": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", + "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==", + "engines": { + "node": ">=v0.2.0" + } + }, + "node_modules/nise": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", + "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": ">=5", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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/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", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "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", + "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-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "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/proxyquire": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", + "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", + "dev": true, + "dependencies": { + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.1", + "resolve": "^1.11.1" + } + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "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==", + "engines": { + "node": ">=6" + } + }, + "node_modules/pvtsutils": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", + "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/qs": { + "version": "6.10.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.5.tgz", + "integrity": "sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "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/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "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/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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.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/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "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/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/sinon": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", + "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^6.1.1", + "diff": "^5.0.0", + "nise": "^5.1.1", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/sinon-chai": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", + "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", + "dev": true, + "peerDependencies": { + "chai": "^4.0.0", + "sinon": ">=4.0.0" + } + }, + "node_modules/sinon/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/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.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-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": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "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-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "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/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "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/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.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/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/webcrypto-core": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", + "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", + "dependencies": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "asn1js": "^3.0.1", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "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/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "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/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/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "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.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "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" + } + } }, - "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { + "dependencies": { + "@eslint/eslintrc": { + "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.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@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 + }, + "@iobroker/adapter-core": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.0.tgz", + "integrity": "sha512-J5Cgy0NK8GWjN1th3yvWCG3tnK8iJJcPaHIoVR8PfpEsz4hffuVGi660vNXqXdiqR5Br09XSJ5h1Pn9af0/taw==", + "requires": { + "@types/iobroker": "^4.0.1" + } + }, + "@iobroker/testing": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-3.0.2.tgz", + "integrity": "sha512-UxDHAs9DpBpHVd0vaPekBB6T5B7x/5Specz3sb78qpaZIOzTXGJNiY6neNcmsCj1IwBmnNrQKi9NNj7rnXJ9OQ==", + "dev": true, + "requires": { + "alcalzone-shared": "~4.0.1", + "chai": "^4.3.6", + "chai-as-promised": "^7.1.1", + "debug": "^4.3.4", + "fs-extra": "^10.1.0", + "mocha": "^9.2.2", + "sinon": "^13.0.1", + "sinon-chai": "^3.7.0" + }, + "dependencies": { + "minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mocha": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.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" + }, + "dependencies": { + "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 + } + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true + }, + "sinon": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.2.tgz", + "integrity": "sha512-KvOrztAVqzSJWMDoxM4vM+GPys1df2VBoXm+YciyB/OLMamfS3VXh3oGh5WtrAGSzrgczNWFFY22oKb7Fi5eeA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^6.1.1", + "diff": "^5.0.0", + "nise": "^5.1.1", + "supports-color": "^7.2.0" + }, + "dependencies": { + "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" + } + } + } + }, + "workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "dev": true + } + } + }, + "@peculiar/asn1-schema": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", + "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", + "requires": { + "asn1js": "^3.0.4", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "@peculiar/json-schema": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", + "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "requires": { + "tslib": "^2.0.0" + } + }, + "@peculiar/webcrypto": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", + "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", + "requires": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0", + "webcrypto-core": "^1.7.4" + } + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", + "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@types/chai": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.1.tgz", + "integrity": "sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==", + "dev": true + }, + "@types/chai-as-promised": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "dev": true, + "requires": { + "@types/chai": "*" + } + }, + "@types/iobroker": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.1.tgz", + "integrity": "sha512-+lKr/gXxfYyXQXhL6FoNifaJGiylc+EFwtLqaFxORCkQlz35+0yBuZF5H728GgJWsbBidxe3q3zM2hazUAEz1g==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true + }, + "@types/node": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", + "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" + }, + "@types/proxyquire": { + "version": "1.3.28", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", + "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", + "dev": true + }, + "@types/sinon": { + "version": "10.0.11", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", + "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinon-chai": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", + "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", + "dev": true, + "requires": { + "@types/chai": "*", + "@types/sinon": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", + "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "dev": true + }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "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, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "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.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.2" + } + }, + "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.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "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, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "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 + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "requires": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "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 + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "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", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "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", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "requires": { + "check-error": "^1.0.2" + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "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, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.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 + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "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", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "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=" + }, + "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" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, "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" - }, - "dependencies": { - "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 - } - } + "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" + } + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.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 + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true + }, + "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" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "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 + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "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.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", + "@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.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.15.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.1.2", + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "eslint-plugin-promise": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", + "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "dev": true, + "requires": {} + }, + "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, + "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==", + "dev": true + }, + "espree": { + "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.1", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.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 + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "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==" + }, + "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==" + }, + "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-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "requires": { + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" + } + }, + "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==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "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": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "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.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-extra": { + "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", + "jsonfile": "^6.0.1", + "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 + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": 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", + "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", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "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": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "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" + } + }, + "graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "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==" + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ignore": { + "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": { + "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.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "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.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "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==", + "dev": true + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "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" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "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==" + }, + "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 + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "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" + } + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "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" + } + }, + "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.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "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 + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "requires": { + "get-func-name": "^2.0.0" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "mime-db": { + "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.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.52.0" + } + }, + "minimatch": { + "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" + } + }, + "mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", + "dev": true }, "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true - }, - "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 - }, - "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true - }, - "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 - }, - "ngeohash": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", - "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" - }, - "nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-forge": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.0.tgz", - "integrity": "sha512-08ARB91bUi6zNKzVmaj3QO7cr397uiDT2nJ63cHjyNtCTWIgvS47j3eT0WfzUwS9+6Z5YshRaoasFkXCKrIYbA==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "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" - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true - }, - "object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" - }, - "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", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "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" - } - }, - "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", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "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", - "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", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "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.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "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 - }, - "proto3-json-serializer": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-0.1.8.tgz", - "integrity": "sha512-ACilkB6s1U1gWnl5jtICpnDai4VCxmI9GFxuEaYdxtDG2oVI3sVFIUsvUZcQbJgtPM6p+zqKbjTKQZp6Y4FpQw==", - "dev": true, - "requires": { - "protobufjs": "^6.11.2" - } - }, - "protobufjs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", - "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", - "dev": true, - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - } - }, - "proxyquire": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", - "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", - "dev": true, - "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.1", - "resolve": "^1.11.1" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "pvtsutils": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.2.2.tgz", - "integrity": "sha512-OALo5ZEdqiI127i64+CXwkCOyFHUA+tCQgaUO/MvRDFXWPr53f2sx28ECNztUEzuyu5xvuuD1EB/szg9mwJoGA==", - "requires": { - "tslib": "^2.3.1" - } - }, - "pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" - }, - "qs": { - "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" - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true + }, + "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 + }, + "ngeohash": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", + "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" + }, + "nise": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", + "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": ">=5", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "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" + } + }, + "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", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "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", + "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", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "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 + }, + "proxyquire": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", + "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", + "dev": true, + "requires": { + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.1", + "resolve": "^1.11.1" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "pvtsutils": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", + "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "requires": { + "tslib": "^2.4.0" + } + }, + "pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" + }, "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + "version": "6.10.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.5.tgz", + "integrity": "sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "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 + }, + "resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dev": true, + "requires": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "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" + } }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, - "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 - }, - "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "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 - }, - "retry-request": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.2.2.tgz", - "integrity": "sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "extend": "^3.0.2" - } - }, - "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.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "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==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "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 - }, - "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.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "sinon": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", - "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.0.0", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" - }, - "dependencies": { - "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" - } - } - } - }, - "sinon-chai": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", - "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", - "dev": true - }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stream-events": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", - "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", - "dev": true, - "requires": { - "stubs": "^3.0.0" - } - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", - "dev": true - }, - "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, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "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==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { "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==", - "dev": true + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "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 + }, + "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" + } + }, + "sinon": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", + "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^6.1.1", + "diff": "^5.0.0", + "nise": "^5.1.1", + "supports-color": "^7.2.0" + }, + "dependencies": { + "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" + } + } + } + }, + "sinon-chai": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", + "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", + "dev": true, + "requires": {} + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "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, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "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, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "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": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "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 + }, + "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==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "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-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "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 + }, + "typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "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 + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "webcrypto-core": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", + "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", + "requires": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "asn1js": "^3.0.1", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "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" + } + }, + "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 + }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "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, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "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 + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "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.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + } + }, + "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 } - } - }, - "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, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "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 - }, - "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 - }, - "stubs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "teeny-request": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.3.tgz", - "integrity": "sha512-Ew3aoFzgQEatLA5OBIjdr1DWJUaC1xardG+qbPPo5k/y/3fMwXLxpjh5UB5dVfElktLaQbbMs80chkz53ByvSg==", - "dev": true, - "requires": { - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "stream-events": "^1.0.5", - "uuid": "^8.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", - "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", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "dev": true - }, - "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "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-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "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 - }, - "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "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 - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "webcrypto-core": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.1.tgz", - "integrity": "sha512-Gw2zLzYSJ7Imp5lLDu3CcWB5oTTACMDEE2PjoLfttGgIhd7BfackBdVgEzd9ZM/i65gpNq0+IelL0JZ48QwzNg==", - "requires": { - "@peculiar/asn1-schema": "^2.0.44", - "@peculiar/json-schema": "^1.1.12", - "@types/web": "^0.0.55", - "asn1js": "^2.2.0", - "pvtsutils": "^1.2.2", - "tslib": "^2.3.1" - } - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "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" - } - }, - "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 - }, - "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", - "dev": true - }, - "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, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "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 - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "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": "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.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - } - }, - "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 e0e460db..09d6f76d 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ "bundleDependencies": false, "dependencies": { "@iobroker/adapter-core": "^2.6.0", - "@peculiar/webcrypto": "^1.1.6", + "@peculiar/webcrypto": "^1.4.0", "ngeohash": "^0.6.3", - "qs": "^6.10.3", + "qs": "^6.10.5", "request": "^2.88.2", "traverse": "^0.6.6", "uuid": "^8.3.2" @@ -29,24 +29,22 @@ "deprecated": false, "description": "Adapter for VW Connect", "devDependencies": { - "@alcalzone/release-script": "^2.2.2", - "@iobroker/adapter-dev": "^1.0.0", - "@iobroker/testing": "^2.5.4", - "@types/chai": "^4.3.0", + "@iobroker/testing": "^3.0.2", + "@types/chai": "^4.3.1", "@types/chai-as-promised": "^7.1.5", - "@types/mocha": "^9.1.0", - "@types/node": "^14.18.12", + "@types/mocha": "^9.1.1", + "@types/node": "^18.0.0", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.11", "@types/sinon-chai": "^3.2.8", "chai": "^4.3.6", "chai-as-promised": "^7.1.1", - "eslint": "^8.10.0", - "mocha": "^9.2.1", + "eslint": "^8.18.0", + "mocha": "^10.0.0", "proxyquire": "^2.1.3", - "sinon": "^13.0.1", + "sinon": "^14.0.0", "sinon-chai": "^3.7.0", - "typescript": "~4.5.5", + "typescript": "~4.7.4", "eslint-plugin-promise": "^6.0.0" }, "engines": { From 5f96a29ddb4bcb46670e9edad9a23b681ba279d3 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 22 Jun 2022 15:02:02 +0200 Subject: [PATCH 407/729] add password check --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index a18364f5..441f6cdd 100644 --- a/main.js +++ b/main.js @@ -106,6 +106,9 @@ class VwWeconnect extends utils.Adapter { // Initialize your adapter here this.setState("info.connection", false, true); + if (!this.config.password) { + this.log.warn("Please enter password"); + } // Reset the connection indicator during startup this.type = "VW"; this.country = "DE"; From 8cdf596fb3d047b425916e9faff1e7e466bf3cdb Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 22 Jun 2022 15:04:03 +0200 Subject: [PATCH 408/729] typo --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 441f6cdd..4372eb50 100644 --- a/main.js +++ b/main.js @@ -108,6 +108,7 @@ class VwWeconnect extends utils.Adapter { this.setState("info.connection", false, true); if (!this.config.password) { this.log.warn("Please enter password"); + return; } // Reset the connection indicator during startup this.type = "VW"; From 95cd983867ca324dc885800c3c0d8b61e7926ebb Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 22 Jun 2022 15:24:17 +0200 Subject: [PATCH 409/729] 0.0.51 --- README.md | 4 ++++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index da89d8a7..adf9c229 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,10 @@ Door and window states: ## Changelog +### 0.0.51 + +- fix audi etron login + ### 0.0.48 - fix login, fix audi update, add limit for wallbox diff --git a/io-package.json b/io-package.json index 364069fe..a712ac69 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.50", + "version": "0.0.51", "news": { + "0.0.51": { + "en": "fix Audi etron login" + }, "0.0.50": { "en": "fix VWc2 Vehicle list, Add Audi Etron, Add start stop for WC Wallbox, fix restart after failed login" }, diff --git a/package.json b/package.json index 09d6f76d..7eed71ce 100644 --- a/package.json +++ b/package.json @@ -76,5 +76,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.50" + "version": "0.0.51" } \ No newline at end of file From c6330e51ced749ea76867a0e8739f6c0d4049323 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 22 Jun 2022 15:25:40 +0200 Subject: [PATCH 410/729] add vscode --- .vscode/settings.json | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file From 6848026afbf0992d66cf5b331bfee426c8e557a9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 21 Jul 2022 01:02:23 +0200 Subject: [PATCH 411/729] reformatting --- main.js | 9702 +++++++++++++++++++++++---------------------- package-lock.json | 72 +- package.json | 9 +- 3 files changed, 4998 insertions(+), 4785 deletions(-) diff --git a/main.js b/main.js index 4372eb50..4b0a548d 100644 --- a/main.js +++ b/main.js @@ -17,4504 +17,4607 @@ const { v4: uuidv4 } = require("uuid"); const traverse = require("traverse"); const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); +const axios = require("axios").default; class VwWeconnect extends utils.Adapter { - /** - * @param {Partial} [options={}] - */ - constructor(options) { - super({ - ...options, - name: "vw-connect", - }); - this.on("ready", this.onReady.bind(this)); - // this.on("objectChange", this.onObjectChange.bind(this)); - this.on("stateChange", this.onStateChange.bind(this)); - // this.on("message", this.onMessage.bind(this)); - this.on("unload", this.onUnload.bind(this)); - this.extractKeys = extractKeys; - - this.jar = request.jar(); - this.userAgent = "ioBroker v50"; - this.refreshTokenInterval = null; - this.vwrefreshTokenInterval = null; - this.updateInterval = null; - this.fupdateInterval = null; - this.refreshTokenTimeout = null; - - this.homeRegion = {}; - this.homeRegionSetter = {}; - - this.vinArray = []; - this.etags = {}; - - this.statesArray = [ - { - url: "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", - path: "timer", - element: "timer", - }, - { - url: "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", - path: "climater", - element: "climater", - }, - { - url: "$homeregion/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", - path: "position", - element: "storedPositionResponse", - element2: "position", - element3: "findCarResponse", - element4: "Position", - }, - { - url: "$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", - path: "tripdata", - element: "tripDataList", - }, - { - url: "$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", - path: "status", - element: "StoredVehicleDataResponse", - element2: "vehicleData", - }, - { - url: "$homeregion/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", - path: "destinations", - element: "destinations", - }, - { - url: "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", - path: "charger", - element: "charger", - }, - { - url: "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", - path: "remoteStandheizung", - element: "statusResponse", - }, - { - url: "$homeregion/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", - path: "history", - }, - ]; + /** + * @param {Partial} [options={}] + */ + constructor(options) { + super({ + ...options, + name: "vw-connect", + }); + this.on("ready", this.onReady.bind(this)); + // this.on("objectChange", this.onObjectChange.bind(this)); + this.on("stateChange", this.onStateChange.bind(this)); + // this.on("message", this.onMessage.bind(this)); + this.on("unload", this.onUnload.bind(this)); + this.extractKeys = extractKeys; + + this.jar = request.jar(); + this.userAgent = "ioBroker v50"; + this.refreshTokenInterval = null; + this.vwrefreshTokenInterval = null; + this.updateInterval = null; + this.fupdateInterval = null; + this.refreshTokenTimeout = null; + + this.homeRegion = {}; + this.homeRegionSetter = {}; + + this.vinArray = []; + this.etags = {}; + + this.statesArray = [ + { + url: "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer", + path: "timer", + element: "timer", + }, + { + url: "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater", + path: "climater", + element: "climater", + }, + { + url: "$homeregion/fs-car/bs/cf/v1/$type/$country/vehicles/$vin/position", + path: "position", + element: "storedPositionResponse", + element2: "position", + element3: "findCarResponse", + element4: "Position", + }, + { + url: "$homeregion/fs-car/bs/tripstatistics/v1/$type/$country/vehicles/$vin/tripdata/$tripType?type=list", + path: "tripdata", + element: "tripDataList", + }, + { + url: "$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/status", + path: "status", + element: "StoredVehicleDataResponse", + element2: "vehicleData", + }, + { + url: "$homeregion/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", + path: "destinations", + element: "destinations", + }, + { + url: "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", + path: "charger", + element: "charger", + }, + { + url: "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/status", + path: "remoteStandheizung", + element: "statusResponse", + }, + { + url: "$homeregion/fs-car/bs/dwap/v1/$type/$country/vehicles/$vin/history", + path: "history", + }, + ]; + } + + /** + * Is called when databases are connected and adapter received configuration. + */ + async onReady() { + // Initialize your adapter here + + this.setState("info.connection", false, true); + if (!this.config.password) { + this.log.warn("Please enter password"); + return; } - - /** - * Is called when databases are connected and adapter received configuration. - */ - async onReady() { - // Initialize your adapter here - - this.setState("info.connection", false, true); - if (!this.config.password) { - this.log.warn("Please enter password"); - return; - } - // Reset the connection indicator during startup - this.type = "VW"; - this.country = "DE"; - this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; - this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; - this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; - this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; - this.xrequest = "de.volkswagen.carnet.eu.eremote"; - this.responseType = "id_token%20token%20code"; - this.xappversion = "5.1.2"; - this.xappname = "eRemote"; - if (this.config.type === "id") { - this.type = "Id"; - this.country = "DE"; - this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid profile badge cars dealers birthdate vin"; - this.redirect = "weconnect://authenticated"; - this.xrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - this.xappversion = ""; - this.xappname = ""; - } - if (this.config.type === "skoda") { - this.type = "Skoda"; - this.country = "CZ"; - this.clientId = "f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com"; - this.xclientId = "afb0473b-6d82-42b8-bfea-cead338c46ef"; - this.scope = "openid mbb profile"; - this.redirect = "skodaconnect://oidc.login/"; - this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; - this.xappversion = "3.2.6"; - this.xappname = "cz.skodaauto.connect"; - } - if (this.config.type === "skodae") { - this.type = "Skoda"; - this.country = "CZ"; - this.clientId = "f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com"; - this.xclientId = "afb0473b-6d82-42b8-bfea-cead338c46ef"; - this.scope = "openid mbb profile"; - this.redirect = "skodaconnect://oidc.login/"; - this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; - this.xappversion = "3.2.6"; - this.xappname = "cz.skodaauto.connect"; - } - if (this.config.type === "seat") { - this.type = "Seat"; - this.country = "ES"; - this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; - this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; - this.scope = "openid profile mbb cars birthdate nickname address phone"; - this.redirect = "seatconnect://identity-kit/login"; - this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; - this.xappversion = "1.1.29"; - this.xappname = "SEATConnect"; - } - if (this.config.type === "seatcupra") { - this.type = "Seat"; - this.clientId = "3c756d46-f1ba-4d78-9f9a-cff0d5292d51@apps_vw-dilab_com"; - this.scope = "openid profile nickname birthdate phone"; - this.redirect = "cupra://oauth-callback"; - this.responseType = "code"; - this.xappversion = "1.1.29"; - this.xappname = "SEATConnect"; - } - if (this.config.type === "vwv2") { - this.type = "VW"; - this.country = "DE"; - this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; - this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; - this.scope = "openid profile mbb cars birthdate nickname address phone"; - this.redirect = "carnet://identity-kit/login"; - this.xrequest = "de.volkswagen.car-net.eu.e-remote"; - this.responseType = "id_token%20token%20code"; - this.xappversion = "5.6.7"; - this.xappname = "We Connect"; - } - if (this.config.type === "audi") { - this.type = "Audi"; - this.country = "DE"; - this.clientId = "09b6cbec-cd19-4589-82fd-363dfa8c24da@apps_vw-dilab_com"; - this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; - this.scope = "address profile badge birthdate birthplace nationalIdentifier nationality profession email vin phone nickname name picture mbb gallery openid"; - this.redirect = "myaudi:///"; - this.xrequest = "de.myaudi.mobile.assistant"; - this.responseType = "token%20id_token"; - // this.responseType = "code"; - this.xappversion = "3.22.0"; - this.xappname = "myAudi"; - } - if (this.config.type === "audietron") { - this.type = "Audi"; - this.country = "DE"; - this.clientId = "f4d0934f-32bf-4ce4-b3c4-699a7049ad26@apps_vw-dilab_com"; - this.scope = "address badge birthdate birthplace email gallery mbb name nationalIdentifier nationality nickname phone picture profession profile vin openid"; - this.redirect = "myaudi:///"; - this.responseType = "code"; - this.xappversion = "3.22.0"; - this.xappname = "myAudi"; - } - if (this.config.type === "audidata") { - this.type = "Audi"; - this.country = "DE"; - this.clientId = "ec6198b1-b31e-41ec-9a69-95d42d6497ed@apps_vw-dilab_com"; - this.scope = "openid profile address email phone"; - this.redirect = "acpp://de.audi.connectplugandplay/oauth2redirect/identitykit"; - this.responseType = "code"; - } - if (this.config.type === "go") { - this.type = ""; - this.country = ""; - this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid%20profile%20address%20email%20phone"; - this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; - this.xrequest = ""; - this.responseType = "code"; - this.xappversion = ""; - this.xappname = ""; - } - if (this.config.type === "seatelli") { - this.type = ""; - this.country = ""; - this.clientId = "d940d794-5945-48a3-84b1-44222c387800@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid profile"; - this.redirect = "Seat-elli-hub://opid"; - this.xrequest = ""; - this.responseType = "code"; - this.xappversion = ""; - this.xappname = ""; - } - if (this.config.type === "skodapower") { - this.type = ""; - this.country = ""; - this.clientId = "b84ba8a1-7925-43c9-9963-022587faaac5@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid profile"; - this.redirect = "skoda-hub://opid"; - this.xrequest = ""; - this.responseType = "code"; - this.xappversion = ""; - this.xappname = ""; - } - if (!this.config.interval || this.config.interval < 0.5) { - this.log.info("Interval of 0 is not allowed reset to 1"); - this.config.interval = 1; - } - this.tripTypes = []; - if (this.config.tripShortTerm == true) { - this.tripTypes.push("shortTerm"); - } - if (this.config.tripLongTerm == true) { - this.tripTypes.push("longTerm"); - } - if (this.config.tripCyclic == true) { - this.tripTypes.push("cyclic"); - } - this.login() - .then(() => { - this.log.info("Login successful"); - this.setState("info.connection", true, true); - this.setObjectNotExists("refresh", { - type: "state", - common: { - name: "Refresh All States", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - this.getPersonalData() - .then(() => { - this.getVehicles() - .then(() => { - if (this.config.type !== "go") { - this.vinArray.forEach((vin) => { - if (this.config.type === "id" || this.config.type === "audietron") { - this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); - }); - } else if (this.config.type === "seatcupra") { - this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get cupra status Failed"); - }); - } else if (this.config.type === "audidata") { - this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status Failed"); - }); - } else if (this.config.type === "skodae") { - this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; - this.scope = "openid dealers profile email cars address"; - this.redirect = "skodaconnect://oidc.login/"; - - this.login() - .then(() => { - this.getSkodaEStatus(vin).catch(() => { - this.log.error("get skodae status Failed"); - }); - }) - .catch(() => { - this.log.error("Failed second skoda login"); - }); - } else { - this.getHomeRegion(vin) - .catch(() => { - this.log.debug("get home region Failed " + vin); - }) - .finally(() => { - this.getVehicleData(vin).catch(() => { - this.log.error("get vehicle data Failed"); - }); - this.getVehicleRights(vin).catch(() => { - this.log.error("get vehicle rights Failed"); - }); - this.requestStatusUpdate(vin) - .finally(() => { - this.statesArray.forEach((state) => { - if (state.path == "tripdata") { - this.tripTypes.forEach((tripType) => { - this.getVehicleStatus( - vin, - state.url, - state.path, - state.element, - state.element2, - state.element3, - state.element4, - tripType - ).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - } else { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => { - this.log.debug("error while getting " + state.url); - }); - } - }); - }) - .catch(() => { - this.log.error("status update Failed " + vin); - }); - }) - .catch(() => { - this.log.error("Error getting home region"); - }); - } - }); - } - - this.updateInterval = setInterval(() => { - this.updateStatus(); - }, this.config.interval * 60 * 1000); - - if (this.config.type !== "id" && this.config.type !== "skodae" && this.config.type !== "audietron") { - if (this.config.forceinterval > 0) { - this.fupdateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach((vin) => { - this.requestStatusUpdate(vin).catch(() => { - this.log.error("force status update Failed"); - }); - }); - }, this.config.forceinterval * 60 * 1000); - } - } - - if (this.config.type === "seatelli" || this.config.type === "skodapower") { - this.getElliData(this.config.type).catch(() => { - this.log.error("get elli Failed"); + // Reset the connection indicator during startup + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com"; + this.xclientId = "38761134-34d0-41f3-9a73-c4be88d7d337"; + this.scope = "openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin"; + this.redirect = "carnet%3A%2F%2Fidentity-kit%2Flogin"; + this.xrequest = "de.volkswagen.carnet.eu.eremote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.1.2"; + this.xappname = "eRemote"; + if (this.config.type === "id") { + this.type = "Id"; + this.country = "DE"; + this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile badge cars dealers birthdate vin"; + this.redirect = "weconnect://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + this.xappversion = ""; + this.xappname = ""; + } + if (this.config.type === "skoda") { + this.type = "Skoda"; + this.country = "CZ"; + this.clientId = "f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com"; + this.xclientId = "afb0473b-6d82-42b8-bfea-cead338c46ef"; + this.scope = "openid mbb profile"; + this.redirect = "skodaconnect://oidc.login/"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "3.2.6"; + this.xappname = "cz.skodaauto.connect"; + } + if (this.config.type === "skodae") { + this.type = "Skoda"; + this.country = "CZ"; + this.clientId = "f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com"; + this.xclientId = "afb0473b-6d82-42b8-bfea-cead338c46ef"; + this.scope = "openid mbb profile"; + this.redirect = "skodaconnect://oidc.login/"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "3.2.6"; + this.xappname = "cz.skodaauto.connect"; + } + if (this.config.type === "seat") { + this.type = "Seat"; + this.country = "ES"; + this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; + this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; + this.scope = "openid profile mbb cars birthdate nickname address phone"; + this.redirect = "seatconnect://identity-kit/login"; + this.xrequest = "cz.skodaauto.connect"; + this.responseType = "code%20id_token"; + this.xappversion = "1.1.29"; + this.xappname = "SEATConnect"; + } + if (this.config.type === "seatcupra") { + this.type = "Seat"; + this.clientId = "3c756d46-f1ba-4d78-9f9a-cff0d5292d51@apps_vw-dilab_com"; + this.scope = "openid profile nickname birthdate phone"; + this.redirect = "cupra://oauth-callback"; + this.responseType = "code"; + this.xappversion = "1.1.29"; + this.xappname = "SEATConnect"; + } + if (this.config.type === "vwv2") { + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; + this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; + this.scope = "openid profile mbb cars birthdate nickname address phone"; + this.redirect = "carnet://identity-kit/login"; + this.xrequest = "de.volkswagen.car-net.eu.e-remote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.6.7"; + this.xappname = "We Connect"; + } + if (this.config.type === "audi") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "09b6cbec-cd19-4589-82fd-363dfa8c24da@apps_vw-dilab_com"; + this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; + this.scope = + "address profile badge birthdate birthplace nationalIdentifier nationality profession email vin phone nickname name picture mbb gallery openid"; + this.redirect = "myaudi:///"; + this.xrequest = "de.myaudi.mobile.assistant"; + this.responseType = "token%20id_token"; + // this.responseType = "code"; + this.xappversion = "3.22.0"; + this.xappname = "myAudi"; + } + if (this.config.type === "audietron") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "f4d0934f-32bf-4ce4-b3c4-699a7049ad26@apps_vw-dilab_com"; + this.scope = + "address badge birthdate birthplace email gallery mbb name nationalIdentifier nationality nickname phone picture profession profile vin openid"; + this.redirect = "myaudi:///"; + this.responseType = "code"; + this.xappversion = "3.22.0"; + this.xappname = "myAudi"; + } + if (this.config.type === "audidata") { + this.type = "Audi"; + this.country = "DE"; + this.clientId = "ec6198b1-b31e-41ec-9a69-95d42d6497ed@apps_vw-dilab_com"; + this.scope = "openid profile address email phone"; + this.redirect = "acpp://de.audi.connectplugandplay/oauth2redirect/identitykit"; + this.responseType = "code"; + } + if (this.config.type === "go") { + this.type = ""; + this.country = ""; + this.clientId = "ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid%20profile%20address%20email%20phone"; + this.redirect = "vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } + if (this.config.type === "seatelli") { + this.type = ""; + this.country = ""; + this.clientId = "d940d794-5945-48a3-84b1-44222c387800@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile"; + this.redirect = "Seat-elli-hub://opid"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } + if (this.config.type === "skodapower") { + this.type = ""; + this.country = ""; + this.clientId = "b84ba8a1-7925-43c9-9963-022587faaac5@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile"; + this.redirect = "skoda-hub://opid"; + this.xrequest = ""; + this.responseType = "code"; + this.xappversion = ""; + this.xappname = ""; + } + if (!this.config.interval || this.config.interval < 0.5) { + this.log.info("Interval of 0 is not allowed reset to 1"); + this.config.interval = 1; + } + this.tripTypes = []; + if (this.config.tripShortTerm == true) { + this.tripTypes.push("shortTerm"); + } + if (this.config.tripLongTerm == true) { + this.tripTypes.push("longTerm"); + } + if (this.config.tripCyclic == true) { + this.tripTypes.push("cyclic"); + } + this.login() + .then(() => { + this.log.info("Login successful"); + this.setState("info.connection", true, true); + this.setObjectNotExists("refresh", { + type: "state", + common: { + name: "Refresh All States", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + this.getPersonalData() + .then(() => { + this.getVehicles() + .then(() => { + if (this.config.type !== "go") { + this.vinArray.forEach((vin) => { + if (this.config.type === "id" || this.config.type === "audietron") { + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + }); + } else if (this.config.type === "seatcupra") { + this.getSeatCupraStatus(vin).catch(() => { + this.log.error("get cupra status Failed"); + }); + } else if (this.config.type === "audidata") { + this.getAudiDataStatus(vin).catch(() => { + this.log.error("get audi data status Failed"); + }); + } else if (this.config.type === "skodae") { + this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; + this.scope = "openid dealers profile email cars address"; + this.redirect = "skodaconnect://oidc.login/"; + + this.login() + .then(() => { + this.getSkodaEStatus(vin).catch(() => { + this.log.error("get skodae status Failed"); + }); + }) + .catch(() => { + this.log.error("Failed second skoda login"); + }); + } else { + this.getHomeRegion(vin) + .catch(() => { + this.log.debug("get home region Failed " + vin); + }) + .finally(() => { + this.getVehicleData(vin).catch(() => { + this.log.error("get vehicle data Failed"); + }); + this.getVehicleRights(vin).catch(() => { + this.log.error("get vehicle rights Failed"); + }); + this.requestStatusUpdate(vin) + .finally(() => { + this.statesArray.forEach((state) => { + if (state.path == "tripdata") { + this.tripTypes.forEach((tripType) => { + this.getVehicleStatus( + vin, + state.url, + state.path, + state.element, + state.element2, + state.element3, + state.element4, + tripType + ).catch(() => { + this.log.debug("error while getting " + state.url); }); + }); + } else { + this.getVehicleStatus( + vin, + state.url, + state.path, + state.element, + state.element2, + state.element3, + state.element4 + ).catch(() => { + this.log.debug("error while getting " + state.url); + }); } + }); }) .catch(() => { - this.log.error("Get Vehicles Failed"); + this.log.error("status update Failed " + vin); }); - }) - .catch(() => { - this.log.error("get personal data Failed"); - }); - }) - .catch(() => { - this.log.error("Login Failed"); - this.log.error("Restart Adapter in 30min"); - setTimeout(() => { - this.log.error("Restart adapter"); - this.restart(); - }, 30 * 60 * 1000); - }); - this.subscribeStates("*"); - } + }) + .catch(() => { + this.log.error("Error getting home region"); + }); + } + }); + } + + this.updateInterval = setInterval(() => { + this.updateStatus(); + }, this.config.interval * 60 * 1000); - login() { - return new Promise(async (resolve, reject) => { - const nonce = this.getNonce(); - const state = uuidv4(); + if (this.config.type !== "id" && this.config.type !== "skodae" && this.config.type !== "audietron") { + if (this.config.forceinterval > 0) { + this.fupdateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach((vin) => { + this.requestStatusUpdate(vin).catch(() => { + this.log.error("force status update Failed"); + }); + }); + }, this.config.forceinterval * 60 * 1000); + } + } - let [code_verifier, codeChallenge] = this.getCodeChallenge(); - if (this.config.type === "seatelli" || this.config.type === "skodapower") { - [code_verifier, codeChallenge] = this.getCodeChallengev2(); + if (this.config.type === "seatelli" || this.config.type === "skodapower") { + this.getElliData(this.config.type).catch(() => { + this.log.error("get elli Failed"); + }); + } + }) + .catch(() => { + this.log.error("Get Vehicles Failed"); + }); + }) + .catch(() => { + this.log.error("get personal data Failed"); + }); + }) + .catch(() => { + this.log.error("Login Failed"); + this.log.error("Restart Adapter in 30min"); + setTimeout(() => { + this.log.error("Restart adapter"); + this.restart(); + }, 30 * 60 * 1000); + }); + this.subscribeStates("*"); + } + + login() { + return new Promise(async (resolve, reject) => { + const nonce = this.getNonce(); + const state = uuidv4(); + + let [code_verifier, codeChallenge] = this.getCodeChallenge(); + if (this.config.type === "seatelli" || this.config.type === "skodapower") { + [code_verifier, codeChallenge] = this.getCodeChallengev2(); + } + const method = "GET"; + const form = {}; + let url = + "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + + this.clientId + + "&scope=" + + this.scope + + "&response_type=" + + this.responseType + + "&redirect_uri=" + + this.redirect + + "&nonce=" + + nonce + + "&state=" + + state; + if ( + this.config.type === "vw" || + this.config.type === "vwv2" || + this.config.type === "go" || + this.config.type === "seatelli" || + this.config.type === "skodapower" || + this.config.type === "audidata" || + this.config.type === "audietron" || + this.config.type === "seatcupra" + ) { + url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; + } + if (this.config.type === "audi") { + url += "&ui_locales=de-DE%20de&prompt=login"; + } + if (this.config.type === "id" && this.type !== "Wc") { + url = await this.receiveLoginUrl().catch(() => { + this.log.warn("Failed to get login url"); + }); + if (!url) { + url = "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; + } + } + const loginRequest = request( + { + method: method, + url: url, + headers: { + "User-Agent": this.userAgent, + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + "upgrade-insecure-requests": 1, + }, + jar: this.jar, + form: form, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (this.type === "Wc") { + if (err && err.message === "Invalid protocol: wecharge:") { + this.log.debug("Found WeCharge connection"); + this.getTokens(loginRequest, code_verifier, reject, resolve); + } else { + this.log.debug("No WeCharge found, cancel login"); + resolve(); + } + return; } - const method = "GET"; - const form = {}; - let url = - "https://identity.vwgroup.io/oidc/v1/authorize?client_id=" + - this.clientId + - "&scope=" + - this.scope + - "&response_type=" + - this.responseType + - "&redirect_uri=" + - this.redirect + - "&nonce=" + - nonce + - "&state=" + - state; - if ( - this.config.type === "vw" || - this.config.type === "vwv2" || - this.config.type === "go" || - this.config.type === "seatelli" || - this.config.type === "skodapower" || - this.config.type === "audidata" || - this.config.type === "audietron" || - this.config.type === "seatcupra" - ) { - url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; + if (err && err.message.indexOf("Invalid protocol:") !== -1) { + this.log.debug("Found Token"); + this.getTokens(loginRequest, code_verifier, reject, resolve); + return; } - if (this.config.type === "audi") { - url += "&ui_locales=de-DE%20de&prompt=login"; + this.log.error("Failed in first login step "); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + err && err.message && this.log.error(err.message); + loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); + + reject(); + return; + } + + try { + let form = {}; + if (body.indexOf("emailPasswordForm") !== -1) { + this.log.debug("parseEmailForm"); + form = this.extractHidden(body); + form["email"] = this.config.user; + } else { + if (this.type === "Wc") { + resolve(); + return; + } + this.log.error("No Login Form found for type: " + this.type); + this.log.debug(JSON.stringify(body)); + reject(); + return; } - if (this.config.type === "id" && this.type !== "Wc") { - url = await this.receiveLoginUrl().catch(() => { - this.log.warn("Failed to get login url"); - }); - if (!url) { - url = "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": this.userAgent, + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }, + form: form, + jar: this.jar, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to get login identifier"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; } - } - const loginRequest = request( - { - method: method, - url: url, - headers: { + try { + if (body.indexOf("emailPasswordForm") !== -1) { + this.log.debug("emailPasswordForm2"); + + /* + const stringJson =body.split("window._IDK = ")[1].split(";")[0].replace(/\n/g, "") + const json =stringJson.replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ').replace(/'/g, '"') + const jsonObj = JSON.parse(json); + */ + form = { + _csrf: body.split("csrf_token: '")[1].split("'")[0], + email: this.config.user, + password: this.config.password, + hmac: body.split('"hmac":"')[1].split('"')[0], + relayState: body.split('"relayState":"')[1].split('"')[0], + }; + } else { + this.log.error("No Login Form found. Please check your E-Mail in the app."); + this.log.debug(JSON.stringify(body)); + reject(); + return; + } + request.post( + { + url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", + headers: { + "Content-Type": "application/x-www-form-urlencoded", "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, - "upgrade-insecure-requests": 1, + }, + form: form, + jar: this.jar, + gzip: true, + followAllRedirects: false, }, - jar: this.jar, - form: form, - gzip: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if (this.type === "Wc") { - if (err && err.message === "Invalid protocol: wecharge:") { - this.log.debug("Found WeCharge connection"); - this.getTokens(loginRequest, code_verifier, reject, resolve); - } else { - this.log.debug("No WeCharge found, cancel login"); - resolve(); - } - return; - } - if (err && err.message.indexOf("Invalid protocol:") !== -1) { - this.log.debug("Found Token"); - this.getTokens(loginRequest, code_verifier, reject, resolve); - return; - } - this.log.error("Failed in first login step "); + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to get login authenticate"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); - err && err.message && this.log.error(err.message); - loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); - reject(); return; - } + } - try { - let form = {}; - if (body.indexOf("emailPasswordForm") !== -1) { - this.log.debug("parseEmailForm"); - form = this.extractHidden(body); - form["email"] = this.config.user; - } else { - if (this.type === "Wc") { - resolve(); - return; - } - this.log.error("No Login Form found for type: " + this.type); - this.log.debug(JSON.stringify(body)); - reject(); - return; - } - request.post( + try { + this.log.debug(JSON.stringify(body)); + this.log.debug(JSON.stringify(resp.headers)); + + if (resp.headers.location.split("&").length <= 2 || resp.headers.location.indexOf("/terms-and-conditions?") !== -1) { + this.log.warn(resp.headers.location); + this.log.warn( + "No valid userid, please check username and password or visit this link or logout and login in your app account:" + ); + this.log.warn("https://" + resp.request.host + resp.headers.location); + this.log.warn("Try to auto accept new consent"); + + request.get( { - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/identifier", - headers: { + url: "https://" + resp.request.host + resp.headers.location, + jar: this.jar, + headers: { + "User-Agent": this.userAgent, + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }, + followAllRedirects: true, + gzip: true, + }, + (err, resp, body) => { + this.log.debug(body); + + const form = this.extractHidden(body); + const url = "https://" + resp.request.host + resp.req.path.split("?")[0]; + this.log.debug(JSON.stringify(form)); + request.post( + { + url: url, + jar: this.jar, + headers: { "Content-Type": "application/x-www-form-urlencoded", "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, + }, + form: form, + followAllRedirects: true, + gzip: true, }, - form: form, - jar: this.jar, - gzip: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to get login identifier"); + (err, resp, body) => { + if ((err && err.message.indexOf("Invalid protocol:") !== -1) || (resp && resp.statusCode >= 400)) { + this.log.warn("Failed to auto accept"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); reject(); return; + } + this.log.info("Auto accept succesful. Restart adapter in 10sec"); + setTimeout(() => { + this.restart(); + }, 10 * 1000); } - try { - if (body.indexOf("emailPasswordForm") !== -1) { - this.log.debug("emailPasswordForm2"); + ); + } + ); - /* - const stringJson =body.split("window._IDK = ")[1].split(";")[0].replace(/\n/g, "") - const json =stringJson.replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ').replace(/'/g, '"') - const jsonObj = JSON.parse(json); - */ - form = { - _csrf: body.split("csrf_token: '")[1].split("'")[0], - email: this.config.user, - password: this.config.password, - hmac: body.split('"hmac":"')[1].split('"')[0], - relayState: body.split('"relayState":"')[1].split('"')[0], - }; - } else { - this.log.error("No Login Form found. Please check your E-Mail in the app."); - this.log.debug(JSON.stringify(body)); - reject(); - return; - } - request.post( - { - url: "https://identity.vwgroup.io/signin-service/v1/" + this.clientId + "/login/authenticate", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - }, - form: form, - jar: this.jar, - gzip: true, - followAllRedirects: false, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to get login authenticate"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - - try { - this.log.debug(JSON.stringify(body)); - this.log.debug(JSON.stringify(resp.headers)); - - if (resp.headers.location.split("&").length <= 2 || resp.headers.location.indexOf("/terms-and-conditions?") !== -1) { - this.log.warn(resp.headers.location); - this.log.warn("No valid userid, please check username and password or visit this link or logout and login in your app account:"); - this.log.warn("https://" + resp.request.host + resp.headers.location); - this.log.warn("Try to auto accept new consent"); - - request.get( - { - url: "https://" + resp.request.host + resp.headers.location, - jar: this.jar, - headers: { - "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - }, - followAllRedirects: true, - gzip: true, - }, - (err, resp, body) => { - this.log.debug(body); - - const form = this.extractHidden(body); - const url = "https://" + resp.request.host + resp.req.path.split("?")[0]; - this.log.debug(JSON.stringify(form)); - request.post( - { - url: url, - jar: this.jar, - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - }, - form: form, - followAllRedirects: true, - gzip: true, - }, - (err, resp, body) => { - if ((err && err.message.indexOf("Invalid protocol:") !== -1) || (resp && resp.statusCode >= 400)) { - this.log.warn("Failed to auto accept"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.log.info("Auto accept succesful. Restart adapter in 10sec"); - setTimeout(() => { - this.restart(); - }, 10 * 1000); - } - ); - } - ); - - reject(); - return; - } - this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; - if (!this.stringIsAValidUrl(resp.headers.location)) { - if (resp.headers.location.indexOf("&error=") !== -1) { - const location = resp.headers.location; - this.log.error("Error: " + location.substring(location.indexOf("error="), location.length - 1)); - } else { - this.log.error("No valid login url, please download the log and visit:"); - this.log.error("http://" + resp.request.host + resp.headers.location); - } - reject(); - return; - } - - let getRequest = request.get( - { - url: resp.headers.location || "", - headers: { - "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - }, - jar: this.jar, - gzip: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err) { - this.log.debug(err); - this.getTokens(getRequest, code_verifier, reject, resolve); - } else { - this.log.debug(body); - this.log.debug("No Token received visiting url and accept the permissions."); - const form = this.extractHidden(body); - getRequest = request.post( - { - url: getRequest.uri.href, - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - referer: getRequest.uri.href, - }, - form: form, - jar: this.jar, - gzip: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err) { - this.getTokens(getRequest, code_verifier, reject, resolve); - } else { - this.log.error("No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings"); - try { - this.log.debug(JSON.stringify(body)); - } catch (err) { - this.log.error(err); - reject(); - } - } - } - ); - } - } - ); - } catch (err2) { - this.log.error("Login was not successful, please check your login credentials and selected type"); - err && this.log.error(err); - this.log.error(err2); - this.log.error(err2.stack); - reject(); - } - } + reject(); + return; + } + this.config.userid = resp.headers.location.split("&")[2].split("=")[1]; + if (!this.stringIsAValidUrl(resp.headers.location)) { + if (resp.headers.location.indexOf("&error=") !== -1) { + const location = resp.headers.location; + this.log.error("Error: " + location.substring(location.indexOf("error="), location.length - 1)); + } else { + this.log.error("No valid login url, please download the log and visit:"); + this.log.error("http://" + resp.request.host + resp.headers.location); + } + reject(); + return; + } + + let getRequest = request.get( + { + url: resp.headers.location || "", + headers: { + "User-Agent": this.userAgent, + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }, + jar: this.jar, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err) { + this.log.debug(err); + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.debug(body); + this.log.debug("No Token received visiting url and accept the permissions."); + const form = this.extractHidden(body); + getRequest = request.post( + { + url: getRequest.uri.href, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": this.userAgent, + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + referer: getRequest.uri.href, + }, + form: form, + jar: this.jar, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err) { + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.error( + "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings" ); - } catch (err) { - this.log.error(err); - reject(); + try { + this.log.debug(JSON.stringify(body)); + } catch (err) { + this.log.error(err); + reject(); + } + } } + ); } + } ); - } catch (err) { - this.log.error(err); + } catch (err2) { + this.log.error("Login was not successful, please check your login credentials and selected type"); + err && this.log.error(err); + this.log.error(err2); + this.log.error(err2.stack); reject(); + } } + ); + } catch (err) { + this.log.error(err); + reject(); } + } ); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + updateStatus() { + if (this.config.type === "go") { + this.getVehicles(); + return; + } else if (this.config.type === "skodae") { + this.vinArray.forEach((vin) => { + this.getSkodaEStatus(vin).catch(() => { + this.log.error("get skodae status Failed"); }); - } - updateStatus() { - if (this.config.type === "go") { - this.getVehicles(); - return; - } else if (this.config.type === "skodae") { - this.vinArray.forEach((vin) => { - this.getSkodaEStatus(vin).catch(() => { - this.log.error("get skodae status Failed"); - }); - }); - } else if (this.config.type === "audidata") { - this.vinArray.forEach((vin) => { - this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status Failed"); - }); - }); - } else if (this.config.type === "id") { - this.vinArray.forEach((vin) => { - this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); - this.refreshIDToken().catch(() => {}); - }); - if (this.config.type === "id" && this.config.wc_access_token) { - this.getWcData(this.config.historyLimit); - } - }); - return; - } else if (this.config.type === "audietron") { - this.vinArray.forEach((vin) => { - this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); - this.refreshTokenv2().catch(() => {}); - }); - }); - return; - } else if (this.config.type === "seatcupra") { - this.vinArray.forEach((vin) => { - this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get seat status Failed"); - this.refreshSeatCupraToken().catch(() => {}); - }); - }); - return; - } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { - this.getElliData(this.config.type).catch(() => { - this.log.error("get elli Failed"); + }); + } else if (this.config.type === "audidata") { + this.vinArray.forEach((vin) => { + this.getAudiDataStatus(vin).catch(() => { + this.log.error("get audi data status Failed"); + }); + }); + } else if (this.config.type === "id") { + this.vinArray.forEach((vin) => { + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + this.refreshIDToken().catch(() => {}); + }); + if (this.config.type === "id" && this.config.wc_access_token) { + this.getWcData(this.config.historyLimit); + } + }); + return; + } else if (this.config.type === "audietron") { + this.vinArray.forEach((vin) => { + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + this.refreshTokenv2().catch(() => {}); + }); + }); + return; + } else if (this.config.type === "seatcupra") { + this.vinArray.forEach((vin) => { + this.getSeatCupraStatus(vin).catch(() => { + this.log.error("get seat status Failed"); + this.refreshSeatCupraToken().catch(() => {}); + }); + }); + return; + } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { + this.getElliData(this.config.type).catch(() => { + this.log.error("get elli Failed"); + }); + + return; + } else { + this.vinArray.forEach((vin) => { + this.statesArray.forEach((state) => { + if (state.path == "tripdata") { + this.tripTypes.forEach((tripType) => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { + this.log.debug("error while getting " + state.url); + }); }); - - return; - } else { - this.vinArray.forEach((vin) => { - this.statesArray.forEach((state) => { - if (state.path == "tripdata") { - this.tripTypes.forEach((tripType) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - } else { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { - this.log.debug("error while getting " + state.url); - }); - } - }); + } else { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => { + this.log.debug("error while getting " + state.url); }); - } - } - receiveLoginUrl() { - return new Promise((resolve, reject) => { - request( - { - method: "GET", - url: "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", - headers: { - Host: "login.apps.emea.vwapps.io", - "user-agent": this.userAgent, - accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", - "accept-language": "de-de", - }, - jar: this.jar, - gzip: true, - followAllRedirects: false, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed in receive login url "); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - resolve(resp.request.href); - } - ); + } }); + }); } - replaceVarInUrl(url, vin, tripType) { - const curHomeRegion = this.homeRegion[vin]; - return url - .replace("/$vin", "/" + vin + "") - .replace("$homeregion/", curHomeRegion + "/") - .replace("/$type/", "/" + this.type + "/") - .replace("/$country/", "/" + this.country + "/") - .replace("/$tripType", "/" + tripType); - } - getQmauth() { - const timestamp = parseInt(Date.now() / 100000); - this.log.debug(timestamp.toString()); - //credits to https://github.com/arjenvrh/audi_connect_ha/blob/master/custom_components/audiconnect/audi_services.py - const xqmauth_secret = Buffer.from([ - 256 - 28, - 120, - 102, - 55, - 256 - 114, - 256 - 16, - 101, - 256 - 116, - 256 - 25, - 93, - 113, - 0, - 122, - 256 - 128, - 256 - 97, - 52, - 97, - 107, - 256 - 106, - 53, - 256 - 30, - 256 - 20, - 34, - 256 - 126, - 69, - 120, - 76, - 31, - 99, - 256 - 24, - 256 - 115, - 6, - ]); - const xqmauth_val = crypto.createHmac("sha256", xqmauth_secret).update(timestamp.toString()).digest("hex"); - this.log.debug(timestamp.toString()); - return "v1:c95f4fd2:" + xqmauth_val; - } - getTokensv2(getRequest, code_verifier, reject, resolve) { - const url = getRequest.uri.query; - const queries = qs.parse(url); - const body = { - client_id: this.clientId, - grant_type: "authorization_code", - code: queries.code, - redirect_uri: "myaudi:///", - response_type: "token id_token", - code_verifier: code_verifier, - }; - const qmAuth = this.getQmauth(); - this.log.debug(qmAuth); - + } + receiveLoginUrl() { + return new Promise((resolve, reject) => { + request( + { + method: "GET", + url: "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", + headers: { + Host: "login.apps.emea.vwapps.io", + "user-agent": this.userAgent, + accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "accept-language": "de-de", + }, + jar: this.jar, + gzip: true, + followAllRedirects: false, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed in receive login url "); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + resolve(resp.request.href); + } + ); + }); + } + replaceVarInUrl(url, vin, tripType) { + const curHomeRegion = this.homeRegion[vin]; + return url + .replace("/$vin", "/" + vin + "") + .replace("$homeregion/", curHomeRegion + "/") + .replace("/$type/", "/" + this.type + "/") + .replace("/$country/", "/" + this.country + "/") + .replace("/$tripType", "/" + tripType); + } + getQmauth() { + const timestamp = parseInt(Date.now() / 100000); + this.log.debug(timestamp.toString()); + //credits to https://github.com/arjenvrh/audi_connect_ha/blob/master/custom_components/audiconnect/audi_services.py + const xqmauth_secret = Buffer.from([ + 256 - 28, + 120, + 102, + 55, + 256 - 114, + 256 - 16, + 101, + 256 - 116, + 256 - 25, + 93, + 113, + 0, + 122, + 256 - 128, + 256 - 97, + 52, + 97, + 107, + 256 - 106, + 53, + 256 - 30, + 256 - 20, + 34, + 256 - 126, + 69, + 120, + 76, + 31, + 99, + 256 - 24, + 256 - 115, + 6, + ]); + const xqmauth_val = crypto.createHmac("sha256", xqmauth_secret).update(timestamp.toString()).digest("hex"); + this.log.debug(timestamp.toString()); + return "v1:c95f4fd2:" + xqmauth_val; + } + getTokensv2(getRequest, code_verifier, reject, resolve) { + const url = getRequest.uri.query; + const queries = qs.parse(url); + const body = { + client_id: this.clientId, + grant_type: "authorization_code", + code: queries.code, + redirect_uri: "myaudi:///", + response_type: "token id_token", + code_verifier: code_verifier, + }; + const qmAuth = this.getQmauth(); + this.log.debug(qmAuth); + + request( + { + method: "POST", + url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", + headers: { + accept: "application/json", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + "accept-charset": "utf-8", + "x-qmauth": qmAuth, + "accept-language": "de-de", + "user-agent": this.userAgent, + }, + jar: this.jar, + gzip: true, + followAllRedirects: true, + body: qs.stringify(body), + }, + (err, resp) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed in get tokensv2 "); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + resp && resp.body && this.log.error(JSON.stringify(resp.body)); + reject(); + return; + } + const idktokens = JSON.parse(resp.body); + this.config.atoken = idktokens.access_token; + this.config.rtoken = idktokens.refresh_token; request( - { - method: "POST", - url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", - headers: { - accept: "application/json", - "content-type": "application/x-www-form-urlencoded; charset=utf-8", - "accept-charset": "utf-8", - "x-qmauth": qmAuth, - "accept-language": "de-de", - "user-agent": this.userAgent, - }, - jar: this.jar, - gzip: true, - followAllRedirects: true, - body: qs.stringify(body), + { + method: "POST", + url: "https://aazsproxy-service.apps.emea.vwapps.io/token", + headers: { + accept: "application/json", + "content-type": "application/json; charset=utf-8", + "accept-charset": "utf-8", + "x-app-version": "4.6.0", + "x-app-name": "myAudi", + "accept-language": "de-de", + "user-agent": this.userAgent, }, - (err, resp) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed in get tokensv2 "); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - resp && resp.body && this.log.error(JSON.stringify(resp.body)); - reject(); - return; - } - const idktokens = JSON.parse(resp.body); - this.config.atoken = idktokens.access_token; - this.config.rtoken = idktokens.refresh_token; - request( - { - method: "POST", - url: "https://aazsproxy-service.apps.emea.vwapps.io/token", - headers: { - accept: "application/json", - "content-type": "application/json; charset=utf-8", - "accept-charset": "utf-8", - "x-app-version": "4.6.0", - "x-app-name": "myAudi", - "accept-language": "de-de", - "user-agent": this.userAgent, - }, - jar: this.jar, - gzip: true, - followAllRedirects: false, - body: JSON.stringify({ - token: this.config.atoken, - grant_type: "id_token", - stage: "live", - config: "myaudi", - }), - }, - (err, resp) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("failed get audi token"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.aaztoken = JSON.parse(resp.body); - this.refreshTokenInterval && clearInterval(this.refreshTokenInterval); - this.refreshTokenInterval = setInterval(() => { - this.refreshTokenv2().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours - - resolve(); - } - ); + jar: this.jar, + gzip: true, + followAllRedirects: false, + body: JSON.stringify({ + token: this.config.atoken, + grant_type: "id_token", + stage: "live", + config: "myaudi", + }), + }, + (err, resp) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("failed get audi token"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; } + this.aaztoken = JSON.parse(resp.body); + this.refreshTokenInterval && clearInterval(this.refreshTokenInterval); + this.refreshTokenInterval = setInterval(() => { + this.refreshTokenv2().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + + resolve(); + } ); + } + ); + } + getTokens(getRequest, code_verifier, reject, resolve) { + if (this.config.type === "audietron") { + this.getTokensv2(getRequest, code_verifier, reject, resolve); + return; } - getTokens(getRequest, code_verifier, reject, resolve) { - if (this.config.type === "audietron") { - this.getTokensv2(getRequest, code_verifier, reject, resolve); - return; + + let hash = ""; + if (getRequest.uri.hash) { + hash = getRequest.uri.hash; + } else { + hash = getRequest.uri.query; + } + const hashArray = hash.split("&"); + // eslint-disable-next-line no-unused-vars + let state; + let jwtauth_code; + let jwtaccess_token; + let jwtid_token; + let jwtstate; + hashArray.forEach((hash) => { + const harray = hash.split("="); + if (harray[0] === "#state" || harray[0] === "state") { + state = harray[1]; + } + if (harray[0] === "code") { + jwtauth_code = harray[1]; + } + if (harray[0] === "access_token") { + jwtaccess_token = harray[1]; + } + if (harray[0] === "id_token") { + jwtid_token = harray[1]; + } + if (harray[0] === "#state") { + jwtstate = harray[1]; + } + }); + // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); + // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); + // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); + // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); + let method = "POST"; + let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; + let headers = { + // "user-agent": this.userAgent, + "X-App-version": this.xappversion, + "content-type": "application/x-www-form-urlencoded", + "x-app-name": this.xappname, + accept: "application/json", + }; + if (this.config.type === "vw" || this.config.type === "vwv2") { + body += "&code_verifier=" + code_verifier; + } else { + const brand = this.config.type === "skodae" ? "skoda" : this.config.type; + + body += "&brand=" + brand; + } + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = + "code=" + + jwtauth_code + + "&client_id=" + + this.clientId + + "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + + code_verifier; + } + if (this.config.type === "seatcupra") { + url = "https://identity.vwgroup.io/oidc/v1/token"; + body = + "code=" + + jwtauth_code + + "&client_id=" + + this.clientId + + "&redirect_uri=" + + this.redirect + + "&grant_type=authorization_code&code_verifier=" + + code_verifier; + headers = { + accept: "*/*", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + authorization: + "Basic M2M3NTZkNDYtZjFiYS00ZDc4LTlmOWEtY2ZmMGQ1MjkyZDUxQGFwcHNfdnctZGlsYWJfY29tOmViODgxNGU2NDFjODFhMjY0MGFkNjJlZWNjZWMxMWM5OGVmZmM5YmNjZDQyNjlhYjdhZjMzOGI1MGE5NGIzYTI=", + "user-agent": "CUPRAApp%20-%20Store/20220207 CFNetwork/1240.0.4 Darwin/20.6.0", + "accept-language": "de-de", + }; + } + if (this.config.type === "audidata") { + url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = + "code=" + + jwtauth_code + + "&client_id=" + + this.clientId + + "&redirect_uri=acpp://de.audi.connectplugandplay/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + + code_verifier; + } + if (this.config.type === "id") { + url = "https://login.apps.emea.vwapps.io/login/v1"; + let redirerctUri = "weconnect://authenticated"; + + body = JSON.stringify({ + state: jwtstate, + id_token: jwtid_token, + redirect_uri: redirerctUri, + region: "emea", + access_token: jwtaccess_token, + authorizationCode: jwtauth_code, + }); + // @ts-ignore + headers = { + accept: "*/*", + "content-type": "application/json", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": this.userAgent, + "accept-language": "de-de", + }; + if (this.type === "Wc") { + method = "GET"; + url = "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + jwtauth_code; + redirerctUri = "wecharge://authenticated"; + headers["x-api-key"] = "yabajourasW9N8sm+9F/oP=="; + } + } + if (this.config.type === "audi") { + this.getVWToken({}, jwtid_token, reject, resolve); + return; + } + if (this.config.type === "seatelli" || this.config.type === "skodapower") { + url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdKit"; + let brand = "seat"; + let redirect = "Seat-elli-hub://opid"; + if (this.config.type === "skodapower") { + brand = "skoda"; + redirect = "skoda-hub://opid"; + } + body = JSON.stringify({ + brand: brand, + grant_type: "authorization_code", + code: jwtauth_code, + redirect_uri: redirect, + code_verifier: code_verifier, + }); + // @ts-ignore + headers = { + "Content-Type": "application/json", + Accept: "application/json", + "User-Agent": this.userAgent, + "Accept-Language": "de-DE", + }; + } + request( + { + method: method, + url: url, + headers: headers, + body: body, + jar: this.jar, + gzip: true, + followAllRedirects: false, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to get token"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; } + try { + const tokens = JSON.parse(body); - let hash = ""; - if (getRequest.uri.hash) { - hash = getRequest.uri.hash; - } else { - hash = getRequest.uri.query; + this.getVWToken(tokens, jwtid_token, reject, resolve); + } catch (err) { + this.log.error(err); + reject(); } - const hashArray = hash.split("&"); - // eslint-disable-next-line no-unused-vars - let state; - let jwtauth_code; - let jwtaccess_token; - let jwtid_token; - let jwtstate; - hashArray.forEach((hash) => { - const harray = hash.split("="); - if (harray[0] === "#state" || harray[0] === "state") { - state = harray[1]; - } - if (harray[0] === "code") { - jwtauth_code = harray[1]; - } - if (harray[0] === "access_token") { - jwtaccess_token = harray[1]; - } - if (harray[0] === "id_token") { - jwtid_token = harray[1]; - } - if (harray[0] === "#state") { - jwtstate = harray[1]; - } - }); - // const state = hashArray[0].substring(hashArray[0].indexOf("=") + 1); - // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); - // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); - // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); - let method = "POST"; - let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; - let headers = { - // "user-agent": this.userAgent, - "X-App-version": this.xappversion, - "content-type": "application/x-www-form-urlencoded", - "x-app-name": this.xappname, - accept: "application/json", - }; - if (this.config.type === "vw" || this.config.type === "vwv2") { - body += "&code_verifier=" + code_verifier; - } else { - const brand = this.config.type === "skodae" ? "skoda" : this.config.type; - - body += "&brand=" + brand; - } - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = - "code=" + - jwtauth_code + - "&client_id=" + - this.clientId + - "&redirect_uri=vwconnect://de.volkswagen.vwconnect/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + - code_verifier; + } + ); + } + + getVWToken(tokens, jwtid_token, reject, resolve) { + if (this.config.type !== "audi") { + if (this.config.type === "id") { + if (this.type === "Wc") { + this.config.wc_access_token = tokens.wc_access_token; + this.config.wc_refresh_token = tokens.refresh_token; + this.log.info("Wallcharging login successfull"); + this.getWcData(this.config.historyLimit); + resolve(); + return; } - if (this.config.type === "seatcupra") { - url = "https://identity.vwgroup.io/oidc/v1/token"; - body = "code=" + jwtauth_code + "&client_id=" + this.clientId + "&redirect_uri=" + this.redirect + "&grant_type=authorization_code&code_verifier=" + code_verifier; - headers = { - accept: "*/*", - "content-type": "application/x-www-form-urlencoded; charset=utf-8", - authorization: "Basic M2M3NTZkNDYtZjFiYS00ZDc4LTlmOWEtY2ZmMGQ1MjkyZDUxQGFwcHNfdnctZGlsYWJfY29tOmViODgxNGU2NDFjODFhMjY0MGFkNjJlZWNjZWMxMWM5OGVmZmM5YmNjZDQyNjlhYjdhZjMzOGI1MGE5NGIzYTI=", - "user-agent": "CUPRAApp%20-%20Store/20220207 CFNetwork/1240.0.4 Darwin/20.6.0", - "accept-language": "de-de", - }; + this.config.atoken = tokens.accessToken; + this.config.rtoken = tokens.refreshToken; + + //configure for wallcharging login + + this.refreshTokenInterval = setInterval(() => { + this.refreshIDToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + this.log.info("ID login successfull"); + this.log.info(`History limit: ${this.config.historyLimit}, set to -1 to disable wallcharging login`); + if (this.config.historyLimit == -1) { + this.log.info("History limit is set to -1, no wall charging login"); + resolve(); + return; } - if (this.config.type === "audidata") { - url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = - "code=" + - jwtauth_code + - "&client_id=" + - this.clientId + - "&redirect_uri=acpp://de.audi.connectplugandplay/oauth2redirect/identitykit&grant_type=authorization_code&code_verifier=" + - code_verifier; - } - if (this.config.type === "id") { - url = "https://login.apps.emea.vwapps.io/login/v1"; - let redirerctUri = "weconnect://authenticated"; - - body = JSON.stringify({ - state: jwtstate, - id_token: jwtid_token, - redirect_uri: redirerctUri, - region: "emea", - access_token: jwtaccess_token, - authorizationCode: jwtauth_code, - }); - // @ts-ignore - headers = { - accept: "*/*", - "content-type": "application/json", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - }; - if (this.type === "Wc") { - method = "GET"; - url = "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + jwtauth_code; - redirerctUri = "wecharge://authenticated"; - headers["x-api-key"] = "yabajourasW9N8sm+9F/oP=="; - } + this.log.info("Start Wallcharging login"); + //this.config.type === "wc" + this.type = "Wc"; + this.country = "DE"; + this.clientId = "0fa5ae01-ebc0-4901-a2aa-4dd60572ea0e@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile address email"; + this.redirect = "wecharge://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + this.xappversion = ""; + this.xappname = ""; + this.login() + .then(() => { + this.log.info("Wallcharging login was successfull"); + }) + .catch(() => { + this.log.warn("Failled wall charger login"); + }); + resolve(); + return; + } + + this.config.atoken = tokens.access_token; + this.config.rtoken = tokens.refresh_token; + if (this.config.type === "seatelli" || this.config.type === "skodapower") { + this.config.atoken = tokens.token; + } + if (this.config.type === "seatcupra") { + if (this.refreshTokenInterval) { + clearInterval(this.refreshTokenInterval); } - if (this.config.type === "audi") { - this.getVWToken({}, jwtid_token, reject, resolve); - return; + this.refreshTokenInterval = setInterval(() => { + this.refreshSeatCupraToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + resolve(); + return; + } + if (this.refreshTokenInterval) { + clearInterval(this.refreshTokenInterval); + } + this.refreshTokenInterval = setInterval(() => { + this.refreshToken().catch(() => { + this.log.error("Refresh Token was not successful"); + }); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + } + if ( + this.config.type === "go" || + this.config.type === "id" || + this.config.type === "skodae" || + this.config.type === "seatcupra" || + this.config.type === "seatelli" || + this.config.type === "skodapower" || + this.config.type === "audietron" || + this.config.type === "audidata" + ) { + resolve(); + return; + } + request.post( + { + url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", + headers: { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Client-Id": this.xclientId, + Host: "mbboauth-1d.prd.ece.vwg-connect.com", + }, + form: { + grant_type: "id_token", + token: jwtid_token, + scope: "sc2:fal", + }, + jar: this.jar, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to get VWToken"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + resolve(); + return; } - if (this.config.type === "seatelli" || this.config.type === "skodapower") { - url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdKit"; - let brand = "seat"; - let redirect = "Seat-elli-hub://opid"; - if (this.config.type === "skodapower") { - brand = "skoda"; - redirect = "skoda-hub://opid"; - } - body = JSON.stringify({ - brand: brand, - grant_type: "authorization_code", - code: jwtauth_code, - redirect_uri: redirect, - code_verifier: code_verifier, + try { + const tokens = JSON.parse(body); + this.config.vwatoken = tokens.access_token; + this.config.vwrtoken = tokens.refresh_token; + if (this.vwrefreshTokenInterval) { + clearInterval(this.vwrefreshTokenInterval); + } + this.vwrefreshTokenInterval = setInterval(() => { + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); }); - // @ts-ignore - headers = { - "Content-Type": "application/json", - Accept: "application/json", - "User-Agent": this.userAgent, - "Accept-Language": "de-DE", - }; + }, 0.9 * 60 * 60 * 1000); //0.9hours + resolve(); + } catch (err) { + this.log.error(err); + reject(); } - request( - { - method: method, - url: url, - headers: headers, - body: body, - jar: this.jar, - gzip: true, - followAllRedirects: false, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to get token"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - const tokens = JSON.parse(body); - - this.getVWToken(tokens, jwtid_token, reject, resolve); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); + } + ); + } + + refreshToken(isVw) { + let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; + let rtoken = this.config.rtoken; + let body = "refresh_token=" + rtoken; + let form = ""; + let brand = this.config.type === "skodae" ? "skoda" : this.config.type; + if (this.config.type === "vwv2") { + brand = "vw"; } - getVWToken(tokens, jwtid_token, reject, resolve) { - if (this.config.type !== "audi") { - if (this.config.type === "id") { - if (this.type === "Wc") { - this.config.wc_access_token = tokens.wc_access_token; - this.config.wc_refresh_token = tokens.refresh_token; - this.log.info("Wallcharging login successfull"); - this.getWcData(this.config.historyLimit); - resolve(); - return; - } + body = "brand=" + brand + "&" + body; + let headers = { + "user-agent": this.userAgent, + "content-type": "application/x-www-form-urlencoded", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + "X-Client-Id": this.xclientId, + accept: "application/json", + }; + if (isVw) { + url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; + rtoken = this.config.vwrtoken; + body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; //+ "&vin=" + vin; + } else if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = ""; + // @ts-ignore + form = { + scope: "openid+profile+address+email+phone", + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: rtoken, + }; + } else if (this.config.type === "audidata") { + url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/token"; + body = ""; + // @ts-ignore + form = { + scope: "openid+profile+address+email+phone", + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: rtoken, + }; + } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { + url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdkit"; + body = JSON.stringify({ + brand: "seat", + grant_type: "refresh_token", + refresh_token: rtoken, + }); + // @ts-ignore + headers = { + "Content-Type": "application/json", + Accept: "application/json", + "user-agent": this.userAgent, + "Accept-Language": "de-DE", + }; + } + return new Promise((resolve, reject) => { + this.log.debug("refreshToken "); + this.log.debug(isVw ? "vw" : ""); + request.post( + { + url: url, + headers: headers, + body: body, + form: form, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to refresh token. "); + this.log.error(isVw ? "VwToken" : ""); + err && this.log.error(err); + body && this.log.error(body); + resp && this.log.error(resp.statusCode.toString()); + this.log.error("Restart adapter in 10min"); + setTimeout(() => { + this.restart(); + }, 10 * 60 * 1000); + + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + const tokens = JSON.parse(body); + if (tokens.error) { + this.log.error(JSON.stringify(body)); + clearTimeout(this.refreshTokenTimeout); + this.refreshTokenTimeout = setTimeout(() => { + this.refreshTokenTimeout = null; + this.refreshToken(isVw).catch(() => { + this.log.error("refresh token failed"); + }); + }, 5 * 60 * 1000); + reject(); + return; + } + if (isVw) { + this.config.vwatoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.vwrtoken = tokens.refresh_token; + } + } else { + this.config.atoken = tokens.access_token; + if (tokens.refresh_token) { + this.config.rtoken = tokens.refresh_token; + } + if (tokens.accessToken) { this.config.atoken = tokens.accessToken; this.config.rtoken = tokens.refreshToken; - - //configure for wallcharging login - - this.refreshTokenInterval = setInterval(() => { - this.refreshIDToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours - this.log.info("ID login successfull"); - this.log.info(`History limit: ${this.config.historyLimit}, set to -1 to disable wallcharging login`); - if (this.config.historyLimit == -1) { - this.log.info("History limit is set to -1, no wall charging login"); - resolve(); - return; - } - this.log.info("Start Wallcharging login"); - //this.config.type === "wc" - this.type = "Wc"; - this.country = "DE"; - this.clientId = "0fa5ae01-ebc0-4901-a2aa-4dd60572ea0e@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid profile address email"; - this.redirect = "wecharge://authenticated"; - this.xrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - this.xappversion = ""; - this.xappname = ""; - this.login() - .then(() => { - this.log.info("Wallcharging login was successfull"); - }) - .catch(() => { - this.log.warn("Failled wall charger login"); - }); - resolve(); - return; - } - - this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; - if (this.config.type === "seatelli" || this.config.type === "skodapower") { + } + if (tokens.token) { this.config.atoken = tokens.token; + } } - if (this.config.type === "seatcupra") { - if (this.refreshTokenInterval) { - clearInterval(this.refreshTokenInterval); - } - this.refreshTokenInterval = setInterval(() => { - this.refreshSeatCupraToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours + resolve(); + } catch (err) { + this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); + this.log.error(err); + this.log.error(JSON.stringify(body)); + this.log.error(resp.statusCode.toString()); + this.log.error(err.stack); + this.restart(); + } + } + ); + }); + } + + getPersonalData() { + return new Promise((resolve, reject) => { + if ( + this.config.type === "audi" || + this.config.type === "go" || + this.config.type === "audidata" || + this.config.type === "audietron" || + this.config.type === "id" || + this.config.type === "seatelli" || + this.config.type === "skodapower" + ) { + resolve(); + return; + } + if (this.config.type === "seatcupra") { + request.get( + { + url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", + headers: { + "user-agent": this.userAgent, + authorization: "Bearer " + this.config.atoken, + accept: "*/*", + }, + followAllRedirects: true, + json: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + if (body.sub) { + this.seatcupraUser = body.sub; resolve(); - return; + } else { + this.log.error("No User ID found"); + reject(); + } + } catch (err) { + this.log.error(err); + reject(); } - if (this.refreshTokenInterval) { - clearInterval(this.refreshTokenInterval); + } + ); + return; + } + + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", + headers: { + "user-agent": this.userAgent, + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.atoken, + accept: "application/json", + Host: "customer-profile.apps.emea.vwapps.io", + }, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); } - this.refreshTokenInterval = setInterval(() => { - this.refreshToken().catch(() => { - this.log.error("Refresh Token was not successful"); + this.log.debug(JSON.stringify(body)); + const data = JSON.parse(body); + this.config.identifier = data.businessIdentifierValue; + Object.keys(data).forEach((key) => { + this.setObjectNotExistsAsync("personal." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState("personal." + key, data[key], true); + }) + .catch((error) => { + this.log.error(error); }); - }, 0.9 * 60 * 60 * 1000); // 0.9hours - } - if ( - this.config.type === "go" || - this.config.type === "id" || - this.config.type === "skodae" || - this.config.type === "seatcupra" || - this.config.type === "seatelli" || - this.config.type === "skodapower" || - this.config.type === "audietron" || - this.config.type === "audidata" - ) { + }); + resolve(); - return; + } catch (err) { + this.log.error(err); + reject(); + } } - request.post( - { - url: "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token", - headers: { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Client-Id": this.xclientId, - Host: "mbboauth-1d.prd.ece.vwg-connect.com", - }, - form: { - grant_type: "id_token", - token: jwtid_token, - scope: "sc2:fal", - }, - jar: this.jar, - gzip: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to get VWToken"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - resolve(); - return; - } - try { - const tokens = JSON.parse(body); - this.config.vwatoken = tokens.access_token; - this.config.vwrtoken = tokens.refresh_token; - if (this.vwrefreshTokenInterval) { - clearInterval(this.vwrefreshTokenInterval); - } - this.vwrefreshTokenInterval = setInterval(() => { - this.refreshToken(true).catch(() => { - this.log.error("Refresh Token was not successful"); - }); - }, 0.9 * 60 * 60 * 1000); //0.9hours - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } + ); + }); + } + getHomeRegion(vin) { + return new Promise((resolve, reject) => { + this.log.debug("getHomeRegion"); + request.get( + { + url: "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/" + vin + "/homeRegion", + headers: { + "user-agent": this.userAgent, + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + accept: "application/json", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); } - ); - } - - refreshToken(isVw) { - let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; - let rtoken = this.config.rtoken; - let body = "refresh_token=" + rtoken; - let form = ""; - let brand = this.config.type === "skodae" ? "skoda" : this.config.type; - if (this.config.type === "vwv2") { - brand = "vw"; + this.log.debug(vin + ": " + JSON.stringify(body)); + this.homeRegion[vin] = "https://msg.volkswagen.de"; + if (body.homeRegion && body.homeRegion.baseUri && body.homeRegion.baseUri.content) { + if (body.homeRegion.baseUri.content !== "https://mal-1a.prd.ece.vwg-connect.com/api") { + this.homeRegion[vin] = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); + this.homeRegionSetter[vin] = body.homeRegion.baseUri.content.split("/api")[0]; + this.log.debug("Set URL to: " + this.homeRegion[vin]); + } + } + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } } - - body = "brand=" + brand + "&" + body; - let headers = { + ); + }); + } + getCarData() { + return new Promise((resolve, reject) => { + this.log.debug("getData"); + request.get( + { + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", + headers: { "user-agent": this.userAgent, - "content-type": "application/x-www-form-urlencoded", "X-App-version": this.xappversion, "X-App-name": this.xappname, - "X-Client-Id": this.xclientId, + authorization: "Bearer " + this.config.atoken, accept: "application/json", - }; - if (isVw) { - url = "https://mbboauth-1d.prd.ece.vwg-connect.com/mbbcoauth/mobile/oauth2/v1/token"; - rtoken = this.config.vwrtoken; - body = "grant_type=refresh_token&scope=sc2%3Afal&token=" + rtoken; //+ "&vin=" + vin; - } else if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = ""; - // @ts-ignore - form = { - scope: "openid+profile+address+email+phone", - client_id: this.clientId, - grant_type: "refresh_token", - refresh_token: rtoken, - }; - } else if (this.config.type === "audidata") { - url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/token"; - body = ""; - // @ts-ignore - form = { - scope: "openid+profile+address+email+phone", - client_id: this.clientId, - grant_type: "refresh_token", - refresh_token: rtoken, - }; - } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { - url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdkit"; - body = JSON.stringify({ - brand: "seat", - grant_type: "refresh_token", - refresh_token: rtoken, + Host: "customer-profile.apps.emea.vwapps.io", + }, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(JSON.stringify(body)); + const data = JSON.parse(body); + Object.keys(data).forEach((key) => { + this.setObjectNotExistsAsync("car." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState("car." + key, data[key], true); + }) + .catch((error) => { + this.log.error(error); + }); }); - // @ts-ignore - headers = { - "Content-Type": "application/json", - Accept: "application/json", - "user-agent": this.userAgent, - "Accept-Language": "de-DE", - }; + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } } - return new Promise((resolve, reject) => { - this.log.debug("refreshToken "); - this.log.debug(isVw ? "vw" : ""); - request.post( - { - url: url, - headers: headers, - body: body, - form: form, - gzip: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to refresh token. "); - this.log.error(isVw ? "VwToken" : ""); - err && this.log.error(err); - body && this.log.error(body); - resp && this.log.error(resp.statusCode.toString()); - this.log.error("Restart adapter in 10min"); - setTimeout(() => { - this.restart(); - }, 10 * 60 * 1000); + ); + }); + } + + getVehicles() { + return new Promise((resolve, reject) => { + if (this.config.type === "seatelli" || this.config.type === "skodapower") { + resolve(); + return; + } + let method = "get"; + let body = {}; + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); + let headers = { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json", + }; + if (this.config.type === "go") { + url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + // @ts-ignore + headers = { + "user-agent": "okhttp/3.9.1", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": "Android/7.0/VW Connect/App/2.9.4", + accept: "application/json;charset=UTF-8", + }; + } + if (this.config.type === "audidata") { + url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; + // @ts-ignore + headers = { + "user-agent": "okhttp/3.9.1", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": this.userAgent, + accept: "application/json;charset=UTF-8", + }; + } + if (this.config.type === "audietron") { + method = "post"; + url = "https://app-api.live-my.audi.com/vgql/v1/graphql"; + // @ts-ignore + headers = { + "user-agent": this.userAgent, + authorization: "Bearer " + this.aaztoken.access_token, + "accept-language": "de-DE", + "dmp-api-version": "v2.0", + "dmp-client-info": this.userAgent, + accept: "application/json;charset=UTF-8", + }; + body = { + query: + "query vehicleList {\n userVehicles {\n vin\n mappingVin\n csid\n commissionNumber\n type\n devicePlatform\n mbbConnect\n userRole {\n role\n }\n vehicle {\n classification {\n driveTrain\n }\n }\n nickname\n }\n}", + }; + } + if (this.config.type === "id") { + url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; + // @ts-ignore + headers = { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }; + } + if (this.config.type === "skodae") { + url = "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles"; + // @ts-ignore + headers = { + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }; + } + if (this.config.type === "seatcupra") { + url = "https://ola.prod.code.seat.cloud.vwgroup.com/v1/users/" + this.seatcupraUser + "/garage/vehicles"; + // @ts-ignore + headers = { + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }; + } + request( + { + method: method, + url: url, + headers: headers, + followAllRedirects: true, + gzip: true, + json: true, + ...(Object.keys(body).length && { body }), + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + } + err && this.log.error(err); + body && this.log.error(JSON.stringify(body)); + resp && this.log.error(resp.statusCode.toString()); + reject(); + return; + } + try { + if (body.errorCode) { + this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + if (this.config.type === "id") { + body.data.forEach((element) => { + const vin = element.vin; + if (!vin) { + this.log.info("No vin found for:" + JSON.stringify(element)); + return; + } + this.vinArray.push(vin); + this.setObjectNotExists(element.vin, { + type: "device", + common: { + name: element.nickname, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.extractKeys(this, vin + ".general", element); + + this.setObjectNotExists(vin + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.charging", { + type: "state", + common: { + name: "Start/Stop Battery Charge", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); - reject(); - return; + this.setObjectNotExists(vin + ".remote.climatisation", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + }); + resolve(); + return; + } + if (this.config.type === "go") { + body.forEach((element) => { + const vin = element.vehicle.vin; + this.setObjectNotExists(element.vehicle.vin, { + type: "device", + common: { + name: element.licencePlate, + role: "indicator", + type: "mixed", + write: false, + + read: true, + }, + native: {}, + }); + const adapter = this; + + traverse(element).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + let name = this.key; + if (typeof this.key === "number") { + name = this.key.toString(); } - try { - this.log.debug(JSON.stringify(body)); - const tokens = JSON.parse(body); - if (tokens.error) { - this.log.error(JSON.stringify(body)); - clearTimeout(this.refreshTokenTimeout); - this.refreshTokenTimeout = setTimeout(() => { - this.refreshTokenTimeout = null; - this.refreshToken(isVw).catch(() => { - this.log.error("refresh token failed"); - }); - }, 5 * 60 * 1000); - reject(); - return; - } - if (isVw) { - this.config.vwatoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.vwrtoken = tokens.refresh_token; - } - } else { - this.config.atoken = tokens.access_token; - if (tokens.refresh_token) { - this.config.rtoken = tokens.refresh_token; - } - if (tokens.accessToken) { - this.config.atoken = tokens.accessToken; - this.config.rtoken = tokens.refreshToken; - } - if (tokens.token) { - this.config.atoken = tokens.token; - } + adapter + .setObjectNotExistsAsync(vin + ".status." + modPath.join("."), { + type: "state", + common: { + name: name, + role: "indicator", + type: typeof value, + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + if (typeof value === "object") { + value = JSON.stringify(value); } - resolve(); - } catch (err) { - this.log.error("Failing to parse refresh token. The instance will do restart and try a relogin."); - this.log.error(err); - this.log.error(JSON.stringify(body)); - this.log.error(resp.statusCode.toString()); - this.log.error(err.stack); - this.restart(); - } + adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); + }) + .catch((error) => { + adapter.log.error(error); + }); + } + }); + }); + resolve(); + return; + } + if (this.config.type === "audidata") { + body.forEach(async (element) => { + const vin = element.vehicle.vin; + this.vinArray.push(vin); + await this.setObjectNotExistsAsync(vin, { + type: "device", + common: { + name: vin, + role: "indicator", + type: "string", + write: false, + read: true, + }, + native: {}, + }); + }); + resolve(); + return; + } + if (this.config.type === "seatcupra") { + body.vehicles.forEach((element) => { + const vin = element.vin; + if (!vin) { + this.log.info("No vin found for:" + JSON.stringify(element)); + return; } - ); - }); - } + this.vinArray.push(vin); + this.setObjectNotExists(element.vin, { + type: "device", + common: { + name: element.vehicleNickname, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.extractKeys(this, vin + ".general", element); + + this.setObjectNotExists(vin + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.charging", { + type: "state", + common: { + name: "Start/Stop Battery Charge", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); - getPersonalData() { - return new Promise((resolve, reject) => { - if ( - this.config.type === "audi" || - this.config.type === "go" || - this.config.type === "audidata" || - this.config.type === "audietron" || - this.config.type === "id" || - this.config.type === "seatelli" || - this.config.type === "skodapower" - ) { - resolve(); - return; + this.setObjectNotExists(vin + ".remote.climatisation", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + }); + resolve(); + return; } - if (this.config.type === "seatcupra") { - request.get( - { - url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", - headers: { - "user-agent": this.userAgent, - authorization: "Bearer " + this.config.atoken, - accept: "*/*", - }, - followAllRedirects: true, - json: true, - gzip: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - if (body.sub) { - this.seatcupraUser = body.sub; - resolve(); - } else { - this.log.error("No User ID found"); - reject(); - } - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - return; + if (this.config.type === "skodae") { + body.forEach(async (element) => { + const vin = element.vin; + this.vinArray.push(vin); + await this.setObjectNotExistsAsync(element.vin, { + type: "device", + common: { + name: element.specification.title, + role: "indicator", + type: "string", + write: false, + read: true, + }, + native: {}, + }); + + this.extractKeys(this, element.vin + ".general", element).catch((error) => { + this.log.error("Failed to extract"); + this.log.error(error); + }); + + this.setObjectNotExists(vin + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.charging", { + type: "state", + common: { + name: "Start/Stop Battery Charge", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.air-conditioning", { + type: "state", + common: { + name: "Start/Stop Air-conditioning", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.targetTemperatureInCelsius", { + type: "state", + common: { + name: "Air-conditioning Temp in Celsius", + type: "number", + role: "value.temperature", + write: true, + }, + native: {}, + }); + }); + resolve(); + return; } - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", - headers: { - "user-agent": this.userAgent, - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io", - }, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - const data = JSON.parse(body); - this.config.identifier = data.businessIdentifierValue; - Object.keys(data).forEach((key) => { - this.setObjectNotExistsAsync("personal." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState("personal." + key, data[key], true); - }) - .catch((error) => { - this.log.error(error); - }); - }); + if (this.config.type === "audietron") { + if (body.errors) { + this.log.error(JSON.stringify(body.errors)); + reject(); + return; + } + body.data.userVehicles.forEach(async (element) => { + const vin = element.vin; + this.vinArray.push(vin); + await this.setObjectNotExistsAsync(element.vin, { + type: "device", + common: { + name: element.nickname, + role: "indicator", + type: "string", + write: false, + read: true, + }, + native: {}, + }); - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } - getHomeRegion(vin) { - return new Promise((resolve, reject) => { - this.log.debug("getHomeRegion"); - request.get( - { - url: "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/" + vin + "/homeRegion", - headers: { - "user-agent": this.userAgent, - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - accept: "application/json", - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(vin + ": " + JSON.stringify(body)); - this.homeRegion[vin] = "https://msg.volkswagen.de"; - if (body.homeRegion && body.homeRegion.baseUri && body.homeRegion.baseUri.content) { - if (body.homeRegion.baseUri.content !== "https://mal-1a.prd.ece.vwg-connect.com/api") { - this.homeRegion[vin] = body.homeRegion.baseUri.content.split("/api")[0].replace("mal-", "fal-"); - this.homeRegionSetter[vin] = body.homeRegion.baseUri.content.split("/api")[0]; - this.log.debug("Set URL to: " + this.homeRegion[vin]); - } - } - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } - getCarData() { - return new Promise((resolve, reject) => { - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", - headers: { - "user-agent": this.userAgent, - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io", - }, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - const data = JSON.parse(body); - Object.keys(data).forEach((key) => { - this.setObjectNotExistsAsync("car." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState("car." + key, data[key], true); - }) - .catch((error) => { - this.log.error(error); - }); - }); + this.extractKeys(this, element.vin + ".general", element).catch((error) => { + this.log.error("Failed to extract"); + this.log.error(error); + }); - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } + this.setObjectNotExists(element.vin, { + type: "device", + common: { + name: element.nickname, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.extractKeys(this, vin + ".general", element); + + this.setObjectNotExists(vin + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.charging", { + type: "state", + common: { + name: "Start/Stop Battery Charge", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); - getVehicles() { - return new Promise((resolve, reject) => { - if (this.config.type === "seatelli" || this.config.type === "skodapower") { - resolve(); - return; - } - let method = "get"; - let body = {}; - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); - let headers = { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json", - }; - if (this.config.type === "go") { - url = "https://dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; - // @ts-ignore - headers = { - "user-agent": "okhttp/3.9.1", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE", - "dmp-api-version": "v2.0", - "dmp-client-info": "Android/7.0/VW Connect/App/2.9.4", - accept: "application/json;charset=UTF-8", - }; - } - if (this.config.type === "audidata") { - url = "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicles"; - // @ts-ignore - headers = { - "user-agent": "okhttp/3.9.1", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE", - "dmp-api-version": "v2.0", - "dmp-client-info": this.userAgent, - accept: "application/json;charset=UTF-8", - }; - } - if (this.config.type === "audietron") { - method = "post"; - url = "https://app-api.live-my.audi.com/vgql/v1/graphql"; - // @ts-ignore - headers = { - "user-agent": this.userAgent, - authorization: "Bearer " + this.aaztoken.access_token, - "accept-language": "de-DE", - "dmp-api-version": "v2.0", - "dmp-client-info": this.userAgent, - accept: "application/json;charset=UTF-8", - }; - body = { - query: "query vehicleList {\n userVehicles {\n vin\n mappingVin\n csid\n commissionNumber\n type\n devicePlatform\n mbbConnect\n userRole {\n role\n }\n vehicle {\n classification {\n driveTrain\n }\n }\n nickname\n }\n}", - }; - } - if (this.config.type === "id") { - url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; - // @ts-ignore - headers = { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }; - } - if (this.config.type === "skodae") { - url = "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles"; - // @ts-ignore - headers = { - accept: "application/json", - "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }; + this.setObjectNotExists(vin + ".remote.climatisation", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); + }); + resolve(); + return; } - if (this.config.type === "seatcupra") { - url = "https://ola.prod.code.seat.cloud.vwgroup.com/v1/users/" + this.seatcupraUser + "/garage/vehicles"; - // @ts-ignore - headers = { - accept: "application/json", - "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }; + if (!body.userVehicles) { + this.log.info("No Vehicles found"); + resolve(); + return; } - request( - { - method: method, - url: url, - headers: headers, - followAllRedirects: true, - gzip: true, - json: true, - ...(Object.keys(body).length && { body }), + const vehicles = body.userVehicles.vehicle; + vehicles.forEach((vehicle) => { + this.vinArray.push(vehicle); + this.setObjectNotExists(vehicle, { + type: "device", + common: { + name: vehicle.title, + role: "indicator", + type: "mixed", + write: false, + read: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); - } - err && this.log.error(err); - body && this.log.error(JSON.stringify(body)); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - if (body.errorCode) { - this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - if (this.config.type === "id") { - body.data.forEach((element) => { - const vin = element.vin; - if (!vin) { - this.log.info("No vin found for:" + JSON.stringify(element)); - return; - } - this.vinArray.push(vin); - this.setObjectNotExists(element.vin, { - type: "device", - common: { - name: element.nickname, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.extractKeys(this, vin + ".general", element); - - this.setObjectNotExists(vin + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.charging", { - type: "state", - common: { - name: "Start/Stop Battery Charge", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - - this.setObjectNotExists(vin + ".remote.climatisation", { - type: "state", - common: { - name: "Start/Stop Climatisation", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - }); - resolve(); - return; - } - if (this.config.type === "go") { - body.forEach((element) => { - const vin = element.vehicle.vin; - this.setObjectNotExists(element.vehicle.vin, { - type: "device", - common: { - name: element.licencePlate, - role: "indicator", - type: "mixed", - write: false, - - read: true, - }, - native: {}, - }); - const adapter = this; - - traverse(element).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - let name = this.key; - if (typeof this.key === "number") { - name = this.key.toString(); - } - adapter - .setObjectNotExistsAsync(vin + ".status." + modPath.join("."), { - type: "state", - common: { - name: name, - role: "indicator", - type: typeof value, - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(vin + ".status." + modPath.join("."), value || this.node, true); - }) - .catch((error) => { - adapter.log.error(error); - }); - } - }); - }); - resolve(); - return; - } - if (this.config.type === "audidata") { - body.forEach(async (element) => { - const vin = element.vehicle.vin; - this.vinArray.push(vin); - await this.setObjectNotExistsAsync(vin, { - type: "device", - common: { - name: vin, - role: "indicator", - type: "string", - write: false, - read: true, - }, - native: {}, - }); - }); - resolve(); - return; - } - if (this.config.type === "seatcupra") { - body.vehicles.forEach((element) => { - const vin = element.vin; - if (!vin) { - this.log.info("No vin found for:" + JSON.stringify(element)); - return; - } - this.vinArray.push(vin); - this.setObjectNotExists(element.vin, { - type: "device", - common: { - name: element.vehicleNickname, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.extractKeys(this, vin + ".general", element); - - this.setObjectNotExists(vin + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.charging", { - type: "state", - common: { - name: "Start/Stop Battery Charge", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - - this.setObjectNotExists(vin + ".remote.climatisation", { - type: "state", - common: { - name: "Start/Stop Climatisation", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - }); - resolve(); - return; - } - if (this.config.type === "skodae") { - body.forEach(async (element) => { - const vin = element.vin; - this.vinArray.push(vin); - await this.setObjectNotExistsAsync(element.vin, { - type: "device", - common: { - name: element.specification.title, - role: "indicator", - type: "string", - write: false, - read: true, - }, - native: {}, - }); - - this.extractKeys(this, element.vin + ".general", element).catch((error) => { - this.log.error("Failed to extract"); - this.log.error(error); - }); - - this.setObjectNotExists(vin + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.charging", { - type: "state", - common: { - name: "Start/Stop Battery Charge", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.air-conditioning", { - type: "state", - common: { - name: "Start/Stop Air-conditioning", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.targetTemperatureInCelsius", { - type: "state", - common: { - name: "Air-conditioning Temp in Celsius", - type: "number", - role: "value.temperature", - write: true, - }, - native: {}, - }); - }); - resolve(); - return; - } - - if (this.config.type === "audietron") { - if (body.errors) { - this.log.error(JSON.stringify(body.errors)); - reject(); - return; - } - body.data.userVehicles.forEach(async (element) => { - const vin = element.vin; - this.vinArray.push(vin); - await this.setObjectNotExistsAsync(element.vin, { - type: "device", - common: { - name: element.nickname, - role: "indicator", - type: "string", - write: false, - read: true, - }, - native: {}, - }); - - this.extractKeys(this, element.vin + ".general", element).catch((error) => { - this.log.error("Failed to extract"); - this.log.error(error); - }); - - this.setObjectNotExists(element.vin, { - type: "device", - common: { - name: element.nickname, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.extractKeys(this, vin + ".general", element); - - this.setObjectNotExists(vin + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.charging", { - type: "state", - common: { - name: "Start/Stop Battery Charge", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - - this.setObjectNotExists(vin + ".remote.climatisation", { - type: "state", - common: { - name: "Start/Stop Climatisation", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - }); - resolve(); - return; - } - if (!body.userVehicles) { - this.log.info("No Vehicles found"); - resolve(); - return; - } - const vehicles = body.userVehicles.vehicle; - vehicles.forEach((vehicle) => { - this.vinArray.push(vehicle); - this.setObjectNotExists(vehicle, { - type: "device", - common: { - name: vehicle.title, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote", { - type: "state", - common: { - name: "Remote controls", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.forceRefresh", { - type: "state", - common: { - name: "force Refresh", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.batterycharge", { - type: "state", - common: { - name: "Start Battery Charge", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.maxChargeCurrent", { - type: "state", - common: { - name: "Set maxChargeCurrent", - type: "number", - role: "number", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.chargeMinLimit", { - type: "state", - common: { - name: "Set chargeMinLimit", - type: "number", - role: "number", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.climatisation", { - type: "state", - common: { - name: "Start/Stop Climatisation", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.climatisationv2", { - type: "state", - common: { - name: "Start/Stop Climatisation v2", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.climatisationv3", { - type: "state", - common: { - name: "Start/Stop Climatisation v3", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { - type: "state", - common: { - name: "Temperature in °C", - type: "number", - role: "number", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.windowheating", { - type: "state", - common: { - name: "Start Windowheating", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.honk", { - type: "state", - common: { - name: "Start Honk", - type: "boolean", - role: "button", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.flash", { - type: "state", - common: { - name: "Start Flash", - type: "boolean", - role: "button", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.standheizung", { - type: "state", - common: { - name: "Standheizung aktiviert", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.lock", { - type: "state", - common: { - name: "Verriegeln (true) / Entriegeln (false)", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.ventilationv2", { - type: "state", - common: { - name: "Ventilation aktiviert/deaktivieren", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.ventilationv3", { - type: "state", - common: { - name: "Ventilation/Standheizung Audi aktiviert/deaktivieren", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.standheizungv2", { - type: "state", - common: { - name: "Standheizung aktiviert/deaktivieren", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.lockv2", { - type: "state", - common: { - name: "Verriegeln (true) / Entriegeln (false)", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.ventilation", { - type: "state", - common: { - name: "Start Ventilation", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vehicle + ".remote.ventilationDuration", { - type: "state", - common: { - name: "Dauer Lüftung in min", - role: "number", - write: true, - }, - native: {}, - }); - }); - resolve(); - } catch (err) { - this.log.error(err); - this.log.error(err.stack); - this.log.error("Not able to find vehicle, did you choose the correct type in the settings?"); - reject(); - } - } - ); - }); - } - getIdStatus(vin) { - return new Promise((resolve, reject) => { - request.get( - { - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/status", - - headers: { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote", { + type: "state", + common: { + name: "Remote controls", + write: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".status", body.data); - if (this.config.rawJson) { - this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { - type: "state", - common: { - name: vin + ".status" + "rawJson", - role: "state", - type: "json", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".status" + "rawJson", JSON.stringify(body.data), true); - }) - .catch((error) => { - this.log.error(error); - }); - } - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } - getSeatCupraStatus(vin) { - return new Promise((resolve, reject) => { - request.get( - { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + this.seatcupraUser + "/vehicles/" + vin + "/mycar", - - headers: { - accept: "*/*", - - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.forceRefresh", { + type: "state", + common: { + name: "force Refresh", + type: "boolean", + role: "boolean", + write: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".status", body); - if (this.config.rawJson) { - this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { - type: "state", - common: { - name: vin + ".status" + "rawJson", - role: "state", - type: "json", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".status" + "rawJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - } - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - - request.get( - { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/charging/status", - - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.batterycharge", { + type: "state", + common: { + name: "Start Battery Charge", + type: "boolean", + role: "switch", + write: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".charging", body.status); - } catch (err) { - this.log.error(err); - } - } - ); - request.get( - { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/climatisation/status", - - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.maxChargeCurrent", { + type: "state", + common: { + name: "Set maxChargeCurrent", + type: "number", + role: "number", + write: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".climatisation", body.data); - } catch (err) { - this.log.error(err); - } - } - ); - }); - } - setSeatCupraStatus(vin, action, state) { - return new Promise((resolve, reject) => { - request.post( - { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state, - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.chargeMinLimit", { + type: "state", + common: { + name: "Set chargeMinLimit", + type: "number", + role: "number", + write: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.log.info(JSON.stringify(body)); - resolve(); - } - ); - }); - } - getAudiDataStatus(vin) { - return new Promise((resolve, reject) => { - const statusArray = [ - { - path: "driverlog", - url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/driverlogs?page=0&limit=100&returnPollData=true", + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.climatisation", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "switch", + write: true, }, - { - path: "lastParkingPosition", - url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.climatisationv2", { + type: "state", + common: { + name: "Start/Stop Climatisation v2", + type: "boolean", + role: "switch", + write: true, }, - { - path: "status", - url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicles", + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.climatisationv3", { + type: "state", + common: { + name: "Start/Stop Climatisation v3", + type: "boolean", + role: "switch", + write: true, }, - ]; - statusArray.forEach((element) => { - const url = element.url; - this.log.debug(url); - request.get( - { - url: url, - - headers: { - accept: "application/json;charset=UTF-8", - "dmp-api-version": "v2.0", - "accept-language": "de-DE", - "dmp-client-info": "Android/8.0.0/Audi Connect/App/2.5.0", - "content-type": "application/json;charset=UTF-8", - "user-agent": this.userAgent, - "If-None-Match": this.etags[url] || "", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.debug(err); - resp && this.log.debug(resp.statusCode.toString()); - body && this.log.debug(JSON.stringify(body)); - reject(); - return; - } - if (resp) { - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { - this.log.debug("304 No values updated"); - resolve(); - return; - } - } - let preferedName = null; - if (element.path === "status") { - body = body[0]; - } - if (element.path === "driverlog") { - preferedName = "driverLogId"; - } - this.log.debug(JSON.stringify(body)); - - try { - this.extractKeys(this, vin + "." + element.path, body, preferedName); - - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - }); - } - getSkodaEStatus(vin) { - return new Promise((resolve, reject) => { - const typeArray = ["air-conditioning", "charging"]; - const promiseArray = []; - typeArray.forEach((element) => { - let promise = this.getSkodaEValues(vin, element, "status"); - promiseArray.push(promise); - promise = this.getSkodaEValues(vin, element, "settings"); - promiseArray.push(promise); + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { + type: "state", + common: { + name: "Temperature in °C", + type: "number", + role: "number", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.windowheating", { + type: "state", + common: { + name: "Start Windowheating", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.honk", { + type: "state", + common: { + name: "Start Honk", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.flash", { + type: "state", + common: { + name: "Start Flash", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.standheizung", { + type: "state", + common: { + name: "Standheizung aktiviert", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.lock", { + type: "state", + common: { + name: "Verriegeln (true) / Entriegeln (false)", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.ventilationv2", { + type: "state", + common: { + name: "Ventilation aktiviert/deaktivieren", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.ventilationv3", { + type: "state", + common: { + name: "Ventilation/Standheizung Audi aktiviert/deaktivieren", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.standheizungv2", { + type: "state", + common: { + name: "Standheizung aktiviert/deaktivieren", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.lockv2", { + type: "state", + common: { + name: "Verriegeln (true) / Entriegeln (false)", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.ventilation", { + type: "state", + common: { + name: "Start Ventilation", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vehicle + ".remote.ventilationDuration", { + type: "state", + common: { + name: "Dauer Lüftung in min", + role: "number", + write: true, + }, + native: {}, + }); }); - Promise.all(promiseArray) + resolve(); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); + this.log.error("Not able to find vehicle, did you choose the correct type in the settings?"); + reject(); + } + } + ); + }); + } + getIdStatus(vin) { + return new Promise(async (resolve, reject) => { + request.get( + { + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/status", + + headers: { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + try { + this.extractKeys(this, vin + ".status", body.data); + if (this.config.rawJson) { + this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { + type: "state", + common: { + name: vin + ".status" + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }) .then(() => { - resolve(); + this.setState(vin + ".status" + "rawJson", JSON.stringify(body.data), true); }) - .catch(() => { - reject(); + .catch((error) => { + this.log.error(error); }); - }); - } + } + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + getSeatCupraStatus(vin) { + return new Promise((resolve, reject) => { + request.get( + { + url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + this.seatcupraUser + "/vehicles/" + vin + "/mycar", + + headers: { + accept: "*/*", - getSkodaEValues(vin, type, endpoint) { - return new Promise((resolve, reject) => { - const url = "https://api.connect.skoda-auto.cz/api/v1/" + type + "/" + vin + "/" + endpoint; - this.log.debug(url); - request.get( - { - url: url, - - headers: { - "api-key": "ok", - accept: "application/json", - "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - "If-None-Match": this.etags[url] || "", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + + reject(); + return; + } + this.log.debug(JSON.stringify(body)); + try { + this.extractKeys(this, vin + ".status", body); + if (this.config.rawJson) { + this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { + type: "state", + common: { + name: vin + ".status" + "rawJson", + role: "state", + type: "json", + write: false, + read: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.debug(err); - resp && this.log.debug(resp.statusCode.toString()); - body && this.log.debug(JSON.stringify(body)); - reject(); - return; - } - if (resp) { - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { - this.log.debug("304 No values updated"); - resolve(); - return; - } - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".status." + type + "." + endpoint, body); - - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } - setSkodaESettings(vin, action, value, bodyContent) { - return new Promise(async (resolve, reject) => { - const pre = this.name + "." + this.instance; - let body = bodyContent || {}; - if (value !== "UpdateSettings") { - const states = await this.getStatesAsync(pre + "." + vin + ".status." + action + ".settings.*"); - body = {}; - const allIds = Object.keys(states); - allIds.forEach((keyName) => { - const keyNameArray = keyName.split("."); - const key = keyNameArray[keyNameArray.length - 1]; - const subKey = keyNameArray[keyNameArray.length - 2]; - if (subKey === "settings" && states[keyName]) { - body[key] = states[keyName].val; - } else if (states[keyName]) { - if (!body[subKey]) { - body[subKey] = {}; - } - body[subKey][key] = states[keyName].val; - } + native: {}, + }) + .then(() => { + this.setState(vin + ".status" + "rawJson", JSON.stringify(body), true); + }) + .catch((error) => { + this.log.error(error); }); } - const settingsName = this.toCammelCase(action) + "Settings"; - const finalBody = { - type: value, - }; - finalBody[settingsName] = body; - const method = "POST"; - const url = "https://api.connect.skoda-auto.cz/api/v1/" + action + "/operation-requests?vin=" + vin; - this.log.debug(url); - this.log.debug(JSON.stringify(finalBody)); - request( - { - method: method, - url: url, - headers: { - "api-key": "ok", - accept: "application/json", - "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - body: finalBody, - followAllRedirects: true, - json: true, - gzip: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if (resp && resp.statusCode === 401) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.refreshToken().catch(() => {}); - this.log.error("Refresh Token"); - reject(); - return; - } - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } - async getElliData(type) { - let name = "Seat Elli Data"; - let path = "seatelli"; - if (type === "skodapower") { - name = "Skoda Powerpass Data"; - path = "skodapower"; - } - const header = { - "Content-Type": "application/json", - Accept: "application/json", - "User-Agent": this.userAgent, - "Accept-Language": "de-DE", - Authorization: "Bearer " + this.config.atoken, - }; - await this.setObjectNotExistsAsync(path, { - type: "device", - common: { - name: name, - write: false, - }, - native: {}, - }); - const endpoints = [ - "identity/v1/userinfo", - "customer/v1/cars", - "customer/v1/subscriptions", - "customer/v1/rfidcards", - "chargeathome/v1/chargingsessions", - "customer/v1/orders", - "customer/v1/charging/sessions", - "customer/v1/invoices", - "customer/v1/orders", - "customer/v1/subscriber", - ]; - endpoints.forEach((element) => { - const elementArray = element.split("/"); - this.genericRequest("https://api.elli.eco/" + element, header, path + "." + elementArray[elementArray.length - 1], [404, 409]).catch((hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); - }); - }); - this.genericRequest("https://api.elli.eco/customer/v1/charging/records?limit=" + this.config.historyLimit + "&offset=0", header, path + ".records", [404]).catch((hideError, err) => { - if (hideError) { - return; - } + resolve(); + } catch (err) { this.log.error(err); - }); + reject(); + } + } + ); - this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, path + ".stations", [404], "stations") - .then((body) => { - body.forEach((station) => { - this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, path + ".stations." + station.name, [404]).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; - } - this.log.error("Failed to get sessions"); - }); - this.genericRequest( - "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", - header, - path + ".stations." + station.name + ".chargingrecords", - [404] - ).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; - } - this.log.error("Failed to get sessions"); - }); - this.genericRequest( - "https://api.elli.eco/chargeathome/v1/chargingrecords/total-charged?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", - header, - path + ".stations." + station.name + ".chargingrecords.total-charged", - [404] - ).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get total-charged"); - return; - } - this.log.error("Failed to get total-charged"); - }); - }); - }) - .catch((hideError, err) => { - if (hideError) { - this.log.debug("Failed to get stations"); - this.log.debug(err); - return; - } - this.log.error("Failed to get stations"); - this.log.error(err); - }); - } + request.get( + { + url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/charging/status", + + headers: { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + return; + } + this.log.debug(JSON.stringify(body)); + try { + this.extractKeys(this, vin + ".charging", body.status); + } catch (err) { + this.log.error(err); + } + } + ); + request.get( + { + url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/climatisation/status", - getWcData(limit) { - if (limit == -1) { - this.log.debug("We Charge disabled in config"); + headers: { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); return; + } + this.log.debug(JSON.stringify(body)); + try { + this.extractKeys(this, vin + ".climatisation", body.data); + } catch (err) { + this.log.error(err); + } } - if (!limit) { - limit = 25; + ); + }); + } + setSeatCupraStatus(vin, action, state) { + return new Promise((resolve, reject) => { + request.post( + { + url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state, + headers: { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + this.log.info(JSON.stringify(body)); + resolve(); } - this.setObjectNotExists("wecharge", { - type: "state", - common: { - name: "WeCharge Data", - write: false, + ); + }); + } + getAudiDataStatus(vin) { + return new Promise((resolve, reject) => { + const statusArray = [ + { + path: "driverlog", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/driverlogs?page=0&limit=100&returnPollData=true", + }, + { + path: "lastParkingPosition", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", + }, + { + path: "status", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicles", + }, + ]; + statusArray.forEach((element) => { + const url = element.url; + this.log.debug(url); + request.get( + { + url: url, + + headers: { + accept: "application/json;charset=UTF-8", + "dmp-api-version": "v2.0", + "accept-language": "de-DE", + "dmp-client-info": "Android/8.0.0/Audi Connect/App/2.5.0", + "content-type": "application/json;charset=UTF-8", + "user-agent": this.userAgent, + "If-None-Match": this.etags[url] || "", + authorization: "Bearer " + this.config.atoken, }, - native: {}, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.debug(err); + resp && this.log.debug(resp.statusCode.toString()); + body && this.log.debug(JSON.stringify(body)); + reject(); + return; + } + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } + let preferedName = null; + if (element.path === "status") { + body = body[0]; + } + if (element.path === "driverlog") { + preferedName = "driverLogId"; + } + this.log.debug(JSON.stringify(body)); + + try { + this.extractKeys(this, vin + "." + element.path, body, preferedName); + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + }); + } + getSkodaEStatus(vin) { + return new Promise((resolve, reject) => { + const typeArray = ["air-conditioning", "charging"]; + const promiseArray = []; + typeArray.forEach((element) => { + let promise = this.getSkodaEValues(vin, element, "status"); + promiseArray.push(promise); + promise = this.getSkodaEValues(vin, element, "settings"); + promiseArray.push(promise); + }); + Promise.all(promiseArray) + .then(() => { + resolve(); + }) + .catch(() => { + reject(); }); - const header = { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + }); + } + + getSkodaEValues(vin, type, endpoint) { + return new Promise((resolve, reject) => { + const url = "https://api.connect.skoda-auto.cz/api/v1/" + type + "/" + vin + "/" + endpoint; + this.log.debug(url); + request.get( + { + url: url, + + headers: { + "api-key": "ok", + accept: "application/json", + "content-type": "application/json;charset=utf-8", "user-agent": this.userAgent, "accept-language": "de-de", + "If-None-Match": this.etags[url] || "", authorization: "Bearer " + this.config.atoken, - wc_access_token: this.config.wc_access_token, - }; - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", header, "wecharge.chargeandpay.subscriptions", [404], "result") - .then((body) => { - body.forEach((subs) => { - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wecharge.chargeandpay.tariffs." + subs.tariff_id, [ - 404, - ]).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get tariff"); - return; - } - this.log.error("Failed to get tariff"); - }); - }); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get subscription"); - return; - } - this.log.error("Failed to get subscription"); - }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", [404], "result") - .then((body) => { - this.setObjectNotExistsAsync("wecharge.chargeandpay.recordsJson", { - type: "state", - common: { - name: "Raw Json Last 100", - role: "indicator", - type: "string", - write: true, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState("wecharge.chargeandpay.recordsJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - this.extractKeys(this, "wecharge.chargeandpay.records.latestItem", body[0]); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get chargeandpay records"); - return; - } - this.log.error("Failed to get chargeandpay records"); - }); - this.genericRequest("https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, header, "wecharge.homecharging.stations", [404], "result", "stations") - .then((body) => { - body.forEach((station) => { - this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=" + limit, - header, - "wecharge.homecharging.stations." + station.name + ".sessions", - [404], - "charging_sessions" - ) - .then((body) => { - this.setObjectNotExistsAsync("wecharge.homecharging.stations." + station.name + ".sessionsJson", { - type: "state", - common: { - name: "Raw Json Last 100", - role: "indicator", - type: "string", - write: true, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState("wecharge.homecharging.stations." + station.name + ".sessionsJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - - this.extractKeys(this, "wecharge.homecharging.stations." + station.name + ".sessions.latestItem", body[0]); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; - } - this.log.error("Failed to get sessions"); - }); - }); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get stations"); - return; - } - this.log.error("Failed to get stations"); - }); - const dt = new Date(); - this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=" + limit, - header, - "wecharge.homecharging.records", - [404], - "charging_records" - ) - .then((body) => { - this.setObjectNotExistsAsync("wecharge.homecharging.recordsJson", { - type: "state", - common: { - name: "Raw Json Last 100", - role: "indicator", - type: "string", - write: true, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState("wecharge.homecharging.recordsJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - this.extractKeys(this, "wecharge.homecharging.records.latestItem", body[0]); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get records"); - return; - } - this.log.error("Failed to get records"); - }); - //Pay - //Home - } - genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { - return new Promise(async (resolve, reject) => { - header["If-None-Match"] = this.etags[url] || ""; - request.get( - { - url: url, - headers: header, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if (resp && resp.statusCode && codesToIgnoreArray.includes(resp.statusCode)) { - err && this.log.debug(err); - resp && this.log.debug(resp.statusCode.toString()); - body && this.log.debug(JSON.stringify(body)); - reject(true, err); - return; - } - - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(false, err); - return; - } - this.log.debug(url); - this.log.debug(JSON.stringify(body)); - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { - this.log.debug("304 No values updated"); - resolve(); - return; - } - try { - if (selector1) { - body = body[selector1]; - if (selector2) { - body = body[selector2]; - } - } - if (this.config.rawJson) { - this.setObjectNotExistsAsync(path + "rawJson", { - type: "state", - common: { - name: path + "rawJson", - role: "state", - type: "json", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(path + "rawJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - } - const preferedArrayName = null; - let forceIndex = null; - if (path.indexOf("chargingsessions") !== -1 || path.indexOf("chargingrecords") !== -1 || path.indexOf("records") !== -1 || path.indexOf("sessions") !== -1) { - forceIndex = true; - } + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.debug(err); + resp && this.log.debug(resp.statusCode.toString()); + body && this.log.debug(JSON.stringify(body)); + reject(); + return; + } + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } + this.log.debug(JSON.stringify(body)); + try { + this.extractKeys(this, vin + ".status." + type + "." + endpoint, body); - this.extractKeys(this, path, body, preferedArrayName, forceIndex); - resolve(body); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + setSkodaESettings(vin, action, value, bodyContent) { + return new Promise(async (resolve, reject) => { + const pre = this.name + "." + this.instance; + let body = bodyContent || {}; + if (value !== "UpdateSettings") { + const states = await this.getStatesAsync(pre + "." + vin + ".status." + action + ".settings.*"); + body = {}; + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + const keyNameArray = keyName.split("."); + const key = keyNameArray[keyNameArray.length - 1]; + const subKey = keyNameArray[keyNameArray.length - 2]; + if (subKey === "settings" && states[keyName]) { + body[key] = states[keyName].val; + } else if (states[keyName]) { + if (!body[subKey]) { + body[subKey] = {}; + } + body[subKey][key] = states[keyName].val; + } }); + } + const settingsName = this.toCammelCase(action) + "Settings"; + const finalBody = { + type: value, + }; + finalBody[settingsName] = body; + const method = "POST"; + const url = "https://api.connect.skoda-auto.cz/api/v1/" + action + "/operation-requests?vin=" + vin; + this.log.debug(url); + this.log.debug(JSON.stringify(finalBody)); + request( + { + method: method, + url: url, + headers: { + "api-key": "ok", + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + body: finalBody, + followAllRedirects: true, + json: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 401) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.refreshToken().catch(() => {}); + this.log.error("Refresh Token"); + reject(); + return; + } + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + async getElliData(type) { + let name = "Seat Elli Data"; + let path = "seatelli"; + if (type === "skodapower") { + name = "Skoda Powerpass Data"; + path = "skodapower"; } - setIdRemote(vin, action, value, bodyContent) { - return new Promise(async (resolve, reject) => { - const pre = this.name + "." + this.instance; - let body = bodyContent || {}; - if (action === "climatisation" && value === "start") { - const climateStates = await this.getStatesAsync(pre + "." + vin + ".status.climatisationSettings.*"); - body = {}; - const allIds = Object.keys(climateStates); - allIds.forEach((keyName) => { - const key = keyName.split(".").splice(-1)[0]; - if (key.indexOf("Timestamp") === -1) { - body[key] = climateStates[keyName].val; - } - }); - - // body = JSON.stringify(body); + const header = { + "Content-Type": "application/json", + Accept: "application/json", + "User-Agent": this.userAgent, + "Accept-Language": "de-DE", + Authorization: "Bearer " + this.config.atoken, + }; + await this.setObjectNotExistsAsync(path, { + type: "device", + common: { + name: name, + write: false, + }, + native: {}, + }); + const endpoints = [ + "identity/v1/userinfo", + "customer/v1/cars", + "customer/v1/subscriptions", + "customer/v1/rfidcards", + "chargeathome/v1/chargingsessions", + "customer/v1/orders", + "customer/v1/charging/sessions", + "customer/v1/invoices", + "customer/v1/orders", + "customer/v1/subscriber", + ]; + endpoints.forEach((element) => { + const elementArray = element.split("/"); + this.genericRequest("https://api.elli.eco/" + element, header, path + "." + elementArray[elementArray.length - 1], [404, 409]).catch( + (hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + } + ); + }); + this.genericRequest( + "https://api.elli.eco/customer/v1/charging/records?limit=" + this.config.historyLimit + "&offset=0", + header, + path + ".records", + [404] + ).catch((hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); + }); + + this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, path + ".stations", [404], "stations") + .then((body) => { + body.forEach((station) => { + this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, path + ".stations." + station.name, [404]).catch( + (hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; + } + this.log.error("Failed to get sessions"); } - let method = "POST"; - if (value === "settings") { - method = "PUT"; + ); + this.genericRequest( + "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", + header, + path + ".stations." + station.name + ".chargingrecords", + [404] + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; } - this.log.debug("https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value); - this.log.debug(JSON.stringify(body)); - request( - { - method: method, - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value, - - headers: { - "content-type": "application/json", - accept: "*/*", - "accept-language": "de-de", - "user-agent": this.userAgent, - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - authorization: "Bearer " + this.config.atoken, - }, - body: body, - followAllRedirects: true, - json: true, - gzip: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if (resp && resp.statusCode === 401) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - if (this.config.type === "audietron") { - this.refreshTokenv2().catch(() => {}); - } else { - this.refreshIDToken().catch(() => {}); - } - this.log.error("Refresh Token"); - reject(); - return; - } - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); + this.log.error("Failed to get sessions"); + }); + this.genericRequest( + "https://api.elli.eco/chargeathome/v1/chargingrecords/total-charged?station_id=" + + station.id + + "&limit=" + + this.config.historyLimit + + "&offset=0", + header, + path + ".stations." + station.name + ".chargingrecords.total-charged", + [404] + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get total-charged"); + return; + } + this.log.error("Failed to get total-charged"); + }); }); + }) + .catch((hideError, err) => { + if (hideError) { + this.log.debug("Failed to get stations"); + this.log.debug(err); + return; + } + this.log.error("Failed to get stations"); + this.log.error(err); + }); + } + + getWcData(limit) { + if (limit == -1) { + this.log.debug("We Charge disabled in config"); + return; } - refreshTokenv2() { - return new Promise((resolve, reject) => { - this.log.debug("Token Refresh started"); - const body = { - client_id: this.clientId, - grant_type: "refresh_token", - refresh_token: this.config.rtoken, - response_type: "token id_token", - }; - const headers = { - accept: "application/json", - "content-type": "application/x-www-form-urlencoded; charset=utf-8", - "accept-charset": "utf-8", - "x-qmauth": this.getQmauth(), - "accept-language": "de-de", - "user-agent": "myAudi-Android/4.6.0 (Build 800236847.2111261819) Android/11", - }; - request( - { - method: "POST", - url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", - headers: headers, - followAllRedirects: true, - gzip: true, - json: true, - body: qs.stringify(body), - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.log.error("Failed refresh token. restart adapter in 10min"); - setTimeout(() => { - this.log.error("restart adapter"); - this.restart(); - }, 10 * 60 * 1000); - reject(); - return; - } - try { - this.log.debug("Token Refresh successful"); - this.config.atoken = body.access_token; - this.config.rtoken = body.refresh_token; - - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); + if (!limit) { + limit = 25; } - - refreshIDToken() { - return new Promise((resolve, reject) => { - this.log.debug("Token Refresh started"); - request.get( - { - url: "https://login.apps.emea.vwapps.io/refresh/v1", - - headers: { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.rtoken, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.log.error("Failed refresh token. Relogin"); - //reset login parameters because of wecharge - this.type = "Id"; - this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; - this.scope = "openid profile badge cars dealers birthdate vin"; - this.redirect = "weconnect://authenticated"; - this.xrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - setTimeout(() => { - this.log.error("restart adapter in 10min"); - this.restart(); - }, 10 * 60 * 1000); - reject(); - return; - } - try { - this.log.debug("Token Refresh successful"); - this.config.atoken = body.accessToken; - this.config.rtoken = body.refreshToken; - if (this.type === "Wc") { - //wallcharging relogin no refresh token available - this.login().catch(() => { - this.log.debug("No able to Login in WeCharge"); - }); - } - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); + this.setObjectNotExists("wecharge", { + type: "state", + common: { + name: "WeCharge Data", + write: false, + }, + native: {}, + }); + const header = { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + wc_access_token: this.config.wc_access_token, + }; + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", + header, + "wecharge.chargeandpay.subscriptions", + [404], + "result" + ) + .then((body) => { + body.forEach((subs) => { + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, + header, + "wecharge.chargeandpay.tariffs." + subs.tariff_id, + [404] + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get tariff"); + return; + } + this.log.error("Failed to get tariff"); + }); }); - } - refreshSeatCupraToken() { - return new Promise((resolve, reject) => { - this.log.debug("Token Refresh started"); - request.post( - { - url: "https://identity.vwgroup.io/oidc/v1/token", - body: "client_secret=eb8814e641c81a2640ad62eeccec11c98effc9bccd4269ab7af338b50a94b3a2&client_id=" + this.clientId + "&grant_type=refresh_token&refresh_token=" + this.config.rtoken, - headers: { - accept: "*/*", - "content-type": "application/x-www-form-urlencoded; charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - }, - followAllRedirects: true, - gzip: true, - json: true, + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get subscription"); + return; + } + this.log.error("Failed to get subscription"); + }); + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", + header, + "wecharge.chargeandpay.records", + [404], + "result" + ) + .then((body) => { + this.setObjectNotExistsAsync("wecharge.chargeandpay.recordsJson", { + type: "state", + common: { + name: "Raw Json Last 100", + role: "indicator", + type: "string", + write: true, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState("wecharge.chargeandpay.recordsJson", JSON.stringify(body), true); + }) + .catch((error) => { + this.log.error(error); + }); + this.extractKeys(this, "wecharge.chargeandpay.records.latestItem", body[0]); + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get chargeandpay records"); + return; + } + this.log.error("Failed to get chargeandpay records"); + }); + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, + header, + "wecharge.homecharging.stations", + [404], + "result", + "stations" + ) + .then((body) => { + body.forEach((station) => { + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=" + limit, + header, + "wecharge.homecharging.stations." + station.name + ".sessions", + [404], + "charging_sessions" + ) + .then((body) => { + this.setObjectNotExistsAsync("wecharge.homecharging.stations." + station.name + ".sessionsJson", { + type: "state", + common: { + name: "Raw Json Last 100", + role: "indicator", + type: "string", + write: true, + read: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.log.error("Failed refresh token. Relogin"); + native: {}, + }) + .then(() => { + this.setState("wecharge.homecharging.stations." + station.name + ".sessionsJson", JSON.stringify(body), true); + }) + .catch((error) => { + this.log.error(error); + }); - setTimeout(() => { - this.log.error("restart adapter in 10min"); - this.restart(); - }, 10 * 60 * 1000); - reject(); - return; - } - try { - this.log.debug("Token Refresh successful"); - this.config.atoken = body.access_token; - this.config.rtoken = body.refresh_token; - - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } - getVehicleData(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go") { - resolve(); + this.extractKeys(this, "wecharge.homecharging.stations." + station.name + ".sessions.latestItem", body[0]); + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); return; + } + this.log.error("Failed to get sessions"); + }); + }); + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get stations"); + return; + } + this.log.error("Failed to get stations"); + }); + const dt = new Date(); + this.genericRequest( + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + + dt.toISOString() + + "&limit=" + + limit, + header, + "wecharge.homecharging.records", + [404], + "charging_records" + ) + .then((body) => { + this.setObjectNotExistsAsync("wecharge.homecharging.recordsJson", { + type: "state", + common: { + name: "Raw Json Last 100", + role: "indicator", + type: "string", + write: true, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState("wecharge.homecharging.recordsJson", JSON.stringify(body), true); + }) + .catch((error) => { + this.log.error(error); + }); + this.extractKeys(this, "wecharge.homecharging.records.latestItem", body[0]); + }) + .catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get records"); + return; + } + this.log.error("Failed to get records"); + }); + //Pay + //Home + } + genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { + return new Promise(async (resolve, reject) => { + header["If-None-Match"] = this.etags[url] || ""; + request.get( + { + url: url, + headers: header, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode && codesToIgnoreArray.includes(resp.statusCode)) { + err && this.log.debug(err); + resp && this.log.debug(resp.statusCode.toString()); + body && this.log.debug(JSON.stringify(body)); + reject(true, err); + return; } - let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; - let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); - if (this.config.type !== "vw" && this.config.type !== "vwv2" && this.config.type !== "audi" && this.config.type !== "id" && this.config.type !== "seat" && this.config.type !== "skoda") { - url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); - accept = "application/json"; - } - const atoken = this.config.vwatoken; - request.get( - { - url: url, - headers: { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "X-Market": "de_DE", - Authorization: "Bearer " + atoken, - "If-None-Match": this.etags[url] || "", - Accept: accept, - }, - followAllRedirects: true, - gzip: true, - json: true, + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(false, err); + return; + } + this.log.debug(url); + this.log.debug(JSON.stringify(body)); + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + try { + if (selector1) { + body = body[selector1]; + if (selector2) { + body = body[selector2]; + } + } + if (this.config.rawJson) { + this.setObjectNotExistsAsync(path + "rawJson", { + type: "state", + common: { + name: path + "rawJson", + role: "state", + type: "json", + write: false, + read: true, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); - } - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - let result = body.vehicleData; - if (!result) { - result = body.vehicleDataDetail; - } - if (resp) { - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { - this.log.debug("304 No values updated"); - resolve(); - return; - } - } - if (result && result.carportData && result.carportData.modelName) { - this.updateName(vin, result.carportData.modelName); - } - - this.extractKeys(this, vin + ".general", result); + native: {}, + }) + .then(() => { + this.setState(path + "rawJson", JSON.stringify(body), true); + }) + .catch((error) => { + this.log.error(error); + }); + } + const preferedArrayName = null; + let forceIndex = null; + if ( + path.indexOf("chargingsessions") !== -1 || + path.indexOf("chargingrecords") !== -1 || + path.indexOf("records") !== -1 || + path.indexOf("sessions") !== -1 + ) { + forceIndex = true; + } - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); + this.extractKeys(this, path, body, preferedArrayName, forceIndex); + resolve(body); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + setIdRemote(vin, action, value, bodyContent) { + return new Promise(async (resolve, reject) => { + const pre = this.name + "." + this.instance; + let body = bodyContent || {}; + if (action === "climatisation" && value === "start") { + const climateStates = await this.getStatesAsync(pre + "." + vin + ".status.climatisationSettings.*"); + body = {}; + const allIds = Object.keys(climateStates); + allIds.forEach((keyName) => { + const key = keyName.split(".").splice(-1)[0]; + if (key.indexOf("Timestamp") === -1) { + body[key] = climateStates[keyName].val; + } }); - } - getVehicleRights(vin) { - return new Promise((resolve, reject) => { - if (this.config.type === "go" || !this.config.rights) { + // body = JSON.stringify(body); + } + let method = "POST"; + if (value === "settings") { + method = "PUT"; + } + this.log.debug("https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value); + this.log.debug(JSON.stringify(body)); + request( + { + method: method, + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value, + + headers: { + "content-type": "application/json", + accept: "*/*", + "accept-language": "de-de", + "user-agent": this.userAgent, + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + authorization: "Bearer " + this.config.atoken, + }, + body: body, + followAllRedirects: true, + json: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 401) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + if (this.config.type === "audietron") { + this.refreshTokenv2().catch(() => {}); + } else { + this.refreshIDToken().catch(() => {}); + } + this.log.error("Refresh Token"); + reject(); + return; + } + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + refreshTokenv2() { + return new Promise((resolve, reject) => { + this.log.debug("Token Refresh started"); + const body = { + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: this.config.rtoken, + response_type: "token id_token", + }; + const headers = { + accept: "application/json", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + "accept-charset": "utf-8", + "x-qmauth": this.getQmauth(), + "accept-language": "de-de", + "user-agent": "myAudi-Android/4.6.0 (Build 800236847.2111261819) Android/11", + }; + request( + { + method: "POST", + url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", + headers: headers, + followAllRedirects: true, + gzip: true, + json: true, + body: qs.stringify(body), + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.log.error("Failed refresh token. restart adapter in 10min"); + setTimeout(() => { + this.log.error("restart adapter"); + this.restart(); + }, 10 * 60 * 1000); + reject(); + return; + } + try { + this.log.debug("Token Refresh successful"); + this.config.atoken = body.access_token; + this.config.rtoken = body.refresh_token; + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + + refreshIDToken() { + return new Promise((resolve, reject) => { + this.log.debug("Token Refresh started"); + request.get( + { + url: "https://login.apps.emea.vwapps.io/refresh/v1", + + headers: { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.rtoken, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.log.error("Failed refresh token. Relogin"); + //reset login parameters because of wecharge + this.type = "Id"; + this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; + this.scope = "openid profile badge cars dealers birthdate vin"; + this.redirect = "weconnect://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + setTimeout(() => { + this.log.error("restart adapter in 10min"); + this.restart(); + }, 10 * 60 * 1000); + reject(); + return; + } + try { + this.log.debug("Token Refresh successful"); + this.config.atoken = body.accessToken; + this.config.rtoken = body.refreshToken; + if (this.type === "Wc") { + //wallcharging relogin no refresh token available + this.login().catch(() => { + this.log.debug("No able to Login in WeCharge"); + }); + } + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + refreshSeatCupraToken() { + return new Promise((resolve, reject) => { + this.log.debug("Token Refresh started"); + request.post( + { + url: "https://identity.vwgroup.io/oidc/v1/token", + body: + "client_secret=eb8814e641c81a2640ad62eeccec11c98effc9bccd4269ab7af338b50a94b3a2&client_id=" + + this.clientId + + "&grant_type=refresh_token&refresh_token=" + + this.config.rtoken, + headers: { + accept: "*/*", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + "user-agent": this.userAgent, + "accept-language": "de-de", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.log.error("Failed refresh token. Relogin"); + + setTimeout(() => { + this.log.error("restart adapter in 10min"); + this.restart(); + }, 10 * 60 * 1000); + reject(); + return; + } + try { + this.log.debug("Token Refresh successful"); + this.config.atoken = body.access_token; + this.config.rtoken = body.refresh_token; + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + getVehicleData(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go") { + resolve(); + return; + } + let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); + if ( + this.config.type !== "vw" && + this.config.type !== "vwv2" && + this.config.type !== "audi" && + this.config.type !== "id" && + this.config.type !== "seat" && + this.config.type !== "skoda" + ) { + url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); + accept = "application/json"; + } + const atoken = this.config.vwatoken; + + request.get( + { + url: url, + headers: { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "X-Market": "de_DE", + Authorization: "Bearer " + atoken, + "If-None-Match": this.etags[url] || "", + Accept: accept, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + } + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + let result = body.vehicleData; + if (!result) { + result = body.vehicleDataDetail; + } + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); resolve(); return; + } } - let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; - if (this.config.type === "vw" || this.config.type === "vwv2") { - url += "/users/" + this.config.identifier; + if (result && result.carportData && result.carportData.modelName) { + this.updateName(vin, result.carportData.modelName); } - request.get( - { - url: url, - qs: { - scope: "All", - }, - headers: { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); - } - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - const adapter = this; - traverse(body.operationList).forEach(function (value) { - if (this.path.length > 0 && this.isLeaf) { - const modPath = this.path; - this.path.forEach((pathElement, pathIndex) => { - if (!isNaN(parseInt(pathElement))) { - let stringPathIndex = parseInt(pathElement) + 1 + ""; - while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; - const key = this.path[pathIndex - 1] + stringPathIndex; - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = key; - modPath.splice(parentIndex + 1, 1); - } - }); - if (modPath[modPath.length - 1] !== "$") { - adapter - .setObjectNotExistsAsync(vin + ".rights." + modPath.join("."), { - type: "state", - common: { - name: this.key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); - }) - .catch((error) => { - adapter.log.error(error); - }); - } - } - }); - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); - } + this.extractKeys(this, vin + ".general", result); - requestStatusUpdate(vin) { - return new Promise((resolve, reject) => { - try { - let method = "POST"; - let url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); - - let accept = "application/json"; - // if (this.config.type === "audi") { - // url = this.replaceVarInUrl("https://mal-3a.prd.eu.dp.vwg-connect.com/api/bs/vsr/v1/vehicles/$vin/requests", vin); - // } - if (this.config.type === "vw") { - accept = - "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; - } - if (this.config.type === "vwv2") { - method = "GET"; - url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); - accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + + getVehicleRights(vin) { + return new Promise((resolve, reject) => { + if (this.config.type === "go" || !this.config.rights) { + resolve(); + return; + } + let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/" + vin; + if (this.config.type === "vw" || this.config.type === "vwv2") { + url += "/users/" + this.config.identifier; + } + request.get( + { + url: url, + qs: { + scope: "All", + }, + headers: { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + } + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + reject(); + return; + } + try { + const adapter = this; + traverse(body.operationList).forEach(function (value) { + if (this.path.length > 0 && this.isLeaf) { + const modPath = this.path; + this.path.forEach((pathElement, pathIndex) => { + if (!isNaN(parseInt(pathElement))) { + let stringPathIndex = parseInt(pathElement) + 1 + ""; + while (stringPathIndex.length < 2) stringPathIndex = "0" + stringPathIndex; + const key = this.path[pathIndex - 1] + stringPathIndex; + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = key; + modPath.splice(parentIndex + 1, 1); + } + }); + if (modPath[modPath.length - 1] !== "$") { + adapter + .setObjectNotExistsAsync(vin + ".rights." + modPath.join("."), { + type: "state", + common: { + name: this.key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + if (typeof value === "object") { + value = JSON.stringify(value); + } + adapter.setState(vin + ".rights." + modPath.join("."), value || this.node, true); + }) + .catch((error) => { + adapter.log.error(error); + }); } - this.log.debug("Request update " + url); - request( - { - method: method, - url: url, - headers: { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: accept, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error(vin); - if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); - } - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - resolve(); - } catch (err) { - this.log.error("Request update failed: " + url); - this.log.error(vin); - this.log.error(err); - reject(); - } - } - ); + } + }); + + resolve(); + } catch (err) { + this.log.error(err); + reject(); + } + } + ); + }); + } + + requestStatusUpdate(vin) { + return new Promise((resolve, reject) => { + try { + let method = "POST"; + let url = this.replaceVarInUrl("$homeregion/fs-car/bs/vsr/v1/$type/$country/vehicles/$vin/requests", vin); + + let accept = "application/json"; + // if (this.config.type === "audi") { + // url = this.replaceVarInUrl("https://mal-3a.prd.eu.dp.vwg-connect.com/api/bs/vsr/v1/vehicles/$vin/requests", vin); + // } + if (this.config.type === "vw") { + accept = + "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + } + if (this.config.type === "vwv2") { + method = "GET"; + url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); + accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + } + this.log.debug("Request update " + url); + request( + { + method: method, + url: url, + headers: { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: accept, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error(vin); + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + } + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + resolve(); } catch (err) { - this.log.error(err); - reject(); + this.log.error("Request update failed: " + url); + this.log.error(vin); + this.log.error(err); + reject(); } - }); - } - - getVehicleStatus(vin, url, path, element, element2, element3, element4, tripType) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin, tripType); - if (path === "tripdata") { - if (this.tripsActive == false) { + } + ); + } catch (err) { + this.log.error(err); + reject(); + } + }); + } + + getVehicleStatus(vin, url, path, element, element2, element3, element4, tripType) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin, tripType); + if (path === "tripdata") { + if (this.tripsActive == false) { + resolve(); + return; + } + } + let accept = "application/json"; + if (this.config.type === "vw" || this.config.type === "vwv2") { + accept = + "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json, */*"; + if (this.homeRegion[vin] === "https://msg.volkswagen.de") { + accept += ", application/json"; + } + } + request.get( + { + url: url, + headers: { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + "If-None-Match": this.etags[url] || "", + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + Accept: accept, + }, + followAllRedirects: true, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + if ( + (resp && resp.statusCode === 403) || + (resp && resp.statusCode === 502) || + (resp && resp.statusCode === 406) || + (resp && resp.statusCode === 500) + ) { + body && this.log.debug(JSON.stringify(body)); + resolve(); + return; + } else if (resp && resp.statusCode === 401) { + this.log.error(vin); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + this.log.error("Refresh Token in 10min"); + if (!this.refreshTokenTimeout) { + this.refreshTokenTimeout = setTimeout(() => { + this.refreshTokenTimeout = null; + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); + }, 10 * 60 * 1000); + } + reject(); + return; + } else { + if (resp && resp.statusCode === 429) { + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + } + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + } + try { + this.log.debug(JSON.stringify(body)); + if (resp) { + this.etags[url] = resp.headers.etag; + if (resp.statusCode === 304) { + this.log.debug("304 No values updated"); + resolve(); + return; + } + } + if (path === "position") { + this.setObjectNotExistsAsync(vin + ".position.isMoving", { + type: "state", + common: { + name: "is car moving", + role: "indicator", + type: "boolean", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + if (resp.statusCode === 204) { + this.setState(vin + ".position.isMoving", true, true); resolve(); return; - } + } else { + this.setState(vin + ".position.isMoving", false, true); + } + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + }) + .catch((error) => { + this.log.error(error); + }); } - let accept = "application/json"; - if (this.config.type === "vw" || this.config.type === "vwv2") { - accept = - "application/vnd.vwg.mbb.VehicleStatusReport_v1_0_0+json, application/vnd.vwg.mbb.climater_v1_0_0+json, application/vnd.vwg.mbb.carfinderservice_v1_0_0+json, application/vnd.volkswagenag.com-error-v1+json, application/vnd.vwg.mbb.genericError_v1_0_2+json, */*"; - if (this.homeRegion[vin] === "https://msg.volkswagen.de") { - accept += ", application/json"; + + if (body === undefined || body === "" || body.error) { + if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { + this.log.error("Error response try to refresh token " + path); + this.log.error(JSON.stringify(body)); + this.log.error("Refresh Token in 10min"); + if (!this.refreshTokenTimeout) { + this.refreshTokenTimeout = setTimeout(() => { + this.refreshTokenTimeout = null; + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); + }, 10 * 60 * 1000); } + } else { + this.log.debug("Not able to get " + path); + } + this.log.debug(JSON.stringify(body)); + reject(); + return; } - request.get( - { - url: url, - headers: { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - "If-None-Match": this.etags[url] || "", - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - Accept: accept, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - if ((resp && resp.statusCode === 403) || (resp && resp.statusCode === 502) || (resp && resp.statusCode === 406) || (resp && resp.statusCode === 500)) { - body && this.log.debug(JSON.stringify(body)); - resolve(); - return; - } else if (resp && resp.statusCode === 401) { - this.log.error(vin); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.log.error("Refresh Token in 10min"); - if (!this.refreshTokenTimeout) { - this.refreshTokenTimeout = setTimeout(() => { - this.refreshTokenTimeout = null; - this.refreshToken(true).catch(() => { - this.log.error("Refresh Token was not successful"); - }); - }, 10 * 60 * 1000); - } - reject(); - return; - } else { - if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); - } - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - } - try { - this.log.debug(JSON.stringify(body)); - if (resp) { - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { - this.log.debug("304 No values updated"); - resolve(); - return; - } - } - if (path === "position") { - this.setObjectNotExistsAsync(vin + ".position.isMoving", { - type: "state", - common: { - name: "is car moving", - role: "indicator", - type: "boolean", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - if (resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - resolve(); - return; - } else { - this.setState(vin + ".position.isMoving", false, true); - } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } - }) - .catch((error) => { - this.log.error(error); - }); - } - - if (body === undefined || body === "" || body.error) { - if (body && body.error && body.error.description.indexOf("Token expired") !== -1) { - this.log.error("Error response try to refresh token " + path); - this.log.error(JSON.stringify(body)); - this.log.error("Refresh Token in 10min"); - if (!this.refreshTokenTimeout) { - this.refreshTokenTimeout = setTimeout(() => { - this.refreshTokenTimeout = null; - this.refreshToken(true).catch(() => { - this.log.error("Refresh Token was not successful"); - }); - }, 10 * 60 * 1000); - } - } else { - this.log.debug("Not able to get " + path); - } - this.log.debug(JSON.stringify(body)); - reject(); - return; - } - - const adapter = this; - - let result = body; - if (result === "") { - resolve(); - return; - } - if (result) { - if (element && result[element]) { - result = result[element]; - } - if (element2 && result[element2]) { - result = result[element2]; - } - if (element3 && result[element3]) { - result = result[element3]; - } - if (element4 && result[element4]) { - result = result[element4]; - } - const isStatusData = path === "status"; - const isTripData = path === "tripdata"; - - if (isTripData) { - if (this.tripsActive == false) { - resolve(); - return; - } - // result.tripData = result.tripData.reverse(); - result.tripData.sort((a, b) => { - return new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(); - }); - if (this.config.numberOfTrips > 0) result.tripData = result.tripData.slice(0, this.config.numberOfTrips); - this.setObjectNotExistsAsync(vin + ".tripdata" + tripType + ".rawJson", { - type: "state", - common: { - name: "Raw Json", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".tripdata" + tripType + ".rawJson", JSON.stringify(result.tripData), true); - }) - .catch((error) => { - this.log.error(error); - }); - - this.setObjectNotExistsAsync(vin + ".tripdata" + tripType + ".lastTrip", { - type: "state", - common: { - name: "indexOfOldestTrip", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".tripdata" + tripType + ".lastTrip", result.tripData.length, true); - }) - .catch((error) => { - this.log.error(error); - }); - this.extractKeys(this, vin + ".tripdata" + tripType, result, null, true); + const adapter = this; - resolve(); - return; - } - - let statusKeys = null; - if (isStatusData) { - statusKeys = this.getStatusKeys(result); - } - const tripKeys = null; - - traverse(result).forEach(function (value) { - const modPath = this.path.slice(); - let dataId = null; - let dataIndex = -1; - let fieldId = null; - let fieldUnit = null; - let isNumberNode = false; - let skipNode = false; - this.path.forEach((pathElement, pathIndex) => { - if (isNaN(parseInt(pathElement))) { - isNumberNode = false; - } else { - isNumberNode = true; - let key; - if (isStatusData && this.path[pathIndex - 1] === "data") { - dataIndex = parseInt(pathElement); - dataId = statusKeys[dataIndex].dataId; - key = "_" + dataId; - } else if (isStatusData && this.path[pathIndex - 1] === "field") { - if (dataIndex >= 0) { - fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; - key = "_" + fieldId; - if (this.key == "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { - fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit; - } - } else { - adapter.log.error("no data entry found for field (path = " + this.path.join(".")); - key = parseInt(pathElement) + 1 + ""; - } - } else if (isTripData && this.path[pathIndex - 1]) { - const tripKey = tripKeys[parseInt(pathElement)]; - if (tripKey === null) { - skipNode = true; - } else { - key = "_" + tripKeys[parseInt(pathElement)]; - } - } else { - key = parseInt(pathElement) + 1 + ""; - while (key.length < 2) key = "0" + key; - } - if (!skipNode) { - const parentIndex = modPath.indexOf(pathElement) - 1; - modPath[parentIndex] = this.path[pathIndex - 1] + key; - modPath.splice(parentIndex + 1, 1); - } - } - }); - if (!skipNode) { - const newPath = vin + "." + path + "." + modPath.join("."); - if (this.path.length > 0 && this.isLeaf) { - value = value || this.node; - if (!isNaN(Number(value)) && Number(value) === parseFloat(value)) { - value = Number(value); - } - let name = this.key; - if (typeof this.key === "number") { - name = this.key.toString(); - } - adapter - .setObjectNotExistsAsync(newPath, { - type: "state", - common: { - name: name, - role: "indicator", - type: typeof value, - unit: fieldUnit, - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - if (typeof value === "object") { - value = JSON.stringify(value); - } - adapter.setState(newPath, value, true); - }) - .catch((error) => { - adapter.log.error(error); - }); - //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { - // setOutsideTemperature(vin, value); - //} - if (isStatusData && this.key == "value") { - // Audi and Skoda have different (shorter) dataId - if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { - adapter.setIsCarLocked(vin, value); - } - if ((dataId == "0x030102FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301020001") { - adapter.setOutsideTemperature(vin, value); - } - adapter.updateUnit(newPath, fieldUnit); - } - } else if (isStatusData && isNumberNode) { - let text = null; - if (this.node.textId) { - text = this.node.textId; - } - adapter.setObjectNotExists(newPath, { - type: "channel", - common: { - name: text, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - adapter.updateName(newPath, text); - } else if (isTripData && isNumberNode) { - let text = null; - if (this.node.timestamp) { - text = this.node.timestamp; - } - adapter.setObjectNotExists(newPath, { - type: "channel", - common: { - name: text, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - adapter.updateName(newPath, text); - } - } - }); - resolve(); - } else { - this.log.error("Cannot find vehicle data " + path); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (err) { - this.log.error(err); - this.log.error(err.stack); - reject(); - } + let result = body; + if (result === "") { + resolve(); + return; + } + if (result) { + if (element && result[element]) { + result = result[element]; + } + if (element2 && result[element2]) { + result = result[element2]; + } + if (element3 && result[element3]) { + result = result[element3]; + } + if (element4 && result[element4]) { + result = result[element4]; + } + const isStatusData = path === "status"; + const isTripData = path === "tripdata"; + + if (isTripData) { + if (this.tripsActive == false) { + resolve(); + return; } - ); - }); - } - - async setIsCarLocked(vin, value) { - await this.setObjectNotExistsAsync(vin + ".status.isCarLocked", { - type: "state", - common: { - name: "is car locked", - role: "indicator", - type: "boolean", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".status.isCarLocked", value == 2, true); - } + // result.tripData = result.tripData.reverse(); + result.tripData.sort((a, b) => { + return new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(); + }); + if (this.config.numberOfTrips > 0) result.tripData = result.tripData.slice(0, this.config.numberOfTrips); + this.setObjectNotExistsAsync(vin + ".tripdata" + tripType + ".rawJson", { + type: "state", + common: { + name: "Raw Json", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState(vin + ".tripdata" + tripType + ".rawJson", JSON.stringify(result.tripData), true); + }) + .catch((error) => { + this.log.error(error); + }); + + this.setObjectNotExistsAsync(vin + ".tripdata" + tripType + ".lastTrip", { + type: "state", + common: { + name: "indexOfOldestTrip", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState(vin + ".tripdata" + tripType + ".lastTrip", result.tripData.length, true); + }) + .catch((error) => { + this.log.error(error); + }); - async setOutsideTemperature(vin, value) { - await this.setObjectNotExistsAsync(vin + ".status.outsideTemperature", { - type: "state", - common: { - name: "outside temperature", - role: "value.temperature", - type: "number", - unit: "°C", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".status.outsideTemperature", Math.round(value - 2731.5) / 10.0, true); - } + this.extractKeys(this, vin + ".tripdata" + tripType, result, null, true); - getStatusKeys(statusJson) { - const adapter = this; - let result = null; - if (statusJson && statusJson.data) { - if (Array.isArray(statusJson.data)) { - result = new Array(statusJson.data.length); - statusJson.data.forEach(function (dataValue, dataIndex) { - if (dataValue && dataValue.id) { - if (dataValue.field && Array.isArray(dataValue.field)) { - const newList = new Array(dataValue.field.length); - dataValue.field.forEach(function (fieldValue, fieldIndex) { - if (fieldValue && fieldValue.id) { - newList[fieldIndex] = { id: fieldValue.id, unit: fieldValue.unit }; - } else { - adapter.log.warn("status[" + dataIndex + "," + fieldIndex + "] has no id"); - adapter.log.debug(JSON.stringify(fieldValue)); - } - }); - result[dataIndex] = { dataId: dataValue.id, fieldIds: newList }; - } else { - adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); - adapter.log.debug(JSON.stringify(dataValue)); + resolve(); + return; + } + + let statusKeys = null; + if (isStatusData) { + statusKeys = this.getStatusKeys(result); + } + const tripKeys = null; + + traverse(result).forEach(function (value) { + const modPath = this.path.slice(); + let dataId = null; + let dataIndex = -1; + let fieldId = null; + let fieldUnit = null; + let isNumberNode = false; + let skipNode = false; + this.path.forEach((pathElement, pathIndex) => { + if (isNaN(parseInt(pathElement))) { + isNumberNode = false; + } else { + isNumberNode = true; + let key; + if (isStatusData && this.path[pathIndex - 1] === "data") { + dataIndex = parseInt(pathElement); + dataId = statusKeys[dataIndex].dataId; + key = "_" + dataId; + } else if (isStatusData && this.path[pathIndex - 1] === "field") { + if (dataIndex >= 0) { + fieldId = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].id; + key = "_" + fieldId; + if (this.key == "value" && statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit) { + fieldUnit = statusKeys[dataIndex].fieldIds[parseInt(pathElement)].unit; } + } else { + adapter.log.error("no data entry found for field (path = " + this.path.join(".")); + key = parseInt(pathElement) + 1 + ""; + } + } else if (isTripData && this.path[pathIndex - 1]) { + const tripKey = tripKeys[parseInt(pathElement)]; + if (tripKey === null) { + skipNode = true; + } else { + key = "_" + tripKeys[parseInt(pathElement)]; + } } else { - adapter.log.warn("status[" + dataIndex + "] has no id"); - adapter.log.debug(JSON.stringify(dataValue)); + key = parseInt(pathElement) + 1 + ""; + while (key.length < 2) key = "0" + key; + } + if (!skipNode) { + const parentIndex = modPath.indexOf(pathElement) - 1; + modPath[parentIndex] = this.path[pathIndex - 1] + key; + modPath.splice(parentIndex + 1, 1); } + } }); - } else { - adapter.log.warn("status is not an array"); - adapter.log.debug(JSON.stringify(statusJson.data)); - } - } else { - adapter.log.warn("status data without status field"); - adapter.log.debug(JSON.stringify(statusJson)); - } - adapter.log.debug(JSON.stringify(result)); - return result; - } - - updateUnit(pathString, unit) { - const adapter = this; - this.getObject(pathString, function (err, obj) { - if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + " for unit"); - else { - // @ts-ignore - if (obj && obj.common && obj.common.unit !== unit) { - adapter.extendObject(pathString, { + if (!skipNode) { + const newPath = vin + "." + path + "." + modPath.join("."); + if (this.path.length > 0 && this.isLeaf) { + value = value || this.node; + if (!isNaN(Number(value)) && Number(value) === parseFloat(value)) { + value = Number(value); + } + let name = this.key; + if (typeof this.key === "number") { + name = this.key.toString(); + } + adapter + .setObjectNotExistsAsync(newPath, { type: "state", common: { - unit: unit, + name: name, + role: "indicator", + type: typeof value, + unit: fieldUnit, + write: false, + read: true, }, + native: {}, + }) + .then(() => { + if (typeof value === "object") { + value = JSON.stringify(value); + } + adapter.setState(newPath, value, true); + }) + .catch((error) => { + adapter.log.error(error); + }); + //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { + // setOutsideTemperature(vin, value); + //} + if (isStatusData && this.key == "value") { + // Audi and Skoda have different (shorter) dataId + if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { + adapter.setIsCarLocked(vin, value); + } + if ((dataId == "0x030102FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301020001") { + adapter.setOutsideTemperature(vin, value); + } + adapter.updateUnit(newPath, fieldUnit); + } + } else if (isStatusData && isNumberNode) { + let text = null; + if (this.node.textId) { + text = this.node.textId; + } + adapter.setObjectNotExists(newPath, { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + adapter.updateName(newPath, text); + } else if (isTripData && isNumberNode) { + let text = null; + if (this.node.timestamp) { + text = this.node.timestamp; + } + adapter.setObjectNotExists(newPath, { + type: "channel", + common: { + name: text, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, }); + adapter.updateName(newPath, text); + } } + }); + resolve(); + } else { + this.log.error("Cannot find vehicle data " + path); + this.log.error(JSON.stringify(body)); + reject(); } - }); - } - - updateName(pathString, name) { - const adapter = this; - this.getObject(pathString, function (err, obj) { - if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + " for name"); - else { - if (obj && obj.common && obj.common.name !== name) { - adapter.extendObject(pathString, { - type: "channel", - common: { - name: name, - }, - }); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); + reject(); + } + } + ); + }); + } + + async setIsCarLocked(vin, value) { + await this.setObjectNotExistsAsync(vin + ".status.isCarLocked", { + type: "state", + common: { + name: "is car locked", + role: "indicator", + type: "boolean", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".status.isCarLocked", value == 2, true); + } + + async setOutsideTemperature(vin, value) { + await this.setObjectNotExistsAsync(vin + ".status.outsideTemperature", { + type: "state", + common: { + name: "outside temperature", + role: "value.temperature", + type: "number", + unit: "°C", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".status.outsideTemperature", Math.round(value - 2731.5) / 10.0, true); + } + + getStatusKeys(statusJson) { + const adapter = this; + let result = null; + if (statusJson && statusJson.data) { + if (Array.isArray(statusJson.data)) { + result = new Array(statusJson.data.length); + statusJson.data.forEach(function (dataValue, dataIndex) { + if (dataValue && dataValue.id) { + if (dataValue.field && Array.isArray(dataValue.field)) { + const newList = new Array(dataValue.field.length); + dataValue.field.forEach(function (fieldValue, fieldIndex) { + if (fieldValue && fieldValue.id) { + newList[fieldIndex] = { id: fieldValue.id, unit: fieldValue.unit }; + } else { + adapter.log.warn("status[" + dataIndex + "," + fieldIndex + "] has no id"); + adapter.log.debug(JSON.stringify(fieldValue)); } + }); + result[dataIndex] = { dataId: dataValue.id, fieldIds: newList }; + } else { + adapter.log.warn("status[" + dataIndex + "] has no fields/is not an array"); + adapter.log.debug(JSON.stringify(dataValue)); } + } else { + adapter.log.warn("status[" + dataIndex + "] has no id"); + adapter.log.debug(JSON.stringify(dataValue)); + } }); + } else { + adapter.log.warn("status is not an array"); + adapter.log.debug(JSON.stringify(statusJson.data)); + } + } else { + adapter.log.warn("status data without status field"); + adapter.log.debug(JSON.stringify(statusJson)); } - - setVehicleStatus(vin, url, body, contentType, secToken) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); + adapter.log.debug(JSON.stringify(result)); + return result; + } + + updateUnit(pathString, unit) { + const adapter = this; + this.getObject(pathString, function (err, obj) { + if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + " for unit"); + else { + // @ts-ignore + if (obj && obj.common && obj.common.unit !== unit) { + adapter.extendObject(pathString, { + type: "state", + common: { + unit: unit, + }, + }); + } + } + }); + } + + updateName(pathString, name) { + const adapter = this; + this.getObject(pathString, function (err, obj) { + if (err) adapter.log.error('Error "' + err + '" reading object ' + pathString + " for name"); + else { + if (obj && obj.common && obj.common.name !== name) { + adapter.extendObject(pathString, { + type: "channel", + common: { + name: name, + }, + }); + } + } + }); + } + + setVehicleStatus(vin, url, body, contentType, secToken) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + this.log.debug(JSON.stringify(body)); + this.log.debug(contentType); + const headers = { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + "Content-Type": contentType, + Accept: + "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*", + }; + + if (secToken) { + headers["x-mbbSecToken"] = secToken; + } + + request.post( + { + url: url, + headers: headers, + body: body, + followAllRedirects: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(body); + reject(); + return; + } + try { this.log.debug(JSON.stringify(body)); - this.log.debug(contentType); - const headers = { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - "Content-Type": contentType, - Accept: "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*", - }; - - if (secToken) { - headers["x-mbbSecToken"] = secToken; + if (body.indexOf("") !== -1) { + this.log.error("Error response try to refresh token " + url); + this.log.error(JSON.stringify(body)); + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); + reject(); + return; } - - request.post( - { - url: url, - headers: headers, - body: body, - followAllRedirects: true, - gzip: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(body); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - if (body.indexOf("") !== -1) { - this.log.error("Error response try to refresh token " + url); - this.log.error(JSON.stringify(body)); - this.refreshToken(true).catch(() => { - this.log.error("Refresh Token was not successful"); - }); - reject(); - return; - } - resolve(); - this.log.info(body); - } catch (err) { - this.log.error(err); - this.log.error(err.stack); - reject(); - } - } - ); - }); - } - setVehicleStatusv2(vin, url, body, contentType, secToken) { - return new Promise((resolve, reject) => { - url = this.replaceVarInUrl(url, vin); + resolve(); + this.log.info(body); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); + reject(); + } + } + ); + }); + } + setVehicleStatusv2(vin, url, body, contentType, secToken) { + return new Promise((resolve, reject) => { + url = this.replaceVarInUrl(url, vin); + this.log.debug(JSON.stringify(body)); + this.log.debug(contentType); + const headers = { + "User-Agent": this.userAgent, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + Authorization: "Bearer " + this.config.vwatoken, + "Accept-charset": "UTF-8", + "Content-Type": contentType, + Accept: + "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*", + }; + if (secToken) { + headers["x-mbbSecToken"] = secToken; + } + + request.post( + { + url: url, + headers: headers, + body: body, + followAllRedirects: true, + gzip: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + reject(); + return; + } + try { this.log.debug(JSON.stringify(body)); - this.log.debug(contentType); - const headers = { - "User-Agent": this.userAgent, - "X-App-Version": this.xappversion, - "X-App-Name": this.xappname, - Authorization: "Bearer " + this.config.vwatoken, - "Accept-charset": "UTF-8", - "Content-Type": contentType, - Accept: "application/json, application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml,application/vnd.volkswagenag.com-error-v1+xml,application/vnd.vwg.mbb.genericError_v1_0_2+xml, application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml,application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml,*/*", - }; - if (secToken) { - headers["x-mbbSecToken"] = secToken; + if (body.indexOf("") !== -1) { + this.log.error("Error response try to refresh token " + url); + this.log.error(JSON.stringify(body)); + this.refreshToken(true).catch(() => { + this.log.error("Refresh Token was not successful"); + }); + reject(); + return; } - - request.post( - { - url: url, - headers: headers, - body: body, - followAllRedirects: true, - gzip: true, + this.log.info(body); + } catch (err) { + this.log.error(err); + this.log.error(err.stack); + reject(); + } + } + ); + }); + } + requestSecToken(vin, service) { + return new Promise((resolve, reject) => { + let url = + "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + + vin + + "/services/" + + service + + "/security-pin-auth-requested"; + if (this.homeRegionSetter[vin]) { + url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter[vin]); + } + this.log.debug(url); + request.get( + { + url: url, + headers: { + "user-agent": this.userAgent, + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + accept: "application/json", + }, + followAllRedirects: true, + json: true, + gzip: true, + }, + async (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + try { + if (body.error) { + this.log.error(JSON.stringify(body.error)); + reject(); + } + this.log.debug(JSON.stringify(body)); + if (body.securityPinAuthInfo) { + const secToken = body.securityPinAuthInfo.securityToken; + const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge; + const securPin = await this.generateSecurPin(challenge); + const rBody = { + securityPinAuthentication: { + securityPin: { + challenge: challenge, + securityPinHash: securPin, + }, + securityToken: secToken, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - if (body.indexOf("") !== -1) { - this.log.error("Error response try to refresh token " + url); - this.log.error(JSON.stringify(body)); - this.refreshToken(true).catch(() => { - this.log.error("Refresh Token was not successful"); - }); - reject(); - return; - } - this.log.info(body); - } catch (err) { - this.log.error(err); - this.log.error(err.stack); - reject(); - } - } - ); - }); - } - requestSecToken(vin, service) { - return new Promise((resolve, reject) => { - let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/" + vin + "/services/" + service + "/security-pin-auth-requested"; - if (this.homeRegionSetter[vin]) { + }; + let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed"; + if (this.homeRegionSetter[vin]) { url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter[vin]); - } - this.log.debug(url); - request.get( + } + request.post( { - url: url, - headers: { - "user-agent": this.userAgent, - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - accept: "application/json", - }, - followAllRedirects: true, - json: true, - gzip: true, + url: url, + headers: { + "user-agent": this.userAgent, + "Content-Type": "application/json", + "X-App-version": this.xappversion, + "X-App-name": this.xappname, + authorization: "Bearer " + this.config.vwatoken, + Accept: "application/json", + }, + body: rBody, + gzip: true, + json: true, + followAllRedirects: true, }, - async (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - if (body.securityPinAuthInfo) { - const secToken = body.securityPinAuthInfo.securityToken; - const challenge = body.securityPinAuthInfo.securityPinTransmission.challenge; - const securPin = await this.generateSecurPin(challenge); - const rBody = { - securityPinAuthentication: { - securityPin: { - challenge: challenge, - securityPinHash: securPin, - }, - securityToken: secToken, - }, - }; - let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed"; - if (this.homeRegionSetter[vin]) { - url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter[vin]); - } - request.post( - { - url: url, - headers: { - "user-agent": this.userAgent, - "Content-Type": "application/json", - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json", - }, - body: rBody, - gzip: true, - json: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failing to get sec token."); - err && this.log.error(err); - body && this.log.error(JSON.stringify(body)); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - this.log.debug(JSON.stringify(body)); - if (body.securityToken) { - resolve(body.securityToken); - } else { - this.log.error("No Security token found"); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - } else { - this.log.error("No Security information found"); - this.log.error(JSON.stringify(body)); - reject(); - } - } catch (err) { - this.log.error(err); - reject(); + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failing to get sec token."); + err && this.log.error(err); + body && this.log.error(JSON.stringify(body)); + resp && this.log.error(resp.statusCode.toString()); + reject(); + return; + } + try { + this.log.debug(JSON.stringify(body)); + if (body.securityToken) { + resolve(body.securityToken); + } else { + this.log.error("No Security token found"); + this.log.error(JSON.stringify(body)); + reject(); } + } catch (err) { + this.log.error(err); + reject(); + } } - ); - }); - } - generateSecurPin(challenge) { - return new Promise((resolve, reject) => { - if (!this.config.pin) { - this.log.error("Please Enter your S-Pin in the Instance Options"); - reject(); - return; + ); + } else { + this.log.error("No Security information found"); + this.log.error(JSON.stringify(body)); + reject(); } - const pin = this.toByteArray(this.config.pin); - - const byteChallenge = this.toByteArray(challenge); - const webcrypto = new Crypto(); - const concat = new Int8Array(pin.concat(byteChallenge)); - webcrypto.subtle - .digest("SHA-512", concat) - .then((digest) => { - const utf8Array = new Int8Array(digest); - resolve(this.toHexString(utf8Array)); - }) - .catch((error) => { - this.log.error(error); - }); - }); - } - getCodeChallenge() { - let hash = ""; - let result = ""; - const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - result = ""; - for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; - result = Buffer.from(result).toString("base64"); - result = result.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); - hash = crypto.createHash("sha256").update(result).digest("base64"); - hash = hash.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); - - return [result, hash]; - } - getCodeChallengev2() { - let hash = ""; - let result = ""; - const chars = "0123456789abcdef"; - result = ""; - for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; - hash = crypto.createHash("sha256").update(result).digest("base64"); - hash = hash.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); - - return [result, hash]; - } - getNonce() { - const timestamp = Date.now(); - let hash = crypto.createHash("sha256").update(timestamp.toString()).digest("base64"); - hash = hash.slice(0, hash.length - 1); - return hash; - } - toHexString(byteArray) { - return Array.prototype.map - .call(byteArray, function (byte) { - return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); - }) - .join(""); - } - - toByteArray(hexString) { - const result = []; - for (let i = 0; i < hexString.length; i += 2) { - result.push(parseInt(hexString.substr(i, 2), 16)); - } - return result; - } - stringIsAValidUrl(s) { - try { - new URL(s); - return true; - } catch (err) { - return false; + } catch (err) { + this.log.error(err); + reject(); + } } + ); + }); + } + generateSecurPin(challenge) { + return new Promise((resolve, reject) => { + if (!this.config.pin) { + this.log.error("Please Enter your S-Pin in the Instance Options"); + reject(); + return; + } + const pin = this.toByteArray(this.config.pin); + + const byteChallenge = this.toByteArray(challenge); + const webcrypto = new Crypto(); + const concat = new Int8Array(pin.concat(byteChallenge)); + webcrypto.subtle + .digest("SHA-512", concat) + .then((digest) => { + const utf8Array = new Int8Array(digest); + resolve(this.toHexString(utf8Array)); + }) + .catch((error) => { + this.log.error(error); + }); + }); + } + getCodeChallenge() { + let hash = ""; + let result = ""; + const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + result = ""; + for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + result = Buffer.from(result).toString("base64"); + result = result.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + hash = crypto.createHash("sha256").update(result).digest("base64"); + hash = hash.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + + return [result, hash]; + } + getCodeChallengev2() { + let hash = ""; + let result = ""; + const chars = "0123456789abcdef"; + result = ""; + for (let i = 64; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)]; + hash = crypto.createHash("sha256").update(result).digest("base64"); + hash = hash.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); + + return [result, hash]; + } + getNonce() { + const timestamp = Date.now(); + let hash = crypto.createHash("sha256").update(timestamp.toString()).digest("base64"); + hash = hash.slice(0, hash.length - 1); + return hash; + } + toHexString(byteArray) { + return Array.prototype.map + .call(byteArray, function (byte) { + return ("0" + (byte & 0xff).toString(16).toUpperCase()).slice(-2); + }) + .join(""); + } + + toByteArray(hexString) { + const result = []; + for (let i = 0; i < hexString.length; i += 2) { + result.push(parseInt(hexString.substr(i, 2), 16)); } - randomString(length) { - let result = ""; - const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - const charactersLength = characters.length; - for (let i = 0; i < length; i++) { - result += characters.charAt(Math.floor(Math.random() * charactersLength)); - } - return result; + return result; + } + stringIsAValidUrl(s) { + try { + new URL(s); + return true; + } catch (err) { + return false; } - toCammelCase(string) { - return string.replace(/-([a-z])/g, function (g) { - return g[1].toUpperCase(); - }); + } + randomString(length) { + let result = ""; + const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + const charactersLength = characters.length; + for (let i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); } - extractHidden(body) { - const returnObject = {}; - let matches; - if (body.matchAll) { - matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); - } else { - this.log.warn("The adapter needs in the future NodeJS v12. https://forum.iobroker.net/topic/22867/how-to-node-js-f%C3%BCr-iobroker-richtig-updaten"); - matches = this.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g, body); - } - for (const match of matches) { - returnObject[match[1]] = match[2]; - } - return returnObject; + return result; + } + toCammelCase(string) { + return string.replace(/-([a-z])/g, function (g) { + return g[1].toUpperCase(); + }); + } + extractHidden(body) { + const returnObject = {}; + let matches; + if (body.matchAll) { + matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); + } else { + this.log.warn( + "The adapter needs in the future NodeJS v12. https://forum.iobroker.net/topic/22867/how-to-node-js-f%C3%BCr-iobroker-richtig-updaten" + ); + matches = this.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g, body); } - matchAll(re, str) { - let match; - const matches = []; - - while ((match = re.exec(str))) { - // add all matched groups - matches.push(match); - } - - return matches; + for (const match of matches) { + returnObject[match[1]] = match[2]; } - /** - * Is called when adapter shuts down - callback has to be called under any circumstances! - * @param {() => void} callback - */ - onUnload(callback) { - try { - this.setState("info.connection", false, true); - this.log.info("cleaned everything up..."); - clearInterval(this.refreshTokenInterval); - clearInterval(this.vwrefreshTokenInterval); - clearInterval(this.updateInterval); - clearInterval(this.fupdateInterval); - clearTimeout(this.refreshTokenTimeout); - clearTimeout(this.refreshTimeout); - callback(); - } catch (e) { - callback(); - } + return returnObject; + } + matchAll(re, str) { + let match; + const matches = []; + + while ((match = re.exec(str))) { + // add all matched groups + matches.push(match); } - /** - * Is called if a subscribed state changes - * @param {string} id - * @param {ioBroker.State | null | undefined} state - */ - async onStateChange(id, state) { - try { - if (state) { - if (!state.ack) { - const vin = id.split(".")[2]; - let body = ""; - let contentType = ""; - if (vin === "refresh") { - this.updateStatus(); - return; - } - if (id.indexOf("remote.forceRefresh") !== -1) { - this.requestStatusUpdate(vin); - return; - } - if (id.indexOf("startCharging") !== -1) { - const idArray = id.split("."); - idArray.pop(); - idArray.push("id"); - const stationID = (await this.getStateAsync(idArray.join("."))).val; - this.log.info("Start charging for id: " + stationID); - request( - { - method: "POST", - url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/start", - headers: { - Host: "wecharge.apps.emea.vwapps.io", - accept: "application/json", - wc_access_token: this.config.wc_access_token, - authorization: "Bearer " + this.config.atoken, - "user-agent": this.userAgent, - "content-type": "application/json", - origin: "https://web-home-mobile.apps.emea.vwapps.io", - "x-requested-with": "com.volkswagen.weconnect", - "sec-fetch-site": "same-site", - "sec-fetch-mode": "cors", - "sec-fetch-dest": "empty", - referer: "https://web-home-mobile.apps.emea.vwapps.io/", - "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", - }, - gzip: true, - json: true, - body: { - station_id: stationID, - }, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to start Charging"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - - return; - } - body && this.log.info(JSON.stringify(body)); - } - ); - } - if (id.indexOf("stopCharging") !== -1) { - const idArray = id.split("."); - idArray.pop(); - idArray.push("id"); - const sessionId = (await this.getStateAsync(idArray.join("."))).val; - request( - { - method: "POST", - url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/" + sessionId + "/stop", - headers: { - Host: "wecharge.apps.emea.vwapps.io", - accept: "application/json", - wc_access_token: this.config.wc_access_token, - authorization: "Bearer " + this.config.atoken, - "user-agent": this.userAgent, - "content-type": "application/json", - origin: "https://web-home-mobile.apps.emea.vwapps.io", - "x-requested-with": "com.volkswagen.weconnect", - "sec-fetch-site": "same-site", - "sec-fetch-mode": "cors", - "sec-fetch-dest": "empty", - referer: "https://web-home-mobile.apps.emea.vwapps.io/", - "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", - }, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to stop Charging"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); + return matches; + } + /** + * Is called when adapter shuts down - callback has to be called under any circumstances! + * @param {() => void} callback + */ + onUnload(callback) { + try { + this.setState("info.connection", false, true); + this.log.info("cleaned everything up..."); + clearInterval(this.refreshTokenInterval); + clearInterval(this.vwrefreshTokenInterval); + clearInterval(this.updateInterval); + clearInterval(this.fupdateInterval); + clearTimeout(this.refreshTokenTimeout); + clearTimeout(this.refreshTimeout); + callback(); + } catch (e) { + callback(); + } + } + + /** + * Is called if a subscribed state changes + * @param {string} id + * @param {ioBroker.State | null | undefined} state + */ + async onStateChange(id, state) { + try { + if (state) { + if (!state.ack) { + const vin = id.split(".")[2]; + let body = ""; + let contentType = ""; + if (vin === "refresh") { + this.updateStatus(); + return; + } + if (id.indexOf("remote.forceRefresh") !== -1) { + this.requestStatusUpdate(vin); + return; + } + if (id.indexOf("startCharging") !== -1) { + const idArray = id.split("."); + idArray.pop(); + idArray.push("id"); + const stationID = (await this.getStateAsync(idArray.join("."))).val; + this.log.info("Start charging for id: " + stationID); + request( + { + method: "POST", + url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/start", + headers: { + Host: "wecharge.apps.emea.vwapps.io", + accept: "application/json", + wc_access_token: this.config.wc_access_token, + authorization: "Bearer " + this.config.atoken, + "user-agent": this.userAgent, + "content-type": "application/json", + origin: "https://web-home-mobile.apps.emea.vwapps.io", + "x-requested-with": "com.volkswagen.weconnect", + "sec-fetch-site": "same-site", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "empty", + referer: "https://web-home-mobile.apps.emea.vwapps.io/", + "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", + }, + gzip: true, + json: true, + body: { + station_id: stationID, + }, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to start Charging"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); - return; - } - body && this.log.info(JSON.stringify(body)); - } - ); - } - if (id.indexOf("Settings.") != -1) { - if (this.config.type === "id" || this.config.type === "audietron") { - const action = id.split(".")[5]; - const settingsPath = id.split(".")[4]; - const pre = this.name + "." + this.instance; - const states = await this.getStatesAsync(pre + "." + vin + ".status." + settingsPath + ".*"); - const body = {}; - const allIds = Object.keys(states); - allIds.forEach((keyName) => { - const key = keyName.split(".").splice(-1)[0]; - if (key.indexOf("Timestamp") === -1) { - body[key] = states[keyName].val; - } - }); - body[action] = state.val; - const firstPart = settingsPath.split("Settings")[0]; - this.setIdRemote(vin, firstPart, "settings", body).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } - } - if (id.indexOf(".settings.") != -1) { - if (this.config.type === "skodae") { - const idArray = id.split("."); - const action = idArray[idArray.length - 1]; - const settingsPath = id.split(".")[4]; - const pre = this.name + "." + this.instance; - const states = await this.getStatesAsync(pre + "." + vin + ".status." + settingsPath + ".settings.*"); - const body = {}; - const allIds = Object.keys(states); - allIds.forEach((keyName) => { - const keyNameArray = keyName.split("."); - const key = keyNameArray[keyNameArray.length - 1]; - const subKey = keyNameArray[keyNameArray.length - 2]; - if (subKey === "settings" && states[keyName]) { - body[key] = states[keyName].val; - if (key === action) { - body[action] = state.val; - } - } else if (states[keyName]) { - if (!body[subKey]) { - body[subKey] = {}; - } - body[subKey][key] = states[keyName].val; - if (key === action) { - body[subKey][action] = state.val; - } - } - }); - this.setSkodaESettings(vin, settingsPath, "UpdateSettings", body).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } - } + return; + } + body && this.log.info(JSON.stringify(body)); + } + ); + } + if (id.indexOf("stopCharging") !== -1) { + const idArray = id.split("."); + idArray.pop(); + idArray.push("id"); + const sessionId = (await this.getStateAsync(idArray.join("."))).val; + request( + { + method: "POST", + url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/" + sessionId + "/stop", + headers: { + Host: "wecharge.apps.emea.vwapps.io", + accept: "application/json", + wc_access_token: this.config.wc_access_token, + authorization: "Bearer " + this.config.atoken, + "user-agent": this.userAgent, + "content-type": "application/json", + origin: "https://web-home-mobile.apps.emea.vwapps.io", + "x-requested-with": "com.volkswagen.weconnect", + "sec-fetch-site": "same-site", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "empty", + referer: "https://web-home-mobile.apps.emea.vwapps.io/", + "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", + }, + gzip: true, + json: true, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed to stop Charging"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); - if (id.indexOf("remote.") !== -1) { - const action = id.split(".")[4]; - if (action === "batterycharge") { - body = '\n\n start\n'; - if (state.val === false) { - body = '\n\n stop\n'; - } - contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "chargeMinLimit") { - body = ` + return; + } + body && this.log.info(JSON.stringify(body)); + } + ); + } + if (id.indexOf("Settings.") != -1) { + if (this.config.type === "id" || this.config.type === "audietron") { + const action = id.split(".")[5]; + const settingsPath = id.split(".")[4]; + const pre = this.name + "." + this.instance; + const states = await this.getStatesAsync(pre + "." + vin + ".status." + settingsPath + ".*"); + const body = {}; + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + const key = keyName.split(".").splice(-1)[0]; + if (key.indexOf("Timestamp") === -1) { + body[key] = states[keyName].val; + } + }); + body[action] = state.val; + const firstPart = settingsPath.split("Settings")[0]; + this.setIdRemote(vin, firstPart, "settings", body).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } + if (id.indexOf(".settings.") != -1) { + if (this.config.type === "skodae") { + const idArray = id.split("."); + const action = idArray[idArray.length - 1]; + const settingsPath = id.split(".")[4]; + const pre = this.name + "." + this.instance; + const states = await this.getStatesAsync(pre + "." + vin + ".status." + settingsPath + ".settings.*"); + const body = {}; + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + const keyNameArray = keyName.split("."); + const key = keyNameArray[keyNameArray.length - 1]; + const subKey = keyNameArray[keyNameArray.length - 2]; + if (subKey === "settings" && states[keyName]) { + body[key] = states[keyName].val; + if (key === action) { + body[action] = state.val; + } + } else if (states[keyName]) { + if (!body[subKey]) { + body[subKey] = {}; + } + body[subKey][key] = states[keyName].val; + if (key === action) { + body[subKey][action] = state.val; + } + } + }); + this.setSkodaESettings(vin, settingsPath, "UpdateSettings", body).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } + + if (id.indexOf("remote.") !== -1) { + const action = id.split(".")[4]; + if (action === "batterycharge") { + body = '\n\n start\n'; + if (state.val === false) { + body = '\n\n stop\n'; + } + contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", + body, + contentType + ).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "chargeMinLimit") { + body = ` setChargeMinLimit @@ -4528,503 +4631,544 @@ class VwWeconnect extends utils.Adapter { `; - contentType = "application/vnd.vwg.mbb.timeraction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer/actions", body, contentType).catch(() => { - this.log.error("failed set min limit state"); - }); - } - if (action === "maxChargeCurrent") { - body = - '\nsetSettings \n \n' + - state.val + - " \n \n"; - contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "charging") { - if (this.config.type === "id" || this.config.type === "audietron") { - const value = state.val ? "start" : "stop"; - this.setIdRemote(vin, action, value).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } else if (this.config.type === "seatcupra") { - const value = state.val ? "start" : "stop"; - this.setSeatCupraStatus(vin, action, value).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } else if (this.config.type === "skodae") { - const value = state.val ? "Start" : "Stop"; - this.setSkodaESettings(vin, action, value).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } - } - if (action === "air-conditioning") { - if (this.config.type === "skodae") { - const value = state.val ? "Start" : "Stop"; - this.setSkodaESettings(vin, action, value).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } - } - if (action === "targetTemperatureInCelsius") { - if (this.config.type === "skodae") { - const pre = this.name + "." + this.instance; - this.setState(pre + "." + vin + ".status.air-conditioning.settings.targetTemperatureInKelvin", state.val + 273.15, false); - } - } - if (action === "climatisation" || action === "climatisationv2" || action === "climatisationv3") { - if (this.config.type === "id" || this.config.type === "audietron") { - const value = state.val ? "start" : "stop"; - this.setIdRemote(vin, action, value).catch(() => { - this.log.error("failed set state " + action); - }); - return; - } else if (this.config.type === "seatcupra") { - const value = state.val ? "start" : "stop"; - this.setSeatCupraStatus(vin, action, value).catch((error) => { - this.log.error("failed set state " + action); - this.log.error(error); - }); - return; - } else { - body = '\n\n startClimatisation\n'; - if (action === "climatisationv2") { - const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); - let heaterSource = "electric"; - if (heaterSourceState.val) { - heaterSource = heaterSourceState.val; - } - body = - '\n\n startClimatisation ' + - heaterSource + - " \n"; - } - if (state.val === false) { - body = '\n\n stopClimatisation\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - if (action === "climatisationv3") { - const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); - let heaterSource = "electric"; - if (heaterSourceState.val) { - heaterSource = heaterSourceState.val; - } - const isMirrorHeatingEnabledState = await this.getStateAsync(vin + ".climater.settings.climaterElementSettings.isMirrorHeatingEnabled.content"); - let isMirror = true; - if (isMirrorHeatingEnabledState.val) { - isMirror = isMirrorHeatingEnabledState.val; - } - const tagetTempState = await this.getStateAsync(vin + ".climater.settings.targetTemperature.content"); - let targetTemp = 2950; - if (tagetTempState.val) { - targetTemp = tagetTempState.val; - } - - body = { - action: { - type: "startClimatisation", - settings: { - targetTemperature: targetTemp, - heaterSource: heaterSource, - climaterElementSettings: { - isMirrorHeatingEnabled: isMirror, - zoneSettings: { - zoneSetting: [ - { - value: { - position: "frontLeft", - isEnabled: true, - }, - }, - { - value: { - position: "frontRight", - isEnabled: true, - }, - }, - { - value: { - position: "rearLeft", - isEnabled: true, - }, - }, - { - value: { - position: "rearRight", - isEnabled: true, - }, - }, - ], - }, - }, - }, - }, - }; - if (state.val === false) { - body = { - action: { - type: "stopClimatisation", - }, - }; - } - contentType = "application/json; charset=utf-8"; - body = JSON.stringify(body); - this.log.debug(body); - } - - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - } + contentType = "application/vnd.vwg.mbb.timeraction_v1_0_0+xml"; + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer/actions", + body, + contentType + ).catch(() => { + this.log.error("failed set min limit state"); + }); + } + if (action === "maxChargeCurrent") { + body = + '\nsetSettings \n \n' + + state.val + + " \n \n"; + contentType = "application/vnd.vwg.mbb.ChargerAction_v1_0_0+xml"; + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", + body, + contentType + ).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "charging") { + if (this.config.type === "id" || this.config.type === "audietron") { + const value = state.val ? "start" : "stop"; + this.setIdRemote(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } else if (this.config.type === "seatcupra") { + const value = state.val ? "start" : "stop"; + this.setSeatCupraStatus(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } else if (this.config.type === "skodae") { + const value = state.val ? "Start" : "Stop"; + this.setSkodaESettings(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } + if (action === "air-conditioning") { + if (this.config.type === "skodae") { + const value = state.val ? "Start" : "Stop"; + this.setSkodaESettings(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } + if (action === "targetTemperatureInCelsius") { + if (this.config.type === "skodae") { + const pre = this.name + "." + this.instance; + this.setState(pre + "." + vin + ".status.air-conditioning.settings.targetTemperatureInKelvin", state.val + 273.15, false); + } + } + if (action === "climatisation" || action === "climatisationv2" || action === "climatisationv3") { + if (this.config.type === "id" || this.config.type === "audietron") { + const value = state.val ? "start" : "stop"; + this.setIdRemote(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } else if (this.config.type === "seatcupra") { + const value = state.val ? "start" : "stop"; + this.setSeatCupraStatus(vin, action, value).catch((error) => { + this.log.error("failed set state " + action); + this.log.error(error); + }); + return; + } else { + body = '\n\n startClimatisation\n'; + if (action === "climatisationv2") { + const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); + let heaterSource = "electric"; + if (heaterSourceState.val) { + heaterSource = heaterSourceState.val; + } + body = + '\n\n startClimatisation ' + + heaterSource + + " \n"; + } + if (state.val === false) { + body = '\n\n stopClimatisation\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + if (action === "climatisationv3") { + const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); + let heaterSource = "electric"; + if (heaterSourceState.val) { + heaterSource = heaterSourceState.val; + } + const isMirrorHeatingEnabledState = await this.getStateAsync( + vin + ".climater.settings.climaterElementSettings.isMirrorHeatingEnabled.content" + ); + let isMirror = true; + if (isMirrorHeatingEnabledState.val) { + isMirror = isMirrorHeatingEnabledState.val; + } + const tagetTempState = await this.getStateAsync(vin + ".climater.settings.targetTemperature.content"); + let targetTemp = 2950; + if (tagetTempState.val) { + targetTemp = tagetTempState.val; + } + + body = { + action: { + type: "startClimatisation", + settings: { + targetTemperature: targetTemp, + heaterSource: heaterSource, + climaterElementSettings: { + isMirrorHeatingEnabled: isMirror, + zoneSettings: { + zoneSetting: [ + { + value: { + position: "frontLeft", + isEnabled: true, + }, + }, + { + value: { + position: "frontRight", + isEnabled: true, + }, + }, + { + value: { + position: "rearLeft", + isEnabled: true, + }, + }, + { + value: { + position: "rearRight", + isEnabled: true, + }, + }, + ], + }, + }, + }, + }, + }; + if (state.val === false) { + body = { + action: { + type: "stopClimatisation", + }, + }; + } + contentType = "application/json; charset=utf-8"; + body = JSON.stringify(body); + this.log.debug(body); + } - if (action === "ventilation" || action === "ventilationv2" || action === "ventilationv3") { - const idArray = id.split("."); - idArray.pop(); - idArray.push(action + "Duration"); - const ventilationDurationPath = idArray.join("."); - const durationState = await this.getStateAsync(ventilationDurationPath); - let duration = 30; - if (durationState && durationState.val) { - duration = durationState.val; - } - let body = - '\n\n \n true\n' + - duration + - "\n " + - action + - "\n"; - if (state.val === false) { - body = - '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; - if (action === "ventilationv2") { - body = '{"performAction":{"quickstart":{"startMode":"ventilation","active":true,"climatisationDuration":' + duration + "}}}"; - if (state.val === false) { - body = '{"performAction":{"quickstop":{"active":false}}}'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; - } + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", + body, + contentType + ).catch(() => { + this.log.error("failed set state"); + }); + } + } - let secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - if (action === "ventilationv3") { - body = '{"performAction":{"quickstart":{"active":true,"climatisationDuration":' + duration + "}}}"; - if (state.val === false) { - body = '{"performAction":{"quickstop":{"active":false}}}'; - secToken = null; - } - contentType = "application/json; charset=utf-8"; - } - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "ventilation" || action === "ventilationv2" || action === "ventilationv3") { + const idArray = id.split("."); + idArray.pop(); + idArray.push(action + "Duration"); + const ventilationDurationPath = idArray.join("."); + const durationState = await this.getStateAsync(ventilationDurationPath); + let duration = 30; + if (durationState && durationState.val) { + duration = durationState.val; + } + let body = + '\n\n \n true\n' + + duration + + "\n " + + action + + "\n"; + if (state.val === false) { + body = + '\n\n \n false\n \n'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; + if (action === "ventilationv2") { + body = '{"performAction":{"quickstart":{"startMode":"ventilation","active":true,"climatisationDuration":' + duration + "}}}"; + if (state.val === false) { + body = '{"performAction":{"quickstop":{"active":false}}}'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; + } + + let secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + if (action === "ventilationv3") { + body = '{"performAction":{"quickstart":{"active":true,"climatisationDuration":' + duration + "}}}"; + if (state.val === false) { + body = '{"performAction":{"quickstop":{"active":false}}}'; + secToken = null; + } + contentType = "application/json; charset=utf-8"; + } + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "climatisationTemperature") { - let temp = 2950; - if (state.val && !isNaN(state.val)) { - temp = (parseFloat(state.val) + 273) * 10; - } + if (action === "climatisationTemperature") { + let temp = 2950; + if (state.val && !isNaN(state.val)) { + temp = (parseFloat(state.val) + 273) * 10; + } + + const climatisationWithoutHVpowerState = await this.getStateAsync(vin + ".climater.settings.climatisationWithoutHVpower.content"); + let climatisationWithoutHVpower = false; + + if (climatisationWithoutHVpowerState.val) { + climatisationWithoutHVpower = climatisationWithoutHVpowerState.val; + } + const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); + let heaterSource = "electric"; + if (heaterSourceState.val) { + heaterSource = heaterSourceState.val; + } + body = + '\n\n setSettings ' + + temp + + " " + + climatisationWithoutHVpower + + " " + + heaterSource + + " \n"; + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", + body, + contentType + ).catch(() => { + this.log.error("failed set state"); + }); + } - const climatisationWithoutHVpowerState = await this.getStateAsync(vin + ".climater.settings.climatisationWithoutHVpower.content"); - let climatisationWithoutHVpower = false; + if (action === "windowheating") { + body = '\n\n startWindowHeating\n'; + if (state.val === false) { + body = '\n\n stopWindowHeating\n'; + } + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", + body, + contentType + ).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "flash") { + //HONK_AND_FLASH + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } + body = + '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + + latitude.val + + ',"longitude":' + + longitude.val + + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (climatisationWithoutHVpowerState.val) { - climatisationWithoutHVpower = climatisationWithoutHVpowerState.val; - } - const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); - let heaterSource = "electric"; - if (heaterSourceState.val) { - heaterSource = heaterSourceState.val; - } - body = - '\n\n setSettings ' + - temp + - " " + - climatisationWithoutHVpower + - " " + - heaterSource + - " \n"; - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "honk") { + // + const idArray = id.split("."); + idArray.pop(); + idArray.pop(); + idArray.push("position.carCoordinate"); + const posId = idArray.join("."); + const longitude = await this.getStateAsync(posId + ".longitude"); + const latitude = await this.getStateAsync(posId + ".latitude"); + if (!longitude || !latitude) { + this.log.info("No Location available, location information needed for this action"); + return; + } + body = + '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + + latitude.val + + ',"longitude":' + + longitude.val + + "}}}"; + contentType = "application/json; charset=UTF-8"; + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.log.error("failed set state"); + }); + } - if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; - if (state.val === false) { - body = '\n\n stopWindowHeating\n'; - } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "flash") { - //HONK_AND_FLASH - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - if (!longitude || !latitude) { - this.log.info("No Location available, location information needed for this action"); - return; - } - body = '{"honkAndFlashRequest":{"serviceOperationCode":"FLASH_ONLY","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + if (action === "standheizung" || action === "standheizungv2") { + body = + '\n\n \n true\n \n'; + if (state.val === false) { + body = + '\n\n \n false\n \n'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; + if (action === "standheizungv2") { + body = '{"performAction":{"quickstart":{"startMode":"heating","active":true,"climatisationDuration":30}}}'; + if (state.val === false) { + body = '{"performAction":{"quickstop":{"active":false}}}'; + } + contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; + } - if (action === "honk") { - // - const idArray = id.split("."); - idArray.pop(); - idArray.pop(); - idArray.push("position.carCoordinate"); - const posId = idArray.join("."); - const longitude = await this.getStateAsync(posId + ".longitude"); - const latitude = await this.getStateAsync(posId + ".latitude"); - if (!longitude || !latitude) { - this.log.info("No Location available, location information needed for this action"); - return; - } - body = '{"honkAndFlashRequest":{"serviceOperationCode":"HONK_AND_FLASH","userPosition":{"latitude":' + latitude.val + ',"longitude":' + longitude.val + "}}}"; - contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { - this.log.error("failed set state"); - }); - } + const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.log.error("failed set state"); + }); + } + if (action === "lock" || action === "lockv2") { + body = + '\n\n lock\n'; + let lockAction = "LOCK"; + if (state.val === false) { + body = + '\n\n unlock\n'; + lockAction = "UNLOCK"; + } + contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; + const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch( + () => { + this.log.error("failed set state"); + } + ); + } + } - if (action === "standheizung" || action === "standheizungv2") { - body = - '\n\n \n true\n \n'; - if (state.val === false) { - body = - '\n\n \n false\n \n'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; - if (action === "standheizungv2") { - body = '{"performAction":{"quickstart":{"startMode":"heating","active":true,"climatisationDuration":30}}}'; - if (state.val === false) { - body = '{"performAction":{"quickstop":{"active":false}}}'; - } - contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+json"; - } + this.refreshTimeout && clearTimeout(this.refreshTimeout); + this.refreshTimeout = setTimeout(async () => { + this.updateStatus(); + }, 10 * 1000); + } else { + const vin = id.split(".")[2]; + if (id.indexOf("climatisationState.content") !== -1) { + let value = false; + if (state.val === "on" || state.val === "heating") { + value = true; + } + this.setState(vin + ".remote.climatisation", value, true); + this.setState(vin + ".remote.climatisationv2", value, true); + } + if (id.indexOf("maxChargeCurrent.content") !== -1) { + this.setState(vin + ".remote.maxChargeCurrent", state.val, true); + } + if (id.indexOf("climatisationStatus.climatisationState") !== -1) { + let value = false; + if (state.val === "on" || state.val === "heating") { + value = true; + } + this.setState(vin + ".remote.climatisation", value, true); + } + if (id.indexOf("chargingStatus.chargingState") !== -1) { + if (this.config.type === "id" || this.config.type === "audietron") { + this.setState(vin + ".remote.charging", state.val !== "readyForCharging" ? true : false, true); + } else { + this.setState(vin + ".remote.batterycharge", state.val !== "readyForCharging" ? true : false, true); + } + } + if (id.indexOf("status.charging.state") !== -1) { + if (this.config.type === "skodae") { + this.setState(vin + ".remote.charging", state.val === "On" ? true : false, true); + } + } + if (id.indexOf("air-conditioning.status.state") !== -1) { + if (this.config.type === "skodae") { + this.setState(vin + ".remote.air-conditioning", state.val === "On" ? true : false, true); + } + } + if (id.indexOf("settings.targetTemperatureInKelvin") !== -1) { + if (this.config.type === "skodae") { + this.setState(vin + ".remote.targetTemperatureInCelsius", state.val - 273.15); + } + } + if (id.indexOf(".status.isCarLocked") !== -1) { + this.setState(vin + ".remote.lock", state.val, true); + } + + if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { + const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + const longitudeValue = parseFloat(longitude.val); + + await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { + type: "state", + common: { + name: "latitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); + await this.setObjectNotExistsAsync(vin + ".position.longitudeConv", { + type: "state", + common: { + name: "longitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } - if (action === "lock" || action === "lockv2") { - body = '\n\n lock\n'; - let lockAction = "LOCK"; - if (state.val === false) { - body = '\n\n unlock\n'; - lockAction = "UNLOCK"; - } - contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; - const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch(() => { - this.log.error("failed set state"); - }); - } - } + await this.setObjectNotExistsAsync(vin + ".position.geohash", { + type: "state", + common: { + name: "geohash converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.geohash", geohash.encode(state.val / 1000000, longitudeValue / 1000000), true); - this.refreshTimeout && clearTimeout(this.refreshTimeout); - this.refreshTimeout = setTimeout(async () => { - this.updateStatus(); - }, 10 * 1000); - } else { - const vin = id.split(".")[2]; - if (id.indexOf("climatisationState.content") !== -1) { - let value = false; - if (state.val === "on" || state.val === "heating") { - value = true; - } - this.setState(vin + ".remote.climatisation", value, true); - this.setState(vin + ".remote.climatisationv2", value, true); - } - if (id.indexOf("maxChargeCurrent.content") !== -1) { - this.setState(vin + ".remote.maxChargeCurrent", state.val, true); - } - if (id.indexOf("climatisationStatus.climatisationState") !== -1) { - let value = false; - if (state.val === "on" || state.val === "heating") { - value = true; - } - this.setState(vin + ".remote.climatisation", value, true); - } - if (id.indexOf("chargingStatus.chargingState") !== -1) { - if (this.config.type === "id" || this.config.type === "audietron") { - this.setState(vin + ".remote.charging", state.val !== "readyForCharging" ? true : false, true); - } else { - this.setState(vin + ".remote.batterycharge", state.val !== "readyForCharging" ? true : false, true); - } - } - if (id.indexOf("status.charging.state") !== -1) { - if (this.config.type === "skodae") { - this.setState(vin + ".remote.charging", state.val === "On" ? true : false, true); - } - } - if (id.indexOf("air-conditioning.status.state") !== -1) { - if (this.config.type === "skodae") { - this.setState(vin + ".remote.air-conditioning", state.val === "On" ? true : false, true); - } - } - if (id.indexOf("settings.targetTemperatureInKelvin") !== -1) { - if (this.config.type === "skodae") { - this.setState(vin + ".remote.targetTemperatureInCelsius", state.val - 273.15); - } - } - if (id.indexOf(".status.isCarLocked") !== -1) { - this.setState(vin + ".remote.lock", state.val, true); - } + if (!this.config.reversePos) { + this.log.debug("reverse pos deactivated"); + return; + } + this.log.debug("reverse pos started"); + request.get( + { + url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", - if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); - - await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { - type: "state", - common: { - name: "latitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); - await this.setObjectNotExistsAsync(vin + ".position.longitudeConv", { - type: "state", - common: { - name: "longitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); - - await this.setObjectNotExistsAsync(vin + ".position.geohash", { - type: "state", - common: { - name: "geohash converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, + headers: { + "User-Agent": "ioBroker/vw-connect", + }, + json: true, + followAllRedirects: true, + }, + async (err, resp, body) => { + this.log.debug("reverse pos received"); + this.log.debug(JSON.stringify(body)); + if (err || resp.statusCode >= 400 || !body) { + body && this.log.error(JSON.stringify(body)); + resp && this.log.error(resp.statusCode.toString()); + err && this.log.error(err); + return; + } + if (body.display_name) { + try { + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + await this.setObjectNotExistsAsync(vin + ".position.address.displayName", { + type: "state", + common: { + name: "displayName", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address.displayName", fullAdress, true); + Object.keys(body.address).forEach((key) => { + this.setObjectNotExistsAsync(vin + ".position.address." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState(vin + ".position.address." + key, body.address[key], true); + }) + .catch((error) => { + this.log.error(error); }); - this.setState(vin + ".position.geohash", geohash.encode(state.val / 1000000, longitudeValue / 1000000), true); - - if (!this.config.reversePos) { - this.log.debug("reverse pos deactivated"); - return; - } - this.log.debug("reverse pos started"); - request.get( - { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", - - headers: { - "User-Agent": "ioBroker/vw-connect", - }, - json: true, - followAllRedirects: true, - }, - async (err, resp, body) => { - this.log.debug("reverse pos received"); - this.log.debug(JSON.stringify(body)); - if (err || resp.statusCode >= 400 || !body) { - body && this.log.error(JSON.stringify(body)); - resp && this.log.error(resp.statusCode.toString()); - err && this.log.error(err); - return; - } - if (body.display_name) { - try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - await this.setObjectNotExistsAsync(vin + ".position.address.displayName", { - type: "state", - common: { - name: "displayName", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach((key) => { - this.setObjectNotExistsAsync(vin + ".position.address." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".position.address." + key, body.address[key], true); - }) - .catch((error) => { - this.log.error(error); - }); - }); - } catch (err) { - this.log.error(err); - } - } else { - this.log.error(JSON.stringify(body)); - } - } - ); - } + }); + } catch (err) { + this.log.error(err); + } + } else { + this.log.error(JSON.stringify(body)); } - } else { - // The state was deleted - // this.log.info(`state ${id} deleted`); - } - } catch (err) { - this.log.error("Error in OnStateChange: " + err); + } + ); + } } + } else { + // The state was deleted + // this.log.info(`state ${id} deleted`); + } + } catch (err) { + this.log.error("Error in OnStateChange: " + err); } + } } // @ts-ignore parent is a valid property on module if (module.parent) { - // Export the constructor in compact mode - /** - * @param {Partial} [options={}] - */ - module.exports = (options) => new VwWeconnect(options); + // Export the constructor in compact mode + /** + * @param {Partial} [options={}] + */ + module.exports = (options) => new VwWeconnect(options); } else { - // otherwise start the instance directly - new VwWeconnect(); + // otherwise start the instance directly + new VwWeconnect(); } diff --git a/package-lock.json b/package-lock.json index 080d0839..5fe667c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "iobroker.vw-connect", - "version": "0.0.50", + "version": "0.0.51", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.50", + "version": "0.0.51", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.0", "@peculiar/webcrypto": "^1.4.0", + "axios": "^0.27.2", "ngeohash": "^0.6.3", "qs": "^6.10.5", "request": "^2.88.2", @@ -534,6 +535,28 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, + "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==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/axios/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==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1196,6 +1219,25 @@ "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "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==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -3134,6 +3176,27 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + }, + "dependencies": { + "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==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3634,6 +3697,11 @@ "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "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==" + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", diff --git a/package.json b/package.json index 7eed71ce..090330be 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,11 @@ "bugs": { "url": "https://github.com/ta2k/ioBroker.vw-connect/issues" }, - "bundleDependencies": false, + "bundleDependencies": [], "dependencies": { "@iobroker/adapter-core": "^2.6.0", "@peculiar/webcrypto": "^1.4.0", + "axios": "^0.27.2", "ngeohash": "^0.6.3", "qs": "^6.10.5", "request": "^2.88.2", @@ -40,12 +41,12 @@ "chai": "^4.3.6", "chai-as-promised": "^7.1.1", "eslint": "^8.18.0", + "eslint-plugin-promise": "^6.0.0", "mocha": "^10.0.0", "proxyquire": "^2.1.3", "sinon": "^14.0.0", "sinon-chai": "^3.7.0", - "typescript": "~4.7.4", - "eslint-plugin-promise": "^6.0.0" + "typescript": "~4.7.4" }, "engines": { "node": ">=10.0.0" @@ -77,4 +78,4 @@ "test:unit": "mocha test/unit --exit" }, "version": "0.0.51" -} \ No newline at end of file +} From 282d4d8115c8236035458ce80591efc25dbe39ad Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 21 Jul 2022 01:06:30 +0200 Subject: [PATCH 412/729] add parkingposition --- main.js | 108 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 50 deletions(-) diff --git a/main.js b/main.js index 4b0a548d..d40273b4 100644 --- a/main.js +++ b/main.js @@ -2346,60 +2346,68 @@ class VwWeconnect extends utils.Adapter { } getIdStatus(vin) { return new Promise(async (resolve, reject) => { - request.get( - { - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/status", - - headers: { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + await axios({ + method: "get", + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/parkingposition", + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + this.extractKeys(this, vin + ".parkingposition", res.data); + }) + .catch((error) => { + this.log.debug(error); + // error.response && this.log.error(JSON.stringify(error.response.data)); + }); - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".status", body.data); - if (this.config.rawJson) { - this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { - type: "state", - common: { - name: vin + ".status" + "rawJson", - role: "state", - type: "json", - write: false, - read: true, - }, - native: {}, + await axios({ + method: "get", + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/status", + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + this.extractKeys(this, vin + ".status", res.data); + if (this.config.rawJson) { + this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { + type: "state", + common: { + name: vin + ".status" + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState(vin + ".status" + "rawJson", JSON.stringify(res.data), true); }) - .then(() => { - this.setState(vin + ".status" + "rawJson", JSON.stringify(body.data), true); - }) - .catch((error) => { - this.log.error(error); - }); - } - resolve(); - } catch (err) { - this.log.error(err); - reject(); + .catch((error) => { + this.log.error(error); + }); } - } - ); + resolve(); + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + reject(); + }); }); } getSeatCupraStatus(vin) { From 28b287cb5c96b956b198c75a915a62251cd1081d Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 21 Jul 2022 01:10:05 +0200 Subject: [PATCH 413/729] fix data path --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index d40273b4..0daf40b1 100644 --- a/main.js +++ b/main.js @@ -2360,7 +2360,7 @@ class VwWeconnect extends utils.Adapter { }) .then((res) => { this.log.debug(JSON.stringify(res.data)); - this.extractKeys(this, vin + ".parkingposition", res.data); + this.extractKeys(this, vin + ".parkingposition", res.data.data); }) .catch((error) => { this.log.debug(error); @@ -2381,7 +2381,7 @@ class VwWeconnect extends utils.Adapter { }) .then((res) => { this.log.debug(JSON.stringify(res.data)); - this.extractKeys(this, vin + ".status", res.data); + this.extractKeys(this, vin + ".status", res.data.data); if (this.config.rawJson) { this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -2395,7 +2395,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }) .then(() => { - this.setState(vin + ".status" + "rawJson", JSON.stringify(res.data), true); + this.setState(vin + ".status" + "rawJson", JSON.stringify(res.data.data), true); }) .catch((error) => { this.log.error(error); From fdd05e780b15aa9e32b3c63d1e3a6c2863f964e3 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 21 Jul 2022 01:27:15 +0200 Subject: [PATCH 414/729] hide error --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 0daf40b1..9e79aa62 100644 --- a/main.js +++ b/main.js @@ -2946,7 +2946,7 @@ class VwWeconnect extends utils.Adapter { "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", - [404], + [404, 500], "result" ) .then((body) => { From f29d931f98e3070247ac2d736ce425e22380eb6b Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 21 Jul 2022 09:11:49 +0200 Subject: [PATCH 415/729] refactor --- main.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/main.js b/main.js index 9e79aa62..20835328 100644 --- a/main.js +++ b/main.js @@ -2379,11 +2379,11 @@ class VwWeconnect extends utils.Adapter { "content-version": "1", }, }) - .then((res) => { + .then(async (res) => { this.log.debug(JSON.stringify(res.data)); this.extractKeys(this, vin + ".status", res.data.data); if (this.config.rawJson) { - this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { + await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", common: { name: vin + ".status" + "rawJson", @@ -2393,13 +2393,8 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }) - .then(() => { - this.setState(vin + ".status" + "rawJson", JSON.stringify(res.data.data), true); - }) - .catch((error) => { - this.log.error(error); - }); + }); + this.setState(vin + ".status" + "rawJson", JSON.stringify(res.data.data), true); } resolve(); }) From 2126b83e7774027a6c33b845846f03f9849a3ac6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 28 Jul 2022 15:23:52 +0200 Subject: [PATCH 416/729] add logs --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 20835328..e98836c1 100644 --- a/main.js +++ b/main.js @@ -920,6 +920,7 @@ class VwWeconnect extends utils.Adapter { } getTokensv2(getRequest, code_verifier, reject, resolve) { const url = getRequest.uri.query; + this.log.debug(url); const queries = qs.parse(url); const body = { client_id: this.clientId, @@ -931,6 +932,7 @@ class VwWeconnect extends utils.Adapter { }; const qmAuth = this.getQmauth(); this.log.debug(qmAuth); + this.log.debug(JSON.stringify(body)); request( { From e24b47a2c7c8fe62b16133f53b9af04406f4d913 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 28 Jul 2022 21:59:13 +0200 Subject: [PATCH 417/729] add error text --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index e98836c1..6c1e723f 100644 --- a/main.js +++ b/main.js @@ -953,7 +953,7 @@ class VwWeconnect extends utils.Adapter { }, (err, resp) => { if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed in get tokensv2 "); + this.log.error("Failed get tokensv2. Please check your if your local time is correct"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); resp && resp.body && this.log.error(JSON.stringify(resp.body)); From b5d917392de588349371c1451da4bd29004e2b82 Mon Sep 17 00:00:00 2001 From: Marc Winiger Date: Fri, 12 Aug 2022 20:17:30 +0200 Subject: [PATCH 418/729] bugfix #209 --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 6c1e723f..e4fa5f67 100644 --- a/main.js +++ b/main.js @@ -5037,7 +5037,7 @@ class VwWeconnect extends utils.Adapter { } if (id.indexOf("settings.targetTemperatureInKelvin") !== -1) { if (this.config.type === "skodae") { - this.setState(vin + ".remote.targetTemperatureInCelsius", state.val - 273.15); + this.setState(vin + ".remote.targetTemperatureInCelsius", state.val - 273.15, true); } } if (id.indexOf(".status.isCarLocked") !== -1) { From 26633f9b6242bd26ac6dbe7b18a639e149a2d5d2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 18 Aug 2022 16:10:54 +0200 Subject: [PATCH 419/729] add debug logs --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index 6c1e723f..490e7656 100644 --- a/main.js +++ b/main.js @@ -1386,6 +1386,7 @@ class VwWeconnect extends utils.Adapter { return new Promise((resolve, reject) => { this.log.debug("refreshToken "); this.log.debug(isVw ? "vw" : ""); + this.log.debug(`${url} ${body} ${JSON.stringify(form)}`); request.post( { url: url, @@ -1411,6 +1412,8 @@ class VwWeconnect extends utils.Adapter { return; } try { + this.log.debug(url); + this.log.debug("Token refreshed"); this.log.debug(JSON.stringify(body)); const tokens = JSON.parse(body); if (tokens.error) { From ef92faa49a30ef6a1e6f4a42a56a6d770de0f873 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 18 Aug 2022 16:11:09 +0200 Subject: [PATCH 420/729] move to 2 --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 11e64e82..2e2c2a0e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,7 +15,7 @@ "no-async-promise-executor": "off", "indent": [ "error", - 4, + 2, { "SwitchCase": 1 } From 5631923ea32b2c16ba7ef5f5040f244e23926398 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 10 Sep 2022 10:54:07 +0200 Subject: [PATCH 421/729] 0.0.52 --- .eslintrc.json | 2 +- gulpfile.js | 475 --- io-package.json | 326 +- package-lock.json | 9761 +++++++++++++++++++++++---------------------- package.json | 156 +- 5 files changed, 5175 insertions(+), 5545 deletions(-) delete mode 100644 gulpfile.js diff --git a/.eslintrc.json b/.eslintrc.json index 2e2c2a0e..7711eddc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -37,6 +37,6 @@ ] }, "parserOptions": { - "ecmaVersion": 2018 + "ecmaVersion": 2020 } } \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 95f92e6a..00000000 --- a/gulpfile.js +++ /dev/null @@ -1,475 +0,0 @@ -/*! - * ioBroker gulpfile - * Date: 2019-01-28 - */ -"use strict"; - -const gulp = require("gulp"); -const fs = require("fs"); -const pkg = require("./package.json"); -const iopackage = require("./io-package.json"); -const version = (pkg && pkg.version) ? pkg.version : iopackage.common.version; -const fileName = "words.js"; -const EMPTY = ""; -const translate = require("./lib/tools").translateText; -const languages = { - en: {}, - de: {}, - ru: {}, - pt: {}, - nl: {}, - fr: {}, - it: {}, - es: {}, - pl: {}, - "zh-cn": {} -}; - -function lang2data(lang, isFlat) { - let str = isFlat ? "" : "{\n"; - let count = 0; - for (const w in lang) { - if (lang.hasOwnProperty(w)) { - count++; - if (isFlat) { - str += (lang[w] === "" ? (isFlat[w] || w) : lang[w]) + "\n"; - } else { - const key = ' "' + w.replace(/"/g, '\\"') + '": '; - str += key + '"' + lang[w].replace(/"/g, '\\"') + '",\n'; - } - } - } - if (!count) - return isFlat ? "" : "{\n}"; - if (isFlat) { - return str; - } else { - return str.substring(0, str.length - 2) + "\n}"; - } -} - -function readWordJs(src) { - try { - let words; - if (fs.existsSync(src + "js/" + fileName)) { - words = fs.readFileSync(src + "js/" + fileName).toString(); - } else { - words = fs.readFileSync(src + fileName).toString(); - } - words = words.substring(words.indexOf("{"), words.length); - words = words.substring(0, words.lastIndexOf(";")); - - const resultFunc = new Function("return " + words + ";"); - - return resultFunc(); - } catch (e) { - return null; - } -} - -function padRight(text, totalLength) { - return text + (text.length < totalLength ? new Array(totalLength - text.length).join(" ") : ""); -} - -function writeWordJs(data, src) { - let text = ""; - text += "/*global systemDictionary:true */\n"; - text += "'use strict';\n\n"; - text += "systemDictionary = {\n"; - for (const word in data) { - if (data.hasOwnProperty(word)) { - text += " " + padRight('"' + word.replace(/"/g, '\\"') + '": {', 50); - let line = ""; - for (const lang in data[word]) { - if (data[word].hasOwnProperty(lang)) { - line += '"' + lang + '": "' + padRight(data[word][lang].replace(/"/g, '\\"') + '",', 50) + " "; - } - } - if (line) { - line = line.trim(); - line = line.substring(0, line.length - 1); - } - text += line + "},\n"; - } - } - text += "};"; - if (fs.existsSync(src + "js/" + fileName)) { - fs.writeFileSync(src + "js/" + fileName, text); - } else { - fs.writeFileSync(src + "" + fileName, text); - } -} - -function words2languages(src) { - const langs = Object.assign({}, languages); - const data = readWordJs(src); - if (data) { - for (const word in data) { - if (data.hasOwnProperty(word)) { - for (const lang in data[word]) { - if (data[word].hasOwnProperty(lang)) { - langs[lang][word] = data[word][lang]; - // pre-fill all other languages - for (const j in langs) { - if (langs.hasOwnProperty(j)) { - langs[j][word] = langs[j][word] || EMPTY; - } - } - } - } - } - } - if (!fs.existsSync(src + "i18n/")) { - fs.mkdirSync(src + "i18n/"); - } - for (const l in langs) { - if (!langs.hasOwnProperty(l)) - continue; - const keys = Object.keys(langs[l]); - keys.sort(); - const obj = {}; - for (let k = 0; k < keys.length; k++) { - obj[keys[k]] = langs[l][keys[k]]; - } - if (!fs.existsSync(src + "i18n/" + l)) { - fs.mkdirSync(src + "i18n/" + l); - } - - fs.writeFileSync(src + "i18n/" + l + "/translations.json", lang2data(obj)); - } - } else { - console.error("Cannot read or parse " + fileName); - } -} - -function words2languagesFlat(src) { - const langs = Object.assign({}, languages); - const data = readWordJs(src); - if (data) { - for (const word in data) { - if (data.hasOwnProperty(word)) { - for (const lang in data[word]) { - if (data[word].hasOwnProperty(lang)) { - langs[lang][word] = data[word][lang]; - // pre-fill all other languages - for (const j in langs) { - if (langs.hasOwnProperty(j)) { - langs[j][word] = langs[j][word] || EMPTY; - } - } - } - } - } - } - const keys = Object.keys(langs.en); - keys.sort(); - for (const l in langs) { - if (!langs.hasOwnProperty(l)) - continue; - const obj = {}; - for (let k = 0; k < keys.length; k++) { - obj[keys[k]] = langs[l][keys[k]]; - } - langs[l] = obj; - } - if (!fs.existsSync(src + "i18n/")) { - fs.mkdirSync(src + "i18n/"); - } - for (const ll in langs) { - if (!langs.hasOwnProperty(ll)) - continue; - if (!fs.existsSync(src + "i18n/" + ll)) { - fs.mkdirSync(src + "i18n/" + ll); - } - - fs.writeFileSync(src + "i18n/" + ll + "/flat.txt", lang2data(langs[ll], langs.en)); - } - fs.writeFileSync(src + "i18n/flat.txt", keys.join("\n")); - } else { - console.error("Cannot read or parse " + fileName); - } -} - -function languagesFlat2words(src) { - const dirs = fs.readdirSync(src + "i18n/"); - const langs = {}; - const bigOne = {}; - const order = Object.keys(languages); - dirs.sort(function (a, b) { - const posA = order.indexOf(a); - const posB = order.indexOf(b); - if (posA === -1 && posB === -1) { - if (a > b) - return 1; - if (a < b) - return -1; - return 0; - } else if (posA === -1) { - return -1; - } else if (posB === -1) { - return 1; - } else { - if (posA > posB) - return 1; - if (posA < posB) - return -1; - return 0; - } - }); - const keys = fs.readFileSync(src + "i18n/flat.txt").toString().split("\n"); - - for (const lang of dirs) { - if (lang === "flat.txt") - continue; - const values = fs.readFileSync(src + "i18n/" + lang + "/flat.txt").toString().split("\n"); - langs[lang] = {}; - keys.forEach(function (word, i) { - langs[lang][word] = values[i]; - }); - - const words = langs[lang]; - for (const word in words) { - if (words.hasOwnProperty(word)) { - bigOne[word] = bigOne[word] || {}; - if (words[word] !== EMPTY) { - bigOne[word][lang] = words[word]; - } - } - } - } - // read actual words.js - const aWords = readWordJs(); - - const temporaryIgnore = ["flat.txt"]; - if (aWords) { - // Merge words together - for (const w in aWords) { - if (aWords.hasOwnProperty(w)) { - if (!bigOne[w]) { - console.warn("Take from actual words.js: " + w); - bigOne[w] = aWords[w]; - } - dirs.forEach(function (lang) { - if (temporaryIgnore.indexOf(lang) !== -1) - return; - if (!bigOne[w][lang]) { - console.warn('Missing "' + lang + '": ' + w); - } - }); - } - } - - } - - writeWordJs(bigOne, src); -} - -function languages2words(src) { - const dirs = fs.readdirSync(src + "i18n/"); - const langs = {}; - const bigOne = {}; - const order = Object.keys(languages); - dirs.sort(function (a, b) { - const posA = order.indexOf(a); - const posB = order.indexOf(b); - if (posA === -1 && posB === -1) { - if (a > b) - return 1; - if (a < b) - return -1; - return 0; - } else if (posA === -1) { - return -1; - } else if (posB === -1) { - return 1; - } else { - if (posA > posB) - return 1; - if (posA < posB) - return -1; - return 0; - } - }); - for (const lang of dirs) { - if (lang === "flat.txt") - continue; - langs[lang] = fs.readFileSync(src + "i18n/" + lang + "/translations.json").toString(); - langs[lang] = JSON.parse(langs[lang]); - const words = langs[lang]; - for (const word in words) { - if (words.hasOwnProperty(word)) { - bigOne[word] = bigOne[word] || {}; - if (words[word] !== EMPTY) { - bigOne[word][lang] = words[word]; - } - } - } - } - // read actual words.js - const aWords = readWordJs(); - - const temporaryIgnore = ["flat.txt"]; - if (aWords) { - // Merge words together - for (const w in aWords) { - if (aWords.hasOwnProperty(w)) { - if (!bigOne[w]) { - console.warn("Take from actual words.js: " + w); - bigOne[w] = aWords[w]; - } - dirs.forEach(function (lang) { - if (temporaryIgnore.indexOf(lang) !== -1) - return; - if (!bigOne[w][lang]) { - console.warn('Missing "' + lang + '": ' + w); - } - }); - } - } - - } - - writeWordJs(bigOne, src); -} - -async function translateNotExisting(obj, baseText, yandex) { - let t = obj["en"]; - if (!t) { - t = baseText; - } - - if (t) { - for (let l in languages) { - if (!obj[l]) { - const time = new Date().getTime(); - obj[l] = await translate(t, l, yandex); - console.log("en -> " + l + " " + (new Date().getTime() - time) + " ms"); - } - } - } -} - -//TASKS - -gulp.task("adminWords2languages", function (done) { - words2languages("./admin/"); - done(); -}); - -gulp.task("adminWords2languagesFlat", function (done) { - words2languagesFlat("./admin/"); - done(); -}); - -gulp.task("adminLanguagesFlat2words", function (done) { - languagesFlat2words("./admin/"); - done(); -}); - -gulp.task("adminLanguages2words", function (done) { - languages2words("./admin/"); - done(); -}); - -gulp.task("updatePackages", function (done) { - iopackage.common.version = pkg.version; - iopackage.common.news = iopackage.common.news || {}; - if (!iopackage.common.news[pkg.version]) { - const news = iopackage.common.news; - const newNews = {}; - - newNews[pkg.version] = { - en: "news", - de: "neues", - ru: "новое", - pt: "novidades", - nl: "nieuws", - fr: "nouvelles", - it: "notizie", - es: "noticias", - pl: "nowości", - "zh-cn": "新" - }; - iopackage.common.news = Object.assign(newNews, news); - } - fs.writeFileSync("io-package.json", JSON.stringify(iopackage, null, 4)); - done(); -}); - -gulp.task("updateReadme", function (done) { - const readme = fs.readFileSync("README.md").toString(); - const pos = readme.indexOf("## Changelog\n"); - if (pos !== -1) { - const readmeStart = readme.substring(0, pos + "## Changelog\n".length); - const readmeEnd = readme.substring(pos + "## Changelog\n".length); - - if (readme.indexOf(version) === -1) { - const timestamp = new Date(); - const date = timestamp.getFullYear() + "-" + - ("0" + (timestamp.getMonth() + 1).toString(10)).slice(-2) + "-" + - ("0" + (timestamp.getDate()).toString(10)).slice(-2); - - let news = ""; - if (iopackage.common.news && iopackage.common.news[pkg.version]) { - news += "* " + iopackage.common.news[pkg.version].en; - } - - fs.writeFileSync("README.md", readmeStart + "### " + version + " (" + date + ")\n" + (news ? news + "\n\n" : "\n") + readmeEnd); - } - } - done(); -}); - -gulp.task("translate", async function (done) { - - let yandex; - const i = process.argv.indexOf("--yandex"); - if (i > -1) { - yandex = process.argv[i + 1]; - } - - if (iopackage && iopackage.common) { - if (iopackage.common.news) { - console.log("Translate News"); - for (let k in iopackage.common.news) { - console.log("News: " + k); - let nw = iopackage.common.news[k]; - await translateNotExisting(nw, null, yandex); - } - } - if (iopackage.common.titleLang) { - console.log("Translate Title"); - await translateNotExisting(iopackage.common.titleLang, iopackage.common.title, yandex); - } - if (iopackage.common.desc) { - console.log("Translate Description"); - await translateNotExisting(iopackage.common.desc, null, yandex); - } - - if (fs.existsSync("./admin/i18n/en/translations.json")) { - let enTranslations = require("./admin/i18n/en/translations.json"); - for (let l in languages) { - console.log("Translate Text: " + l); - let existing = {}; - if (fs.existsSync("./admin/i18n/" + l + "/translations.json")) { - existing = require("./admin/i18n/" + l + "/translations.json"); - } - for (let t in enTranslations) { - if (!existing[t]) { - existing[t] = await translate(enTranslations[t], l, yandex); - } - } - if (!fs.existsSync("./admin/i18n/" + l + "/")) { - fs.mkdirSync("./admin/i18n/" + l + "/"); - } - fs.writeFileSync("./admin/i18n/" + l + "/translations.json", JSON.stringify(existing, null, 4)); - } - } - - } - fs.writeFileSync("io-package.json", JSON.stringify(iopackage, null, 4)); -}); - -gulp.task("translateAndUpdateWordsJS", gulp.series("translate", "adminLanguages2words", "adminWords2languages")); - -gulp.task("default", gulp.series("updatePackages", "updateReadme")); \ No newline at end of file diff --git a/io-package.json b/io-package.json index a712ac69..70bc5d8a 100644 --- a/io-package.json +++ b/io-package.json @@ -1,173 +1,161 @@ { - "common": { - "name": "vw-connect", - "version": "0.0.51", - "news": { - "0.0.51": { - "en": "fix Audi etron login" - }, - "0.0.50": { - "en": "fix VWc2 Vehicle list, Add Audi Etron, Add start stop for WC Wallbox, fix restart after failed login" - }, - "0.0.48": { - "en": "fix login, fix audi update, add limit for wallbox" - }, - "0.0.47": { - "en": "add audi standheizung" - }, - "0.0.46": { - "en": "add audi dataplug" - }, - "0.0.45": { - "en": "improve refresh token" - }, - "0.0.44": { - "en": "increase refreshToken timeouts" - }, - "0.0.42": { - "en": "fix Skoda Login" - }, - "0.0.41": { - "en": "fix VWv2 refreshToken" - }, - "0.0.40": { - "en": "add climate v3 for newer cars. Add Powerpass and Seat Elli" - }, - "0.0.39": { - "en": "fix id logn" - }, - "0.0.36": { - "en": "add Skoda Enyaq support" - }, - "0.0.35": { - "en": "add nodeJs v10 compatibility" - }, - "0.0.34": { - "en": "add auto accept of new privacy consent" - }, - "0.0.32": { - "en": "correct selection of last recent trips" - }, - "0.0.31": { - "en": "enable multiple selection of trip types" - }, - "0.0.30": { - "en": "fix problem with multiple cars, add VWv2 mode, VW and VWv2 are equal at the moment" - }, - "0.0.29": { - "en": "fix skoda refreshToken, smaller improvements" - } - }, - "title": "VW Connect", - "titleLang": { - "en": "VW Connect", - "de": "VW Connect", - "ru": "VW мы соединяемся", - "pt": "VW Connect", - "nl": "VW Connect", - "fr": "VW Connect", - "it": "VW Connect", - "es": "VW Connect", - "pl": "VW Connect", - "zh-cn": "大众我们连接" - }, - "desc": { - "en": "Adapter for VW Connect", - "de": "Adapter für VW Connect", - "ru": "Адаптер для VW Connect", - "pt": "Adaptador para VW Connect", - "nl": "Adapter voor VW Connect", - "fr": "Adaptateur pour VW Connect", - "it": "Adattatore per VW Connect", - "es": "Adaptador para VW Connect", - "pl": "Adapter do VW Connect", - "zh-cn": "大众我们连接的适配器" - }, - "authors": [ - "ta2k ", - "Sneak-L8 " - ], - "keywords": [ - "VW", - "Connect", - "Audi", - "myAudi", - "Skoda", - "Skoda Connect", - "VW Connect", - "VW Connect ID", - "ID.3", - "VW Connect Go", - "Seat" - ], - "license": "MIT", - "platform": "Javascript/Node.js", - "main": "main.js", - "icon": "vw-connect.png", - "enabled": true, - "extIcon": "https://raw.githubusercontent.com/ta2k/ioBroker.vw-connect/master/admin/vw-connect.png", - "readme": "https://github.com/ta2k/ioBroker.vw-connect/blob/master/README.md", - "loglevel": "info", - "mode": "daemon", - "type": "vehicle", - "compact": true, - "connectionType": "cloud", - "dataSource": "poll", - "materialize": true, - "plugins": { - "sentry": { - "dsn": "https://8318f3635f334042a0525ee37a87a587@sentry.iobroker.net/66" - } - }, - "dependencies": [ - { - "js-controller": ">=1.4.2" - } - ] + "common": { + "name": "vw-connect", + "version": "0.0.52", + "news": { + "0.0.52": { + "en": "small bugfixes" + }, + "0.0.51": { + "en": "fix Audi etron login" + }, + "0.0.50": { + "en": "fix VWc2 Vehicle list, Add Audi Etron, Add start stop for WC Wallbox, fix restart after failed login" + }, + "0.0.48": { + "en": "fix login, fix audi update, add limit for wallbox" + }, + "0.0.47": { + "en": "add audi standheizung" + }, + "0.0.46": { + "en": "add audi dataplug" + }, + "0.0.45": { + "en": "improve refresh token" + }, + "0.0.44": { + "en": "increase refreshToken timeouts" + }, + "0.0.42": { + "en": "fix Skoda Login" + }, + "0.0.41": { + "en": "fix VWv2 refreshToken" + }, + "0.0.40": { + "en": "add climate v3 for newer cars. Add Powerpass and Seat Elli" + }, + "0.0.39": { + "en": "fix id logn" + }, + "0.0.36": { + "en": "add Skoda Enyaq support" + }, + "0.0.35": { + "en": "add nodeJs v10 compatibility" + }, + "0.0.34": { + "en": "add auto accept of new privacy consent" + }, + "0.0.32": { + "en": "correct selection of last recent trips" + }, + "0.0.31": { + "en": "enable multiple selection of trip types" + }, + "0.0.30": { + "en": "fix problem with multiple cars, add VWv2 mode, VW and VWv2 are equal at the moment" + }, + "0.0.29": { + "en": "fix skoda refreshToken, smaller improvements" + } }, - "native": { - "user": "", - "password": "", - "atoken": "", - "rtoken": "", - "vwatoken": "", - "vwrtoken": "", - "wc_access_token": "", - "wc_refresh_token": "", - "userid": "", - "pin": "", - "identifier": "", - "interval": 15, - "forceinterval": 360, - "historyLimit": 100, - "type": "vw", - "reversePos": false, - "rights": false, - "tripType": "none", - "numberOfTrips": 1 + "title": "VW Connect", + "titleLang": { + "en": "VW Connect", + "de": "VW Connect", + "ru": "VW мы соединяемся", + "pt": "VW Connect", + "nl": "VW Connect", + "fr": "VW Connect", + "it": "VW Connect", + "es": "VW Connect", + "pl": "VW Connect", + "zh-cn": "大众我们连接" }, - "objects": [], - "instanceObjects": [ - { - "_id": "info", - "type": "channel", - "common": { - "name": "Information" - }, - "native": {} - }, - { - "_id": "info.connection", - "type": "state", - "common": { - "role": "indicator.connected", - "name": "Device or service connected", - "type": "boolean", - "read": true, - "write": false, - "def": false - }, - "native": {} - } + "desc": { + "en": "Adapter for VW Connect", + "de": "Adapter für VW Connect", + "ru": "Адаптер для VW Connect", + "pt": "Adaptador para VW Connect", + "nl": "Adapter voor VW Connect", + "fr": "Adaptateur pour VW Connect", + "it": "Adattatore per VW Connect", + "es": "Adaptador para VW Connect", + "pl": "Adapter do VW Connect", + "zh-cn": "大众我们连接的适配器" + }, + "authors": ["ta2k ", "Sneak-L8 "], + "keywords": ["VW", "Connect", "Audi", "myAudi", "Skoda", "Skoda Connect", "VW Connect", "VW Connect ID", "ID.3", "VW Connect Go", "Seat"], + "license": "MIT", + "platform": "Javascript/Node.js", + "main": "main.js", + "icon": "vw-connect.png", + "enabled": true, + "extIcon": "https://raw.githubusercontent.com/ta2k/ioBroker.vw-connect/master/admin/vw-connect.png", + "readme": "https://github.com/ta2k/ioBroker.vw-connect/blob/master/README.md", + "loglevel": "info", + "mode": "daemon", + "type": "vehicle", + "compact": true, + "connectionType": "cloud", + "dataSource": "poll", + "materialize": true, + "plugins": { + "sentry": { + "dsn": "https://8318f3635f334042a0525ee37a87a587@sentry.iobroker.net/66" + } + }, + "dependencies": [ + { + "js-controller": ">=1.4.2" + } ] -} \ No newline at end of file + }, + "native": { + "user": "", + "password": "", + "atoken": "", + "rtoken": "", + "vwatoken": "", + "vwrtoken": "", + "wc_access_token": "", + "wc_refresh_token": "", + "userid": "", + "pin": "", + "identifier": "", + "interval": 15, + "forceinterval": 360, + "historyLimit": 100, + "type": "vw", + "reversePos": false, + "rights": false, + "tripType": "none", + "numberOfTrips": 1 + }, + "objects": [], + "instanceObjects": [ + { + "_id": "info", + "type": "channel", + "common": { + "name": "Information" + }, + "native": {} + }, + { + "_id": "info.connection", + "type": "state", + "common": { + "role": "indicator.connected", + "name": "Device or service connected", + "type": "boolean", + "read": true, + "write": false, + "def": false + }, + "native": {} + } + ] +} diff --git a/package-lock.json b/package-lock.json index 5fe667c3..d4ff5e94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,4836 +1,4953 @@ { - "name": "iobroker.vw-connect", - "version": "0.0.51", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "iobroker.vw-connect", - "version": "0.0.51", - "license": "MIT", - "dependencies": { - "@iobroker/adapter-core": "^2.6.0", - "@peculiar/webcrypto": "^1.4.0", - "axios": "^0.27.2", - "ngeohash": "^0.6.3", - "qs": "^6.10.5", - "request": "^2.88.2", - "traverse": "^0.6.6", - "uuid": "^8.3.2" - }, - "devDependencies": { - "@iobroker/testing": "^3.0.2", - "@types/chai": "^4.3.1", - "@types/chai-as-promised": "^7.1.5", - "@types/mocha": "^9.1.1", - "@types/node": "^18.0.0", - "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.11", - "@types/sinon-chai": "^3.2.8", - "chai": "^4.3.6", - "chai-as-promised": "^7.1.1", - "eslint": "^8.18.0", - "eslint-plugin-promise": "^6.0.0", - "mocha": "^10.0.0", - "proxyquire": "^2.1.3", - "sinon": "^14.0.0", - "sinon-chai": "^3.7.0", - "typescript": "~4.7.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "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==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "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/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/@iobroker/adapter-core": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.0.tgz", - "integrity": "sha512-J5Cgy0NK8GWjN1th3yvWCG3tnK8iJJcPaHIoVR8PfpEsz4hffuVGi660vNXqXdiqR5Br09XSJ5h1Pn9af0/taw==", - "dependencies": { - "@types/iobroker": "^4.0.1" - } - }, - "node_modules/@iobroker/testing": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-3.0.2.tgz", - "integrity": "sha512-UxDHAs9DpBpHVd0vaPekBB6T5B7x/5Specz3sb78qpaZIOzTXGJNiY6neNcmsCj1IwBmnNrQKi9NNj7rnXJ9OQ==", - "dev": true, - "dependencies": { - "alcalzone-shared": "~4.0.1", - "chai": "^4.3.6", - "chai-as-promised": "^7.1.1", - "debug": "^4.3.4", - "fs-extra": "^10.1.0", - "mocha": "^9.2.2", - "sinon": "^13.0.1", - "sinon-chai": "^3.7.0" - } - }, - "node_modules/@iobroker/testing/node_modules/minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@iobroker/testing/node_modules/mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/@iobroker/testing/node_modules/mocha/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/@iobroker/testing/node_modules/mocha/node_modules/debug/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/@iobroker/testing/node_modules/mocha/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==", - "dev": true - }, - "node_modules/@iobroker/testing/node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/@iobroker/testing/node_modules/sinon": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.2.tgz", - "integrity": "sha512-KvOrztAVqzSJWMDoxM4vM+GPys1df2VBoXm+YciyB/OLMamfS3VXh3oGh5WtrAGSzrgczNWFFY22oKb7Fi5eeA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/@iobroker/testing/node_modules/sinon/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/@iobroker/testing/node_modules/workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", - "dev": true - }, - "node_modules/@peculiar/asn1-schema": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", - "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", - "dependencies": { - "asn1js": "^3.0.4", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@peculiar/json-schema": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", - "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@peculiar/webcrypto": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", - "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", - "dependencies": { - "@peculiar/asn1-schema": "^2.1.6", - "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0", - "webcrypto-core": "^1.7.4" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "node_modules/@types/chai": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.1.tgz", - "integrity": "sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==", - "dev": true - }, - "node_modules/@types/chai-as-promised": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", - "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", - "dev": true, - "dependencies": { - "@types/chai": "*" - } - }, - "node_modules/@types/iobroker": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.1.tgz", - "integrity": "sha512-+lKr/gXxfYyXQXhL6FoNifaJGiylc+EFwtLqaFxORCkQlz35+0yBuZF5H728GgJWsbBidxe3q3zM2hazUAEz1g==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", - "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" - }, - "node_modules/@types/proxyquire": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", - "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", - "dev": true - }, - "node_modules/@types/sinon": { - "version": "10.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", - "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", - "dev": true, - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinon-chai": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", - "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", - "dev": true, - "dependencies": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "node_modules/acorn": { - "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" - }, - "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==", - "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/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/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "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/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "dependencies": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "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==", - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/axios/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==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "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/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=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==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "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", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "node_modules/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", - "dev": true, - "dependencies": { - "check-error": "^1.0.2" - }, - "peerDependencies": { - "chai": ">= 2.1.2 < 5" - } - }, - "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/chalk/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/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "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/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "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", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/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=" - }, - "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/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "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/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "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/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "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/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "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/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-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.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", - "@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.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.15.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.1.2", - "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-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "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/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/espree": { - "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.1", - "acorn-jsx": "^5.3.2", - "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/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "engines": [ - "node >=0.6.0" - ] - }, - "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==" - }, - "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==" - }, - "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-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "dependencies": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" - }, - "engines": { - "node": ">=0.10.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==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=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": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "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.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", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fs-extra": { - "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", - "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/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "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", - "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-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "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": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globals": { - "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" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "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", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "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/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "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.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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=", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "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/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "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/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "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==" - }, - "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/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "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/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "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/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.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "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/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } - }, - "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=", - "dev": true - }, - "node_modules/mime-db": { - "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.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.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "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" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/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==", - "dev": true - }, - "node_modules/module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true - }, - "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/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "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/ngeohash": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", - "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==", - "engines": { - "node": ">=v0.2.0" - } - }, - "node_modules/nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "engines": { - "node": "*" - } - }, - "node_modules/object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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/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/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", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "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", - "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-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "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/proxyquire": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", - "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", - "dev": true, - "dependencies": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.1", - "resolve": "^1.11.1" - } - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "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==", - "engines": { - "node": ">=6" - } - }, - "node_modules/pvtsutils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", - "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/qs": { - "version": "6.10.5", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.5.tgz", - "integrity": "sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "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/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - }, - "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/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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.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/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "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/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/sinon": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", - "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sinon-chai": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", - "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", - "dev": true, - "peerDependencies": { - "chai": "^4.0.0", - "sinon": ">=4.0.0" - } - }, - "node_modules/sinon/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/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.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-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": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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/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==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "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-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "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/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "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/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.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/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/webcrypto-core": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", - "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", - "dependencies": { - "@peculiar/asn1-schema": "^2.1.6", - "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.1", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" - } - }, - "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/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "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/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/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "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.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "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" - } + "name": "iobroker.vw-connect", + "version": "0.0.52", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "iobroker.vw-connect", + "version": "0.0.52", + "license": "MIT", + "dependencies": { + "@iobroker/adapter-core": "^2.6.2", + "@peculiar/webcrypto": "^1.4.0", + "axios": "^0.27.2", + "ngeohash": "^0.6.3", + "qs": "^6.11.0", + "request": "^2.88.2", + "traverse": "^0.6.6", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@iobroker/testing": "^4.1.0", + "@types/chai": "^4.3.3", + "@types/chai-as-promised": "^7.1.5", + "@types/mocha": "^9.1.1", + "@types/node": "^18.7.16", + "@types/proxyquire": "^1.3.28", + "@types/sinon": "^10.0.13", + "@types/sinon-chai": "^3.2.8", + "chai": "^4.3.6", + "chai-as-promised": "^7.1.1", + "eslint": "^8.23.0", + "eslint-plugin-promise": "^6.0.1", + "mocha": "^10.0.0", + "proxyquire": "^2.1.3", + "sinon": "^14.0.0", + "sinon-chai": "^3.7.0", + "typescript": "~4.8.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "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/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "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/@iobroker/adapter-core": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.2.tgz", + "integrity": "sha512-3dTFvN9ZM9f5+RigHL2mfJFicsaiHA+WeDmh4J7CB5jlurCQiurYgR4ndgHtePejdABuJMPAtxfyFFRiI+KMJA==", + "dependencies": { + "@types/iobroker": "^4.0.4" + } + }, + "node_modules/@iobroker/testing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.0.tgz", + "integrity": "sha512-fzCfR5xF9VToixMqSZQKjNZiGvwDCZ5cUX+bfdll7ZyVhPXcMt6LB5UXkAYLF4QN/wA0TYa9o71iElKOQp4b4A==", + "dev": true, + "dependencies": { + "alcalzone-shared": "~4.0.3", + "chai": "^4.3.6", + "chai-as-promised": "^7.1.1", + "debug": "^4.3.4", + "fs-extra": "^10.1.0", + "mocha": "^10.0.0", + "sinon": "^14.0.0", + "sinon-chai": "^3.7.0" + } + }, + "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/@peculiar/asn1-schema": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", + "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", + "dependencies": { + "asn1js": "^3.0.4", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@peculiar/json-schema": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", + "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@peculiar/webcrypto": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", + "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", + "dependencies": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0", + "webcrypto-core": "^1.7.4" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", + "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "node_modules/@types/chai": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", + "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "dev": true + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "dev": true, + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/iobroker": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.4.tgz", + "integrity": "sha512-hioI0Cf73pd0i5QGdJptj4AS+6zpWjBSZ4Vz80VyU/oLO7qgU/UiyO79o/ajAWbNREEVlhCJg8sHCoEAe0Bbaw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.7.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", + "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" + }, + "node_modules/@types/proxyquire": { + "version": "1.3.28", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", + "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", + "dev": true + }, + "node_modules/@types/sinon": { + "version": "10.0.13", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.13.tgz", + "integrity": "sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ==", + "dev": true, + "dependencies": { + "@types/sinonjs__fake-timers": "*" + } + }, + "node_modules/@types/sinon-chai": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", + "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", + "dev": true, + "dependencies": { + "@types/chai": "*", + "@types/sinon": "*" + } + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", + "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "dev": true + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "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==", + "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.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.4" + }, + "engines": { + "node": ">=12" + } + }, + "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/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "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-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dependencies": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "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==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/axios/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==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "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/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=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==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "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", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" + } + }, + "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/chalk/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/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "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/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "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", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/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=" + }, + "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/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "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/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "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/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "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/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "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/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-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.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", + "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.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "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.1.2", + "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" + }, + "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-plugin-promise": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", + "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "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/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/espree": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "dependencies": { + "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": { + "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/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ] + }, + "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==" + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "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==" + }, + "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/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", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "dependencies": { + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" + }, + "engines": { + "node": ">=0.10.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==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=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": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "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.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", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs-extra": { + "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", + "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/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "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", + "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-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "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": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "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/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "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", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "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/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "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.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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=", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "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/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "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/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "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==" + }, + "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/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "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/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "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/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.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "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/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "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=", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "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.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.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "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" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/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==", + "dev": true + }, + "node_modules/module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", + "dev": true + }, + "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/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "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/ngeohash": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", + "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==", + "engines": { + "node": ">=v0.2.0" + } + }, + "node_modules/nise": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", + "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": ">=5", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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/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", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "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", + "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-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "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/proxyquire": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", + "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", + "dev": true, + "dependencies": { + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.1", + "resolve": "^1.11.1" + } + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "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==", + "engines": { + "node": ">=6" + } + }, + "node_modules/pvtsutils": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", + "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/qs": { + "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" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "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/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "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/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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", + "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/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.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/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "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/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/sinon": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", + "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^6.1.1", + "diff": "^5.0.0", + "nise": "^5.1.1", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/sinon-chai": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", + "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", + "dev": true, + "peerDependencies": { + "chai": "^4.0.0", + "sinon": ">=4.0.0" + } + }, + "node_modules/sinon/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/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.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-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": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "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-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "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/typescript": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } }, - "dependencies": { - "@eslint/eslintrc": { - "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.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@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 - }, - "@iobroker/adapter-core": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.0.tgz", - "integrity": "sha512-J5Cgy0NK8GWjN1th3yvWCG3tnK8iJJcPaHIoVR8PfpEsz4hffuVGi660vNXqXdiqR5Br09XSJ5h1Pn9af0/taw==", - "requires": { - "@types/iobroker": "^4.0.1" - } - }, - "@iobroker/testing": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-3.0.2.tgz", - "integrity": "sha512-UxDHAs9DpBpHVd0vaPekBB6T5B7x/5Specz3sb78qpaZIOzTXGJNiY6neNcmsCj1IwBmnNrQKi9NNj7rnXJ9OQ==", - "dev": true, - "requires": { - "alcalzone-shared": "~4.0.1", - "chai": "^4.3.6", - "chai-as-promised": "^7.1.1", - "debug": "^4.3.4", - "fs-extra": "^10.1.0", - "mocha": "^9.2.2", - "sinon": "^13.0.1", - "sinon-chai": "^3.7.0" - }, - "dependencies": { - "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.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" - }, - "dependencies": { - "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 - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true - }, - "sinon": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.2.tgz", - "integrity": "sha512-KvOrztAVqzSJWMDoxM4vM+GPys1df2VBoXm+YciyB/OLMamfS3VXh3oGh5WtrAGSzrgczNWFFY22oKb7Fi5eeA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" - }, - "dependencies": { - "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" - } - } - } - }, - "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", - "dev": true - } - } - }, - "@peculiar/asn1-schema": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", - "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", - "requires": { - "asn1js": "^3.0.4", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" - } - }, - "@peculiar/json-schema": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", - "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", - "requires": { - "tslib": "^2.0.0" - } - }, - "@peculiar/webcrypto": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", - "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", - "requires": { - "@peculiar/asn1-schema": "^2.1.6", - "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0", - "webcrypto-core": "^1.7.4" - } - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@types/chai": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.1.tgz", - "integrity": "sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==", - "dev": true - }, - "@types/chai-as-promised": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", - "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", - "dev": true, - "requires": { - "@types/chai": "*" - } - }, - "@types/iobroker": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.1.tgz", - "integrity": "sha512-+lKr/gXxfYyXQXhL6FoNifaJGiylc+EFwtLqaFxORCkQlz35+0yBuZF5H728GgJWsbBidxe3q3zM2hazUAEz1g==", - "requires": { - "@types/node": "*" - } - }, - "@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", - "dev": true - }, - "@types/node": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", - "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" - }, - "@types/proxyquire": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", - "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", - "dev": true - }, - "@types/sinon": { - "version": "10.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", - "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinon-chai": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", - "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", - "dev": true, - "requires": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "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, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "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.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.2" - } - }, - "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.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "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 - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "requires": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "requires": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - }, - "dependencies": { - "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==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "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 - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "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", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "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", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", - "dev": true, - "requires": { - "check-error": "^1.0.2" - } - }, - "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" - }, - "dependencies": { - "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" - } - } - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "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, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.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 - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "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", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "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=" - }, - "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" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "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" - } - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.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 - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "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" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "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 - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "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.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", - "@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.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.15.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.1.2", - "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" - }, - "dependencies": { - "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" - } - } - } - }, - "eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", - "dev": true, - "requires": {} - }, - "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, - "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==", - "dev": true - }, - "espree": { - "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.1", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.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 - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "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==" - }, - "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==" - }, - "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-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "requires": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" - } - }, - "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==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "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": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "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.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "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==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, + "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/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "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==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/webcrypto-core": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", + "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", + "dependencies": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "asn1js": "^3.0.1", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "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/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "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/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/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "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.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "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": { + "@eslint/eslintrc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, + "@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 + }, + "@iobroker/adapter-core": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.2.tgz", + "integrity": "sha512-3dTFvN9ZM9f5+RigHL2mfJFicsaiHA+WeDmh4J7CB5jlurCQiurYgR4ndgHtePejdABuJMPAtxfyFFRiI+KMJA==", + "requires": { + "@types/iobroker": "^4.0.4" + } + }, + "@iobroker/testing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.0.tgz", + "integrity": "sha512-fzCfR5xF9VToixMqSZQKjNZiGvwDCZ5cUX+bfdll7ZyVhPXcMt6LB5UXkAYLF4QN/wA0TYa9o71iElKOQp4b4A==", + "dev": true, + "requires": { + "alcalzone-shared": "~4.0.3", + "chai": "^4.3.6", + "chai-as-promised": "^7.1.1", + "debug": "^4.3.4", + "fs-extra": "^10.1.0", + "mocha": "^10.0.0", + "sinon": "^14.0.0", + "sinon-chai": "^3.7.0" + } + }, + "@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" + } + }, + "@peculiar/asn1-schema": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", + "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", + "requires": { + "asn1js": "^3.0.4", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "@peculiar/json-schema": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", + "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "requires": { + "tslib": "^2.0.0" + } + }, + "@peculiar/webcrypto": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", + "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", + "requires": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0", + "webcrypto-core": "^1.7.4" + } + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", + "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@types/chai": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", + "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "dev": true + }, + "@types/chai-as-promised": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "dev": true, + "requires": { + "@types/chai": "*" + } + }, + "@types/iobroker": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.4.tgz", + "integrity": "sha512-hioI0Cf73pd0i5QGdJptj4AS+6zpWjBSZ4Vz80VyU/oLO7qgU/UiyO79o/ajAWbNREEVlhCJg8sHCoEAe0Bbaw==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true + }, + "@types/node": { + "version": "18.7.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", + "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" + }, + "@types/proxyquire": { + "version": "1.3.28", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", + "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", + "dev": true + }, + "@types/sinon": { + "version": "10.0.13", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.13.tgz", + "integrity": "sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinon-chai": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", + "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", + "dev": true, + "requires": { + "@types/chai": "*", + "@types/sinon": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", + "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "dev": true + }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "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, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "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.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" + } + }, + "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.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "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, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "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-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "requires": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + }, + "dependencies": { "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs-extra": { - "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", - "jsonfile": "^6.0.1", - "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 - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": 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", - "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", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "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": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "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" - } - }, - "graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "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==" - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "ignore": { - "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": { - "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.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "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.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "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==", - "dev": true - }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "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" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "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==" - }, - "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 - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "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" - } - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "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" - } - }, - "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.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "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 - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "mime-db": { - "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.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.52.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, + "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 + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "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", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "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", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "requires": { + "check-error": "^1.0.2" + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "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, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.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 + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "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", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "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=" + }, + "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" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "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" + } + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.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 + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "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" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "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 + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "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.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", + "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.4.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "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.1.2", + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "eslint-plugin-promise": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", + "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", + "dev": true, + "requires": {} + }, + "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, + "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==", + "dev": true + }, + "espree": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.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 + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "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==" + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "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==" + }, + "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 + }, + "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", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-keys": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", + "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", + "dev": true, + "requires": { + "is-object": "~1.0.1", + "merge-descriptors": "~1.0.0" + } + }, + "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==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "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": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "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.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "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==" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-extra": { + "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", + "jsonfile": "^6.0.1", + "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 + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": 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", + "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", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "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": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "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 + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "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==" + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ignore": { + "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": { + "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.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "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.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "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==", + "dev": true + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "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" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "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==" + }, + "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 + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "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" + } + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "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" + } + }, + "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.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "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 + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "requires": { + "get-func-name": "^2.0.0" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "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.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.52.0" + } + }, + "minimatch": { + "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" + } + }, + "mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } }, "minimatch": { - "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" - } - }, - "mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", - "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.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 - }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true - }, - "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 - }, - "ngeohash": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", - "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" - }, - "nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "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" - } - }, - "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", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "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", - "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", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "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 - }, - "proxyquire": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", - "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", - "dev": true, - "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.1", - "resolve": "^1.11.1" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "pvtsutils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", - "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", - "requires": { - "tslib": "^2.4.0" - } - }, - "pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" - }, + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "module-not-found-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", + "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", + "dev": true + }, + "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 + }, + "nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true + }, + "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 + }, + "ngeohash": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", + "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" + }, + "nise": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", + "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": ">=5", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "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" + } + }, + "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", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "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", + "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", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "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 + }, + "proxyquire": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", + "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", + "dev": true, + "requires": { + "fill-keys": "^1.0.2", + "module-not-found-error": "^1.0.1", + "resolve": "^1.11.1" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "pvtsutils": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", + "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "requires": { + "tslib": "^2.4.0" + } + }, + "pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" + }, + "qs": { + "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" + } + }, + "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 + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { "qs": { - "version": "6.10.5", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.5.tgz", - "integrity": "sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==", - "requires": { - "side-channel": "^1.0.4" - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, - "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 - }, - "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "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.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "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 - }, - "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" - } - }, - "sinon": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", - "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" - }, - "dependencies": { - "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" - } - } - } - }, - "sinon-chai": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", - "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", - "dev": true, - "requires": {} - }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "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, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "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, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "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": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "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 - }, - "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==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "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-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "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 - }, - "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" }, "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 - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "webcrypto-core": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", - "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", - "requires": { - "@peculiar/asn1-schema": "^2.1.6", - "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.1", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" - } - }, - "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" - } - }, - "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 - }, - "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "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, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "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 - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "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.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - } - }, - "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 + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "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 + }, + "resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dev": true, + "requires": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "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 + }, + "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", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "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.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "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 + }, + "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" + } + }, + "sinon": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", + "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^6.1.1", + "diff": "^5.0.0", + "nise": "^5.1.1", + "supports-color": "^7.2.0" + }, + "dependencies": { + "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" + } } + } + }, + "sinon-chai": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", + "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", + "dev": true, + "requires": {} + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "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, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "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, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "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": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "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 + }, + "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==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "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-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "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 + }, + "typescript": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "webcrypto-core": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", + "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", + "requires": { + "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/json-schema": "^1.1.12", + "asn1js": "^3.0.1", + "pvtsutils": "^1.3.2", + "tslib": "^2.4.0" + } + }, + "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" + } + }, + "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 + }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "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, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "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 + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "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.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + } + }, + "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 090330be..5add66a0 100644 --- a/package.json +++ b/package.json @@ -1,81 +1,81 @@ { - "author": { - "name": "ta2k", - "email": "tombox2020@gmail.com" + "author": { + "name": "ta2k", + "email": "tombox2020@gmail.com" + }, + "contributors": [ + { + "name": "ta2k", + "email": "tombox2020@gmail.com" }, - "contributors": [ - { - "name": "ta2k", - "email": "tombox2020@gmail.com" - }, - { - "name": "Sneak-L8", - "email": "git@sengler.de" - } - ], - "bugs": { - "url": "https://github.com/ta2k/ioBroker.vw-connect/issues" - }, - "bundleDependencies": [], - "dependencies": { - "@iobroker/adapter-core": "^2.6.0", - "@peculiar/webcrypto": "^1.4.0", - "axios": "^0.27.2", - "ngeohash": "^0.6.3", - "qs": "^6.10.5", - "request": "^2.88.2", - "traverse": "^0.6.6", - "uuid": "^8.3.2" - }, - "deprecated": false, - "description": "Adapter for VW Connect", - "devDependencies": { - "@iobroker/testing": "^3.0.2", - "@types/chai": "^4.3.1", - "@types/chai-as-promised": "^7.1.5", - "@types/mocha": "^9.1.1", - "@types/node": "^18.0.0", - "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.11", - "@types/sinon-chai": "^3.2.8", - "chai": "^4.3.6", - "chai-as-promised": "^7.1.1", - "eslint": "^8.18.0", - "eslint-plugin-promise": "^6.0.0", - "mocha": "^10.0.0", - "proxyquire": "^2.1.3", - "sinon": "^14.0.0", - "sinon-chai": "^3.7.0", - "typescript": "~4.7.4" - }, - "engines": { - "node": ">=10.0.0" - }, - "homepage": "https://github.com/ta2k/ioBroker.vw-connect", - "keywords": [ - "VW", - "Connect", - "Audi", - "myAudi", - "Skoda", - "Skoda Connect", - "VW Connect", - "VW Connect Go" - ], - "license": "MIT", - "main": "main.js", - "name": "iobroker.vw-connect", - "repository": { - "type": "git", - "url": "git+https://github.com/TA2k/ioBroker.vw-connect.git" - }, - "scripts": { - "lint": "eslint", - "test": "npm run test:js && npm run test:package", - "test:integration": "mocha test/integration --exit", - "test:js": "mocha --opts test/mocha.custom.opts", - "test:package": "mocha test/package --exit", - "test:unit": "mocha test/unit --exit" - }, - "version": "0.0.51" + { + "name": "Sneak-L8", + "email": "git@sengler.de" + } + ], + "bugs": { + "url": "https://github.com/ta2k/ioBroker.vw-connect/issues" + }, + "bundleDependencies": [], + "dependencies": { + "@iobroker/adapter-core": "^2.6.2", + "@peculiar/webcrypto": "^1.4.0", + "axios": "^0.27.2", + "ngeohash": "^0.6.3", + "qs": "^6.11.0", + "request": "^2.88.2", + "traverse": "^0.6.6", + "uuid": "^9.0.0" + }, + "deprecated": false, + "description": "Adapter for VW Connect", + "devDependencies": { + "@iobroker/testing": "^4.1.0", + "@types/chai": "^4.3.3", + "@types/chai-as-promised": "^7.1.5", + "@types/mocha": "^9.1.1", + "@types/node": "^18.7.16", + "@types/proxyquire": "^1.3.28", + "@types/sinon": "^10.0.13", + "@types/sinon-chai": "^3.2.8", + "chai": "^4.3.6", + "chai-as-promised": "^7.1.1", + "eslint": "^8.23.0", + "eslint-plugin-promise": "^6.0.1", + "mocha": "^10.0.0", + "proxyquire": "^2.1.3", + "sinon": "^14.0.0", + "sinon-chai": "^3.7.0", + "typescript": "~4.8.3" + }, + "engines": { + "node": ">=10.0.0" + }, + "homepage": "https://github.com/ta2k/ioBroker.vw-connect", + "keywords": [ + "VW", + "Connect", + "Audi", + "myAudi", + "Skoda", + "Skoda Connect", + "VW Connect", + "VW Connect Go" + ], + "license": "MIT", + "main": "main.js", + "name": "iobroker.vw-connect", + "repository": { + "type": "git", + "url": "git+https://github.com/TA2k/ioBroker.vw-connect.git" + }, + "scripts": { + "lint": "eslint", + "test": "npm run test:js && npm run test:package", + "test:integration": "mocha test/integration --exit", + "test:js": "mocha --opts test/mocha.custom.opts", + "test:package": "mocha test/package --exit", + "test:unit": "mocha test/unit --exit" + }, + "version": "0.0.52" } From 706f54150736b60e79d5ee42ca657ade26d94323 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 15 Oct 2022 10:03:30 +0200 Subject: [PATCH 422/729] add new skodaE endpoints --- .github/workflows/test-and-release.yml | 110 +++++++------- main.js | 113 ++++++-------- package-lock.json | 195 ++++++++++++------------- package.json | 14 +- 4 files changed, 194 insertions(+), 238 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index be37db46..c2e13373 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -3,78 +3,78 @@ 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: - # normal versions - - "v[0-9]+.[0-9]+.[0-9]+" - # pre-releases - - "v[0-9]+.[0-9]+.[0-9]+-**" - pull_request: {} + push: + branches: + - "*" + tags: + # normal versions + - "v[0-9]+.[0-9]+.[0-9]+" + # pre-releases + - "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 + # 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 + runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] + strategy: + matrix: + node-version: [14.x] - steps: - - name: Checkout code - uses: actions/checkout@v2 + steps: + - 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: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: npm ci + - name: Install Dependencies + run: npm ci - - name: Lint source code - run: npm run lint - - name: Test package files - run: npm run test:package + - name: Lint source code + run: npm run lint + - name: Test package files + run: npm run test:package - # Runs adapter tests on all supported node versions and OSes - adapter-tests: - if: contains(github.event.head_commit.message, '[skip ci]') == false + # Runs adapter tests on all supported node versions and OSes + adapter-tests: + if: contains(github.event.head_commit.message, '[skip ci]') == false - needs: [check-and-lint] + needs: [check-and-lint] - runs-on: ${{ matrix.os }} - strategy: - matrix: - node-version: [18.x, 14.x, 16.x] - os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [18.x, 14.x, 16.x] + os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - name: Checkout code - uses: actions/checkout@v2 + steps: + - 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: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: npm ci + - name: Install Dependencies + run: npm ci - - name: Run unit tests - run: npm run test:unit + - name: Run unit tests + run: npm run test:unit - - name: Run integration tests (unix only) - if: startsWith(runner.OS, 'windows') == false - run: DEBUG=testing:* npm run test:integration + - name: Run integration tests (unix only) + if: startsWith(runner.OS, 'windows') == false + run: DEBUG=testing:* npm run test:integration - - name: Run integration tests (windows only) - if: startsWith(runner.OS, 'windows') - run: set DEBUG=testing:* & npm run test:integration + - name: Run integration tests (windows only) + if: startsWith(runner.OS, 'windows') + run: set DEBUG=testing:* & npm run test:integration # TODO: To enable automatic npm releases, create a token on npmjs.org # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options # Then uncomment the following block: diff --git a/main.js b/main.js index 52bffb38..9ebf3522 100644 --- a/main.js +++ b/main.js @@ -35,7 +35,7 @@ class VwWeconnect extends utils.Adapter { this.extractKeys = extractKeys; this.jar = request.jar(); - this.userAgent = "ioBroker v50"; + this.userAgent = "ioBroker v"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -111,6 +111,7 @@ class VwWeconnect extends utils.Adapter { this.log.warn("Please enter password"); return; } + this.userAgent += this.version; // Reset the connection indicator during startup this.type = "VW"; this.country = "DE"; @@ -313,9 +314,7 @@ class VwWeconnect extends utils.Adapter { this.login() .then(() => { - this.getSkodaEStatus(vin).catch(() => { - this.log.error("get skodae status Failed"); - }); + this.getSkodaEStatus(vin); }) .catch(() => { this.log.error("Failed second skoda login"); @@ -776,9 +775,7 @@ class VwWeconnect extends utils.Adapter { return; } else if (this.config.type === "skodae") { this.vinArray.forEach((vin) => { - this.getSkodaEStatus(vin).catch(() => { - this.log.error("get skodae status Failed"); - }); + this.getSkodaEStatus(vin); }); } else if (this.config.type === "audidata") { this.vinArray.forEach((vin) => { @@ -1748,7 +1745,7 @@ class VwWeconnect extends utils.Adapter { }; } if (this.config.type === "skodae") { - url = "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles"; + url = "https://api.connect.skoda-auto.cz/api/v3/garage/vehicles"; // @ts-ignore headers = { accept: "application/json", @@ -2630,76 +2627,50 @@ class VwWeconnect extends utils.Adapter { }); }); } - getSkodaEStatus(vin) { - return new Promise((resolve, reject) => { - const typeArray = ["air-conditioning", "charging"]; - const promiseArray = []; - typeArray.forEach((element) => { - let promise = this.getSkodaEValues(vin, element, "status"); - promiseArray.push(promise); - promise = this.getSkodaEValues(vin, element, "settings"); - promiseArray.push(promise); - }); - Promise.all(promiseArray) - .then(() => { - resolve(); - }) - .catch(() => { - reject(); - }); - }); - } - - getSkodaEValues(vin, type, endpoint) { - return new Promise((resolve, reject) => { - const url = "https://api.connect.skoda-auto.cz/api/v1/" + type + "/" + vin + "/" + endpoint; - this.log.debug(url); - request.get( - { - url: url, + async getSkodaEStatus(vin) { + const statusArray = [ + { path: "air-conditioning", version: "v1", postfix: "/status" }, + { path: "air-conditioning", version: "v1", postfix: "/settings" }, + { path: "air-conditioning", version: "v1", postfix: "/timers" }, + { path: "charging", version: "v1", postfix: "/status" }, + { path: "charging", version: "v1", postfix: "/settings" }, + { path: "vehicle-status", version: "v2", postfix: "" }, + { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, + ]; - headers: { - "api-key": "ok", - accept: "application/json", - "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - "If-None-Match": this.etags[url] || "", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, + for (const status of statusArray) { + const url = "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; + await axios({ + method: "get", + url: url, + headers: { + "api-key": "ok", + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": this.userAgent, + "accept-language": "de-de", + "If-None-Match": this.etags[url] || "", + authorization: "Bearer " + this.config.atoken, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.debug(err); - resp && this.log.debug(resp.statusCode.toString()); - body && this.log.debug(JSON.stringify(body)); - reject(); - return; - } - if (resp) { - this.etags[url] = resp.headers.etag; - if (resp.statusCode === 304) { + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + this.extractKeys(this, vin + ".status." + status.path.replace("/", "") + "." + status.postfix.replace("/", ""), res.data); + this.etags[url] = res.headers.etag; + }) + .catch((error) => { + if (error.response) { + if (error.response.status === 304) { this.log.debug("304 No values updated"); - resolve(); return; } + this.log.error(JSON.stringify(error.response.data)); } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".status." + type + "." + endpoint, body); - - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - } - ); - }); + this.log.error(error); + }); + } } + setSkodaESettings(vin, action, value, bodyContent) { return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; diff --git a/package-lock.json b/package-lock.json index d4ff5e94..e580b92d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,13 @@ "version": "0.0.52", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^2.6.2", + "@iobroker/adapter-core": "^2.6.7", "@peculiar/webcrypto": "^1.4.0", "axios": "^0.27.2", "ngeohash": "^0.6.3", "qs": "^6.11.0", "request": "^2.88.2", - "traverse": "^0.6.6", + "traverse": "^0.6.7", "uuid": "^9.0.0" }, "devDependencies": { @@ -23,28 +23,28 @@ "@types/chai": "^4.3.3", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.7.16", + "@types/node": "^18.11.0", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.8", "chai": "^4.3.6", "chai-as-promised": "^7.1.1", - "eslint": "^8.23.0", - "eslint-plugin-promise": "^6.0.1", + "eslint": "^8.25.0", + "eslint-plugin-promise": "^6.1.0", "mocha": "^10.0.0", "proxyquire": "^2.1.3", - "sinon": "^14.0.0", + "sinon": "^14.0.1", "sinon-chai": "^3.7.0", - "typescript": "~4.8.3" + "typescript": "~4.8.4" }, "engines": { "node": ">=10.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", - "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", + "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", @@ -65,9 +65,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.10.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", + "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -78,16 +78,6 @@ "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -108,11 +98,11 @@ "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.2.tgz", - "integrity": "sha512-3dTFvN9ZM9f5+RigHL2mfJFicsaiHA+WeDmh4J7CB5jlurCQiurYgR4ndgHtePejdABuJMPAtxfyFFRiI+KMJA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.7.tgz", + "integrity": "sha512-yDTmWjnsQ+DXRQVnQK97CXXMMs01H3Pl82DSqfx7dYj7RKoUenD75a0xY4QQdHZXG9SIhjNttXVEln0lWvOamA==", "dependencies": { - "@types/iobroker": "^4.0.4" + "@types/iobroker": "^4.0.5" } }, "node_modules/@iobroker/testing": { @@ -253,9 +243,9 @@ } }, "node_modules/@types/iobroker": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.4.tgz", - "integrity": "sha512-hioI0Cf73pd0i5QGdJptj4AS+6zpWjBSZ4Vz80VyU/oLO7qgU/UiyO79o/ajAWbNREEVlhCJg8sHCoEAe0Bbaw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.5.tgz", + "integrity": "sha512-D1tJwuDQEQQQ/cZVFjFjFUhUuMxJbfrz5U2UooiZwhgs69D/t8IowMvBI6Lk4ZR8HnCSxYwWHVRKyQnEMNgJPA==", "dependencies": { "@types/node": "*" } @@ -267,9 +257,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", - "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" + "version": "18.11.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.0.tgz", + "integrity": "sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==" }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -879,14 +869,13 @@ } }, "node_modules/eslint": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", - "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.25.0.tgz", + "integrity": "sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.1", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.10.5", "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -903,7 +892,6 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", "globby": "^11.1.0", @@ -912,6 +900,7 @@ "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -935,9 +924,9 @@ } }, "node_modules/eslint-plugin-promise": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", - "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.0.tgz", + "integrity": "sha512-NYCfDZF/KHt27p06nFAttgWuFyIDSUMnNaJBIY1FY9GpBFhdT2vMG64HlFguSgcJeyM5by6Yr5csSOuJm60eXQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1280,12 +1269,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", @@ -1644,6 +1627,12 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "node_modules/js-sdsl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", + "dev": true + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2442,9 +2431,9 @@ } }, "node_modules/sinon": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", - "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.1.tgz", + "integrity": "sha512-JhJ0jCiyBWVAHDS+YSjgEbDn7Wgz9iIjA1/RK+eseJN0vAAWIWiXBdrnb92ELPyjsfreCYntD1ORtLSfIrlvSQ==", "dev": true, "dependencies": { "@sinonjs/commons": "^1.8.3", @@ -2610,9 +2599,12 @@ } }, "node_modules/traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", + "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/tslib": { "version": "2.4.0", @@ -2669,9 +2661,9 @@ } }, "node_modules/typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2850,9 +2842,9 @@ }, "dependencies": { "@eslint/eslintrc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", - "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", + "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", @@ -2867,9 +2859,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.10.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", + "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -2877,12 +2869,6 @@ "minimatch": "^3.0.4" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -2896,11 +2882,11 @@ "dev": true }, "@iobroker/adapter-core": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.2.tgz", - "integrity": "sha512-3dTFvN9ZM9f5+RigHL2mfJFicsaiHA+WeDmh4J7CB5jlurCQiurYgR4ndgHtePejdABuJMPAtxfyFFRiI+KMJA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.7.tgz", + "integrity": "sha512-yDTmWjnsQ+DXRQVnQK97CXXMMs01H3Pl82DSqfx7dYj7RKoUenD75a0xY4QQdHZXG9SIhjNttXVEln0lWvOamA==", "requires": { - "@types/iobroker": "^4.0.4" + "@types/iobroker": "^4.0.5" } }, "@iobroker/testing": { @@ -3026,9 +3012,9 @@ } }, "@types/iobroker": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.4.tgz", - "integrity": "sha512-hioI0Cf73pd0i5QGdJptj4AS+6zpWjBSZ4Vz80VyU/oLO7qgU/UiyO79o/ajAWbNREEVlhCJg8sHCoEAe0Bbaw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.5.tgz", + "integrity": "sha512-D1tJwuDQEQQQ/cZVFjFjFUhUuMxJbfrz5U2UooiZwhgs69D/t8IowMvBI6Lk4ZR8HnCSxYwWHVRKyQnEMNgJPA==", "requires": { "@types/node": "*" } @@ -3040,9 +3026,9 @@ "dev": true }, "@types/node": { - "version": "18.7.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", - "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==" + "version": "18.11.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.0.tgz", + "integrity": "sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==" }, "@types/proxyquire": { "version": "1.3.28", @@ -3511,14 +3497,13 @@ "dev": true }, "eslint": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", - "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.25.0.tgz", + "integrity": "sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.1", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.10.5", "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -3535,7 +3520,6 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", "globby": "^11.1.0", @@ -3544,6 +3528,7 @@ "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -3569,9 +3554,9 @@ } }, "eslint-plugin-promise": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", - "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.0.tgz", + "integrity": "sha512-NYCfDZF/KHt27p06nFAttgWuFyIDSUMnNaJBIY1FY9GpBFhdT2vMG64HlFguSgcJeyM5by6Yr5csSOuJm60eXQ==", "dev": true, "requires": {} }, @@ -3806,12 +3791,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", @@ -4072,6 +4051,12 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "js-sdsl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", + "dev": true + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -4657,9 +4642,9 @@ } }, "sinon": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", - "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.1.tgz", + "integrity": "sha512-JhJ0jCiyBWVAHDS+YSjgEbDn7Wgz9iIjA1/RK+eseJN0vAAWIWiXBdrnb92ELPyjsfreCYntD1ORtLSfIrlvSQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", @@ -4776,9 +4761,9 @@ } }, "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", + "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==" }, "tslib": { "version": "2.4.0", @@ -4820,9 +4805,9 @@ "dev": true }, "typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true }, "universalify": { diff --git a/package.json b/package.json index 5add66a0..d5bc5bf3 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,13 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^2.6.2", + "@iobroker/adapter-core": "^2.6.7", "@peculiar/webcrypto": "^1.4.0", "axios": "^0.27.2", "ngeohash": "^0.6.3", "qs": "^6.11.0", "request": "^2.88.2", - "traverse": "^0.6.6", + "traverse": "^0.6.7", "uuid": "^9.0.0" }, "deprecated": false, @@ -34,19 +34,19 @@ "@types/chai": "^4.3.3", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.7.16", + "@types/node": "^18.11.0", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.8", "chai": "^4.3.6", "chai-as-promised": "^7.1.1", - "eslint": "^8.23.0", - "eslint-plugin-promise": "^6.0.1", + "eslint": "^8.25.0", + "eslint-plugin-promise": "^6.1.0", "mocha": "^10.0.0", "proxyquire": "^2.1.3", - "sinon": "^14.0.0", + "sinon": "^14.0.1", "sinon-chai": "^3.7.0", - "typescript": "~4.8.3" + "typescript": "~4.8.4" }, "engines": { "node": ">=10.0.0" From 61ab7913d97ee2ccf9f71639bd537dfdccbd78b6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 15 Oct 2022 10:16:13 +0200 Subject: [PATCH 423/729] fix request paths --- main.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 9ebf3522..896a93de 100644 --- a/main.js +++ b/main.js @@ -1745,7 +1745,7 @@ class VwWeconnect extends utils.Adapter { }; } if (this.config.type === "skodae") { - url = "https://api.connect.skoda-auto.cz/api/v3/garage/vehicles"; + url = "https://api.connect.skoda-auto.cz/api/v3/garage"; // @ts-ignore headers = { accept: "application/json", @@ -1983,7 +1983,7 @@ class VwWeconnect extends utils.Adapter { return; } if (this.config.type === "skodae") { - body.forEach(async (element) => { + body.vehicles.forEach(async (element) => { const vin = element.vin; this.vinArray.push(vin); await this.setObjectNotExistsAsync(element.vin, { @@ -2655,7 +2655,12 @@ class VwWeconnect extends utils.Adapter { }) .then((res) => { this.log.debug(JSON.stringify(res.data)); - this.extractKeys(this, vin + ".status." + status.path.replace("/", "") + "." + status.postfix.replace("/", ""), res.data); + let path = vin + ".status." + status.path.replace("/", ""); + if (status.postfix) { + path += "." + status.postfix.replace("/", ""); + } + this.log.debug(path); + this.extractKeys(this, path, res.data); this.etags[url] = res.headers.etag; }) .catch((error) => { @@ -2667,6 +2672,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(JSON.stringify(error.response.data)); } this.log.error(error); + this.log.error(url); }); } } From dfa84680eaa97e8c22838da874811ca8027445f7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Oct 2022 19:57:37 +0200 Subject: [PATCH 424/729] deactivate parking position --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 896a93de..1a6f7956 100644 --- a/main.js +++ b/main.js @@ -2635,7 +2635,7 @@ class VwWeconnect extends utils.Adapter { { path: "charging", version: "v1", postfix: "/status" }, { path: "charging", version: "v1", postfix: "/settings" }, { path: "vehicle-status", version: "v2", postfix: "" }, - { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, + // { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth token ]; for (const status of statusArray) { From a1117bdb7b1f07e3ace5acd3213bee8fc0e5579b Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Oct 2022 00:28:08 +0200 Subject: [PATCH 425/729] add secon token for parking position --- main.js | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 1a6f7956..68c606d8 100644 --- a/main.js +++ b/main.js @@ -44,6 +44,7 @@ class VwWeconnect extends utils.Adapter { this.homeRegion = {}; this.homeRegionSetter = {}; + this.secondAcessToken = null; this.vinArray = []; this.etags = {}; @@ -1198,6 +1199,10 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } + if (this.config.atoken) { + this.secondAcessToken = this.config.atoken; + this.secondRefreshToken = this.config.rtoken; + } this.config.atoken = tokens.accessToken; this.config.rtoken = tokens.refreshToken; @@ -1258,6 +1263,11 @@ class VwWeconnect extends utils.Adapter { this.refreshToken().catch(() => { this.log.error("Refresh Token was not successful"); }); + if (this.secondAccessToken) { + this.refreshToken(null, true).catch(() => { + this.log.error("Refresh Second Token was not successful"); + }); + } }, 0.9 * 60 * 60 * 1000); // 0.9hours } if ( @@ -1322,9 +1332,12 @@ class VwWeconnect extends utils.Adapter { ); } - refreshToken(isVw) { + refreshToken(isVw, useSecondToken) { let url = "https://tokenrefreshservice.apps.emea.vwapps.io/refreshTokens"; let rtoken = this.config.rtoken; + if (useSecondToken) { + rtoken = this.secondRefreshToken; + } let body = "refresh_token=" + rtoken; let form = ""; let brand = this.config.type === "skodae" ? "skoda" : this.config.type; @@ -1431,6 +1444,12 @@ class VwWeconnect extends utils.Adapter { this.config.vwrtoken = tokens.refresh_token; } } else { + if (useSecondToken) { + this.secondAccessToken = tokens.access_token; + this.secondRefreshToken = tokens.refresh_token; + resolve(); + return; + } this.config.atoken = tokens.access_token; if (tokens.refresh_token) { this.config.rtoken = tokens.refresh_token; @@ -2635,23 +2654,27 @@ class VwWeconnect extends utils.Adapter { { path: "charging", version: "v1", postfix: "/status" }, { path: "charging", version: "v1", postfix: "/settings" }, { path: "vehicle-status", version: "v2", postfix: "" }, - // { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth token + { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth ]; for (const status of statusArray) { + const headers = { + "api-key": "ok", + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": this.userAgent, + "accept-language": "de-de", + "If-None-Match": this.etags[url] || "", + authorization: "Bearer " + this.config.atoken, + }; + if (status.path === "position/vehicles") { + headers["Authorization"] = "Bearer " + this.secondAccessToken; + } const url = "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; await axios({ method: "get", url: url, - headers: { - "api-key": "ok", - accept: "application/json", - "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - "If-None-Match": this.etags[url] || "", - authorization: "Bearer " + this.config.atoken, - }, + headers: headers, }) .then((res) => { this.log.debug(JSON.stringify(res.data)); From b7467241585700ba953bf48b8b92373d4a2bef82 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Oct 2022 14:17:57 +0200 Subject: [PATCH 426/729] move order --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 68c606d8..04e8235a 100644 --- a/main.js +++ b/main.js @@ -2658,6 +2658,7 @@ class VwWeconnect extends utils.Adapter { ]; for (const status of statusArray) { + const url = "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; const headers = { "api-key": "ok", accept: "application/json", @@ -2670,7 +2671,6 @@ class VwWeconnect extends utils.Adapter { if (status.path === "position/vehicles") { headers["Authorization"] = "Bearer " + this.secondAccessToken; } - const url = "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; await axios({ method: "get", url: url, From 7cac996a1a5d016f5062ead9705148c8c3e452e6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Oct 2022 16:10:32 +0200 Subject: [PATCH 427/729] fix typo --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 04e8235a..37253c80 100644 --- a/main.js +++ b/main.js @@ -1200,7 +1200,7 @@ class VwWeconnect extends utils.Adapter { return; } if (this.config.atoken) { - this.secondAcessToken = this.config.atoken; + this.secondAccessToken = this.config.atoken; this.secondRefreshToken = this.config.rtoken; } this.config.atoken = tokens.accessToken; From fb81bf2ec433ab40a16a7d05e4fa005aee4d76f2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Oct 2022 09:47:03 +0200 Subject: [PATCH 428/729] move secondtoken --- main.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 37253c80..8a9f866a 100644 --- a/main.js +++ b/main.js @@ -1199,10 +1199,7 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - if (this.config.atoken) { - this.secondAccessToken = this.config.atoken; - this.secondRefreshToken = this.config.rtoken; - } + this.config.atoken = tokens.accessToken; this.config.rtoken = tokens.refreshToken; @@ -1241,6 +1238,10 @@ class VwWeconnect extends utils.Adapter { return; } + if (this.config.atoken) { + this.secondAccessToken = this.config.atoken; + this.secondRefreshToken = this.config.rtoken; + } this.config.atoken = tokens.access_token; this.config.rtoken = tokens.refresh_token; if (this.config.type === "seatelli" || this.config.type === "skodapower") { From 3035764e9eea094c36ca55bdad969333a91108f9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Oct 2022 09:48:09 +0200 Subject: [PATCH 429/729] add check --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index 8a9f866a..d95cb3cf 100644 --- a/main.js +++ b/main.js @@ -2670,6 +2670,10 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, }; if (status.path === "position/vehicles") { + if (!this.secondAccessToken) { + this.log.warn("Missing second auth token for parking position"); + continue; + } headers["Authorization"] = "Bearer " + this.secondAccessToken; } await axios({ From 901b413422a9d8b6f0e416dbce738f98311d8c96 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Oct 2022 18:02:30 +0200 Subject: [PATCH 430/729] add raw json skoda e --- README.md | 3 +++ main.js | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index adf9c229..7907f206 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Please update your system on Node 10. ## Usage Use the state under remote control to control your car remotely. +Normale refresh is the polling interval to receive data from the VAG Cloud +Force refresh is for non E-Cars to enforce a refresh this number is limited by VAG until the car is turn on again. +Trip data is only available for non E-Cars. ## Discussion and Questions diff --git a/main.js b/main.js index d95cb3cf..09193bd1 100644 --- a/main.js +++ b/main.js @@ -2681,7 +2681,7 @@ class VwWeconnect extends utils.Adapter { url: url, headers: headers, }) - .then((res) => { + .then(async (res) => { this.log.debug(JSON.stringify(res.data)); let path = vin + ".status." + status.path.replace("/", ""); if (status.postfix) { @@ -2690,6 +2690,20 @@ class VwWeconnect extends utils.Adapter { this.log.debug(path); this.extractKeys(this, path, res.data); this.etags[url] = res.headers.etag; + if (this.config.rawJson) { + await this.setObjectNotExistsAsync(path + "rawJson", { + type: "state", + common: { + name: status.path + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }); + this.setState(path + "rawJson", JSON.stringify(res.data), true); + } }) .catch((error) => { if (error.response) { From 44f74780de7db9d3f7778578c3d88b5b69a9de90 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 24 Oct 2022 00:09:52 +0200 Subject: [PATCH 431/729] 0.0.53 --- io-package.json | 5 +- package-lock.json | 282 ++++++++++------------------------------------ package.json | 10 +- 3 files changed, 68 insertions(+), 229 deletions(-) diff --git a/io-package.json b/io-package.json index 70bc5d8a..49c8e615 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.52", + "version": "0.0.53", "news": { + "0.0.53": { + "en": "Add datapoints for Skoda Enyaq v3" + }, "0.0.52": { "en": "small bugfixes" }, diff --git a/package-lock.json b/package-lock.json index e580b92d..92a9f0f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.52", + "version": "0.0.53", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.52", + "version": "0.0.53", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.7", @@ -23,15 +23,15 @@ "@types/chai": "^4.3.3", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.0", + "@types/node": "^18.11.4", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.8", "chai": "^4.3.6", "chai-as-promised": "^7.1.1", - "eslint": "^8.25.0", - "eslint-plugin-promise": "^6.1.0", - "mocha": "^10.0.0", + "eslint": "^8.26.0", + "eslint-plugin-promise": "^6.1.1", + "mocha": "^10.1.0", "proxyquire": "^2.1.3", "sinon": "^14.0.1", "sinon-chai": "^3.7.0", @@ -65,9 +65,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", - "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", + "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -257,9 +257,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.11.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.0.tgz", - "integrity": "sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==" + "version": "18.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", + "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==" }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -292,12 +292,6 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", @@ -398,15 +392,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -808,18 +793,6 @@ "node": ">=0.3.1" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -869,14 +842,15 @@ } }, "node_modules/eslint": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.25.0.tgz", - "integrity": "sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.10.5", + "@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", @@ -892,14 +866,14 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", + "glob-parent": "^6.0.2", "globals": "^13.15.0", - "globby": "^11.1.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", @@ -924,9 +898,9 @@ } }, "node_modules/eslint-plugin-promise": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.0.tgz", - "integrity": "sha512-NYCfDZF/KHt27p06nFAttgWuFyIDSUMnNaJBIY1FY9GpBFhdT2vMG64HlFguSgcJeyM5by6Yr5csSOuJm60eXQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", + "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1073,22 +1047,6 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, "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", @@ -1355,26 +1313,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -1584,6 +1522,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -1774,28 +1721,6 @@ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "dev": true }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1828,12 +1753,11 @@ } }, "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -2081,15 +2005,6 @@ "isarray": "0.0.1" } }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -2470,15 +2385,6 @@ "node": ">=8" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -2859,9 +2765,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", - "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", + "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -3026,9 +2932,9 @@ "dev": true }, "@types/node": { - "version": "18.11.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.0.tgz", - "integrity": "sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==" + "version": "18.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", + "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==" }, "@types/proxyquire": { "version": "1.3.28", @@ -3061,12 +2967,6 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", @@ -3137,12 +3037,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, "asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -3451,15 +3345,6 @@ "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3497,14 +3382,15 @@ "dev": true }, "eslint": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.25.0.tgz", - "integrity": "sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.10.5", + "@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", @@ -3520,14 +3406,14 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", + "glob-parent": "^6.0.2", "globals": "^13.15.0", - "globby": "^11.1.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", @@ -3554,9 +3440,9 @@ } }, "eslint-plugin-promise": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.0.tgz", - "integrity": "sha512-NYCfDZF/KHt27p06nFAttgWuFyIDSUMnNaJBIY1FY9GpBFhdT2vMG64HlFguSgcJeyM5by6Yr5csSOuJm60eXQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", + "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", "dev": true, "requires": {} }, @@ -3649,19 +3535,6 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, "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", @@ -3853,20 +3726,6 @@ "type-fest": "^0.20.2" } }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, "graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -4017,6 +3876,12 @@ "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", "dev": true }, + "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": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -4175,22 +4040,6 @@ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "dev": true }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -4214,12 +4063,11 @@ } }, "mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -4410,12 +4258,6 @@ "isarray": "0.0.1" } }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -4673,12 +4515,6 @@ "dev": true, "requires": {} }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", diff --git a/package.json b/package.json index d5bc5bf3..43d532b0 100644 --- a/package.json +++ b/package.json @@ -34,15 +34,15 @@ "@types/chai": "^4.3.3", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.0", + "@types/node": "^18.11.4", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.8", "chai": "^4.3.6", "chai-as-promised": "^7.1.1", - "eslint": "^8.25.0", - "eslint-plugin-promise": "^6.1.0", - "mocha": "^10.0.0", + "eslint": "^8.26.0", + "eslint-plugin-promise": "^6.1.1", + "mocha": "^10.1.0", "proxyquire": "^2.1.3", "sinon": "^14.0.1", "sinon-chai": "^3.7.0", @@ -77,5 +77,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.52" + "version": "0.0.53" } From c0fc547f8836669db6537af70f2e56f9b1b519d0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 9 Nov 2022 11:30:33 +0100 Subject: [PATCH 432/729] fix -1 for non wc boxes --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index 09193bd1..2a3c4662 100644 --- a/main.js +++ b/main.js @@ -2796,6 +2796,9 @@ class VwWeconnect extends utils.Adapter { }); } async getElliData(type) { + if (this.config.historyLimit === -1) { + return; + } let name = "Seat Elli Data"; let path = "seatelli"; if (type === "skodapower") { From 037d3f1a8ccc0c3300ae63e0aa6f6d5fdd92282a Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 9 Nov 2022 21:30:47 +0100 Subject: [PATCH 433/729] fix reverse pos for skoda --- main.js | 167 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 105 insertions(+), 62 deletions(-) diff --git a/main.js b/main.js index 2a3c4662..82039a66 100644 --- a/main.js +++ b/main.js @@ -5109,76 +5109,51 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + await this.setObjectNotExistsAsync(vin + ".position.geohash", { + type: "state", + common: { + name: "Geohash", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); this.setState(vin + ".position.geohash", geohash.encode(state.val / 1000000, longitudeValue / 1000000), true); if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); return; } - this.log.debug("reverse pos started"); - request.get( - { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + state.val / 1000000 + "&lon=" + longitudeValue / 1000000 + "&format=json", + this.reversePosition(state.val / 1000000, longitudeValue / 1000000, vin); + } - headers: { - "User-Agent": "ioBroker/vw-connect", - }, - json: true, - followAllRedirects: true, + if (this.config.reversePos && id.indexOf("position.latitude") !== -1 && state.ts === state.lc) { + const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + const longitudeValue = parseFloat(longitude.val); + + await this.setObjectNotExistsAsync(vin + ".position", { + type: "channel", + common: { + name: "Position", }, - async (err, resp, body) => { - this.log.debug("reverse pos received"); - this.log.debug(JSON.stringify(body)); - if (err || resp.statusCode >= 400 || !body) { - body && this.log.error(JSON.stringify(body)); - resp && this.log.error(resp.statusCode.toString()); - err && this.log.error(err); - return; - } - if (body.display_name) { - try { - const number = body.address.house_number || ""; - const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; - await this.setObjectNotExistsAsync(vin + ".position.address.displayName", { - type: "state", - common: { - name: "displayName", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach((key) => { - this.setObjectNotExistsAsync(vin + ".position.address." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".position.address." + key, body.address[key], true); - }) - .catch((error) => { - this.log.error(error); - }); - }); - } catch (err) { - this.log.error(err); - } - } else { - this.log.error(JSON.stringify(body)); - } - } - ); + native: {}, + }); + await this.setObjectNotExistsAsync(vin + ".position.geohash", { + type: "state", + common: { + name: "Geohash", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.geohash", geohash.encode(state.val, longitudeValue), true); + + this.reversePosition(state.val, longitudeValue, vin); } } } else { @@ -5189,6 +5164,74 @@ class VwWeconnect extends utils.Adapter { this.log.error("Error in OnStateChange: " + err); } } + + async reversePosition(latitude, longitudeValue, vin) { + this.log.debug("reverse pos started"); + + request.get( + { + url: "https://nominatim.openstreetmap.org/reverse?lat=" + latitude + "&lon=" + longitudeValue + "&format=json", + + headers: { + "User-Agent": "ioBroker/vw-connect", + }, + json: true, + followAllRedirects: true, + }, + async (err, resp, body) => { + this.log.debug("reverse pos received"); + this.log.debug(JSON.stringify(body)); + if (err || resp.statusCode >= 400 || !body) { + body && this.log.error(JSON.stringify(body)); + resp && this.log.error(resp.statusCode.toString()); + err && this.log.error(err); + return; + } + if (body.display_name) { + try { + const number = body.address.house_number || ""; + const city = body.address.city || body.address.town || body.address.village; + const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + await this.setObjectNotExistsAsync(vin + ".position.address.displayName", { + type: "state", + common: { + name: "displayName", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.address.displayName", fullAdress, true); + Object.keys(body.address).forEach((key) => { + this.setObjectNotExistsAsync(vin + ".position.address." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState(vin + ".position.address." + key, body.address[key], true); + }) + .catch((error) => { + this.log.error(error); + }); + }); + } catch (err) { + this.log.error(err); + } + } else { + this.log.error(JSON.stringify(body)); + } + } + ); + } } // @ts-ignore parent is a valid property on module From e2dd42630645b21681030ec5c9270cfcaa2a8746 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 12 Nov 2022 11:30:10 +0100 Subject: [PATCH 434/729] fix refreshtoken brand --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 82039a66..a351569e 100644 --- a/main.js +++ b/main.js @@ -1381,8 +1381,9 @@ class VwWeconnect extends utils.Adapter { }; } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { url = "https://api.elli.eco/identity/v1/loginOrSignupWithIdkit"; + body = this.config.type === "seatelli" ? "seat" : "skoda"; body = JSON.stringify({ - brand: "seat", + brand: brand, grant_type: "refresh_token", refresh_token: rtoken, }); From 573e32e82d84b99fbe71cfcb8be7770990345d8d Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 5 Dec 2022 21:50:42 +0100 Subject: [PATCH 435/729] fix id status request --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index a351569e..87598f24 100644 --- a/main.js +++ b/main.js @@ -2392,7 +2392,7 @@ class VwWeconnect extends utils.Adapter { await axios({ method: "get", - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/status", + url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/selectivestatus?jobs=all", headers: { "content-type": "application/json", accept: "*/*", From 60b25befddc7f677b96afd7b1bc77d7c60fba24c Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 5 Dec 2022 22:12:28 +0100 Subject: [PATCH 436/729] fix id status update --- README.md | 3 + io-package.json | 5 +- main.js | 17 ++- package-lock.json | 310 +++++++++++++++++++++++++++------------------- package.json | 18 +-- 5 files changed, 215 insertions(+), 138 deletions(-) diff --git a/README.md b/README.md index 7907f206..c518103e 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,9 @@ Door and window states: ## Changelog +### 0.0.55 + +- fix id status update ### 0.0.51 - fix audi etron login diff --git a/io-package.json b/io-package.json index 49c8e615..3a2a89a9 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.53", + "version": "0.0.55", "news": { + "0.0.55": { + "en": "Fix ID status update" + }, "0.0.53": { "en": "Add datapoints for Skoda Enyaq v3" }, diff --git a/main.js b/main.js index 87598f24..d056ae72 100644 --- a/main.js +++ b/main.js @@ -2404,7 +2404,18 @@ class VwWeconnect extends utils.Adapter { }) .then(async (res) => { this.log.debug(JSON.stringify(res.data)); - this.extractKeys(this, vin + ".status", res.data.data); + const data = {}; + for (const key in res.data) { + for (const subkey in res.data[key]) { + if (key === "userCapabilities") { + data[key] = res.data[key]; + } else { + data[subkey] = res.data[key][subkey].value; + } + } + } + + this.extractKeys(this, vin + ".status", data); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -2417,7 +2428,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".status" + "rawJson", JSON.stringify(res.data.data), true); + this.setState(vin + ".status" + "rawJson", JSON.stringify(data), true); } resolve(); }) @@ -3240,7 +3251,7 @@ class VwWeconnect extends utils.Adapter { return; } try { - this.log.debug(JSON.stringify(body)); + this.log.info(JSON.stringify(body)); resolve(); } catch (err) { this.log.error(err); diff --git a/package-lock.json b/package-lock.json index 92a9f0f4..c16a4fba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "iobroker.vw-connect", - "version": "0.0.53", + "version": "0.0.55", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.53", + "version": "0.0.55", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.7", - "@peculiar/webcrypto": "^1.4.0", + "@peculiar/webcrypto": "^1.4.1", "axios": "^0.27.2", "ngeohash": "^0.6.3", "qs": "^6.11.0", @@ -20,22 +20,22 @@ }, "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.3", + "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.4", + "@types/node": "^18.11.11", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", - "@types/sinon-chai": "^3.2.8", - "chai": "^4.3.6", + "@types/sinon-chai": "^3.2.9", + "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.26.0", + "eslint": "^8.29.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.1.0", "proxyquire": "^2.1.3", - "sinon": "^14.0.1", + "sinon": "^14.0.2", "sinon-chai": "^3.7.0", - "typescript": "~4.8.4" + "typescript": "~4.9.3" }, "engines": { "node": ">=10.0.0" @@ -157,11 +157,11 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", - "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz", + "integrity": "sha512-6GptMYDMyWBHTUKndHaDsRZUO/XMSgIns2krxcm2L7SEExRHwawFvSwNBhqNPR9HJwv3MruAiF1bhN0we6j6GQ==", "dependencies": { - "asn1js": "^3.0.4", + "asn1js": "^3.0.5", "pvtsutils": "^1.3.2", "tslib": "^2.4.0" } @@ -178,14 +178,14 @@ } }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", - "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz", + "integrity": "sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==", "dependencies": { - "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/asn1-schema": "^2.3.0", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.2", - "tslib": "^2.4.0", + "tslib": "^2.4.1", "webcrypto-core": "^1.7.4" }, "engines": { @@ -193,9 +193,9 @@ } }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -210,27 +210,36 @@ "@sinonjs/commons": "^1.7.0" } }, + "node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", + "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.6.0", + "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" } }, "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, "node_modules/@types/chai": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", - "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, "node_modules/@types/chai-as-promised": { @@ -257,9 +266,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", - "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==" + "version": "18.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz", + "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==" }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -277,9 +286,9 @@ } }, "node_modules/@types/sinon-chai": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", - "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.9.tgz", + "integrity": "sha512-/19t63pFYU0ikrdbXKBWj9PCdnKyTd0Qkz0X91Ta081cYsq90OxYdcWwK/dwEoDa6dtXgj2HJfmzgq+QZTHdmQ==", "dev": true, "dependencies": { "@types/chai": "*", @@ -560,14 +569,14 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", - "deep-eql": "^3.0.1", + "deep-eql": "^4.1.2", "get-func-name": "^2.0.0", "loupe": "^2.3.1", "pathval": "^1.1.1", @@ -759,15 +768,15 @@ } }, "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "dependencies": { "type-detect": "^4.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, "node_modules/deep-is": { @@ -842,9 +851,9 @@ } }, "node_modules/eslint": { - "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.3", @@ -1560,7 +1569,7 @@ "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "dev": true }, "node_modules/isexe": { @@ -1681,7 +1690,7 @@ "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, "node_modules/lodash.merge": { @@ -1858,18 +1867,36 @@ } }, "node_modules/nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.3.tgz", + "integrity": "sha512-U597iWTTBBYIV72986jyU382/MMZ70ApWcRmkoF1AZ75bpqOtI3Gugv/6+0jLgoDOabmcSwYBkSSAWIp1eA5cg==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^7.0.4", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" } }, + "node_modules/nise/node_modules/@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/nise/node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2346,16 +2373,16 @@ } }, "node_modules/sinon": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.1.tgz", - "integrity": "sha512-JhJ0jCiyBWVAHDS+YSjgEbDn7Wgz9iIjA1/RK+eseJN0vAAWIWiXBdrnb92ELPyjsfreCYntD1ORtLSfIrlvSQ==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", + "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.8.3", + "@sinonjs/commons": "^2.0.0", "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", + "@sinonjs/samsam": "^7.0.1", "diff": "^5.0.0", - "nise": "^5.1.1", + "nise": "^5.1.2", "supports-color": "^7.2.0" }, "funding": { @@ -2513,9 +2540,9 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -2567,9 +2594,9 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", + "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2838,11 +2865,11 @@ } }, "@peculiar/asn1-schema": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.1.9.tgz", - "integrity": "sha512-Ipio+pXGpL/Vb0qB4GnOgFMgc1RAhKHOVy24rQYLvmOAVp9z/aFb+VdIiQH09NjgvGVmaWOUqSWd9vRHk3xbrg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz", + "integrity": "sha512-6GptMYDMyWBHTUKndHaDsRZUO/XMSgIns2krxcm2L7SEExRHwawFvSwNBhqNPR9HJwv3MruAiF1bhN0we6j6GQ==", "requires": { - "asn1js": "^3.0.4", + "asn1js": "^3.0.5", "pvtsutils": "^1.3.2", "tslib": "^2.4.0" } @@ -2856,21 +2883,21 @@ } }, "@peculiar/webcrypto": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz", - "integrity": "sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz", + "integrity": "sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==", "requires": { - "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/asn1-schema": "^2.3.0", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.2", - "tslib": "^2.4.0", + "tslib": "^2.4.1", "webcrypto-core": "^1.7.4" } }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -2883,29 +2910,40 @@ "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + } } }, "@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", + "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", "dev": true, "requires": { - "@sinonjs/commons": "^1.6.0", + "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" } }, "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, "@types/chai": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz", - "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, "@types/chai-as-promised": { @@ -2932,9 +2970,9 @@ "dev": true }, "@types/node": { - "version": "18.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", - "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==" + "version": "18.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz", + "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==" }, "@types/proxyquire": { "version": "1.3.28", @@ -2952,9 +2990,9 @@ } }, "@types/sinon-chai": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", - "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.9.tgz", + "integrity": "sha512-/19t63pFYU0ikrdbXKBWj9PCdnKyTd0Qkz0X91Ta081cYsq90OxYdcWwK/dwEoDa6dtXgj2HJfmzgq+QZTHdmQ==", "dev": true, "requires": { "@types/chai": "*", @@ -3174,14 +3212,14 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", - "deep-eql": "^3.0.1", + "deep-eql": "^4.1.2", "get-func-name": "^2.0.0", "loupe": "^2.3.1", "pathval": "^1.1.1", @@ -3320,9 +3358,9 @@ "dev": true }, "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "requires": { "type-detect": "^4.0.0" @@ -3382,9 +3420,9 @@ "dev": true }, "eslint": { - "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", @@ -3902,7 +3940,7 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "dev": true }, "isexe": { @@ -4006,7 +4044,7 @@ "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, "lodash.merge": { @@ -4147,16 +4185,38 @@ "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" }, "nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.3.tgz", + "integrity": "sha512-U597iWTTBBYIV72986jyU382/MMZ70ApWcRmkoF1AZ75bpqOtI3Gugv/6+0jLgoDOabmcSwYBkSSAWIp1eA5cg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^7.0.4", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + } + } + } } }, "normalize-path": { @@ -4484,16 +4544,16 @@ } }, "sinon": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.1.tgz", - "integrity": "sha512-JhJ0jCiyBWVAHDS+YSjgEbDn7Wgz9iIjA1/RK+eseJN0vAAWIWiXBdrnb92ELPyjsfreCYntD1ORtLSfIrlvSQ==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", + "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.3", + "@sinonjs/commons": "^2.0.0", "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", + "@sinonjs/samsam": "^7.0.1", "diff": "^5.0.0", - "nise": "^5.1.1", + "nise": "^5.1.2", "supports-color": "^7.2.0" }, "dependencies": { @@ -4602,9 +4662,9 @@ "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==" }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" }, "tunnel-agent": { "version": "0.6.0", @@ -4641,9 +4701,9 @@ "dev": true }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", + "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", "dev": true }, "universalify": { diff --git a/package.json b/package.json index 43d532b0..dd917e38 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "bundleDependencies": [], "dependencies": { "@iobroker/adapter-core": "^2.6.7", - "@peculiar/webcrypto": "^1.4.0", + "@peculiar/webcrypto": "^1.4.1", "axios": "^0.27.2", "ngeohash": "^0.6.3", "qs": "^6.11.0", @@ -31,22 +31,22 @@ "description": "Adapter for VW Connect", "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.3", + "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.4", + "@types/node": "^18.11.11", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", - "@types/sinon-chai": "^3.2.8", - "chai": "^4.3.6", + "@types/sinon-chai": "^3.2.9", + "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.26.0", + "eslint": "^8.29.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.1.0", "proxyquire": "^2.1.3", - "sinon": "^14.0.1", + "sinon": "^14.0.2", "sinon-chai": "^3.7.0", - "typescript": "~4.8.4" + "typescript": "~4.9.3" }, "engines": { "node": ">=10.0.0" @@ -77,5 +77,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.53" + "version": "0.0.55" } From 263b5138a93ff5402e56c40146efac52cb7ac3cd Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 6 Dec 2022 08:28:45 +0100 Subject: [PATCH 437/729] fix undefined values --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index d056ae72..a2fcede8 100644 --- a/main.js +++ b/main.js @@ -2410,7 +2410,7 @@ class VwWeconnect extends utils.Adapter { if (key === "userCapabilities") { data[key] = res.data[key]; } else { - data[subkey] = res.data[key][subkey].value; + data[subkey] = res.data[key][subkey].value || {}; } } } From 5c58e479ce41b0c2cf59167c6ccb174e27bf2ab3 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 6 Dec 2022 08:29:57 +0100 Subject: [PATCH 438/729] remove old news --- io-package.json | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/io-package.json b/io-package.json index 3a2a89a9..df095490 100644 --- a/io-package.json +++ b/io-package.json @@ -47,24 +47,6 @@ }, "0.0.36": { "en": "add Skoda Enyaq support" - }, - "0.0.35": { - "en": "add nodeJs v10 compatibility" - }, - "0.0.34": { - "en": "add auto accept of new privacy consent" - }, - "0.0.32": { - "en": "correct selection of last recent trips" - }, - "0.0.31": { - "en": "enable multiple selection of trip types" - }, - "0.0.30": { - "en": "fix problem with multiple cars, add VWv2 mode, VW and VWv2 are equal at the moment" - }, - "0.0.29": { - "en": "fix skoda refreshToken, smaller improvements" } }, "title": "VW Connect", From 13a09e2b02b5bcb52fa58fa4e505c180a4585232 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 6 Dec 2022 08:32:52 +0100 Subject: [PATCH 439/729] 0.0.56 --- io-package.json | 5 ++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/io-package.json b/io-package.json index df095490..f8b53915 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.55", + "version": "0.0.56", "news": { + "0.0.56": { + "en": "Fix invalid state warning" + }, "0.0.55": { "en": "Fix ID status update" }, diff --git a/package-lock.json b/package-lock.json index c16a4fba..c2de97fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.55", + "version": "0.0.56", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.55", + "version": "0.0.56", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.7", diff --git a/package.json b/package.json index dd917e38..0c967a0d 100644 --- a/package.json +++ b/package.json @@ -77,5 +77,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.55" + "version": "0.0.56" } From 613d296f860594ad6d790b2ef078da267509ca3c Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 7 Dec 2022 09:43:05 +0100 Subject: [PATCH 440/729] fix seat brand --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index a2fcede8..11fe6ff7 100644 --- a/main.js +++ b/main.js @@ -1342,10 +1342,14 @@ class VwWeconnect extends utils.Adapter { let body = "refresh_token=" + rtoken; let form = ""; let brand = this.config.type === "skodae" ? "skoda" : this.config.type; + if (this.config.type === "vwv2") { brand = "vw"; } + if (this.config.type === "seatelli") { + brand = "seat"; + } body = "brand=" + brand + "&" + body; let headers = { "user-agent": this.userAgent, From 7b8e4229e7d7939d0381a7b61e98487e48c892b1 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 28 Dec 2022 14:13:57 +0100 Subject: [PATCH 441/729] parking position for id. models --- main.js | 49 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 11fe6ff7..8c41ca2b 100644 --- a/main.js +++ b/main.js @@ -3741,8 +3741,9 @@ class VwWeconnect extends utils.Adapter { return; } } - if (path === "position") { - this.setObjectNotExistsAsync(vin + ".position.isMoving", { + if (path === "position" || path === "parkingPosition") { + adapter.log.info("Parking Position: " + resp.statusCode); + this.setObjectNotExistsAsync(vin + "." + path + ".isMoving", { type: "state", common: { name: "is car moving", @@ -3955,10 +3956,23 @@ class VwWeconnect extends utils.Adapter { //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { // setOutsideTemperature(vin, value); //} + // Gather general values from ID. models + if (isStatusData && this.key == "doorLockStatus") { + adapter.log.info("Locked recognized: " + value); + adapter.setIsCarLocked(vin, value == "locked"); + } + if (path == "ParkingPosition") { + if (this.key == "lat") { + + } + if (this.key == "lon") { + + } + } if (isStatusData && this.key == "value") { // Audi and Skoda have different (shorter) dataId if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { - adapter.setIsCarLocked(vin, value); + adapter.setIsCarLocked(vin, value == 2); } if ((dataId == "0x030102FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301020001") { adapter.setOutsideTemperature(vin, value); @@ -4030,7 +4044,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".status.isCarLocked", value == 2, true); + this.setState(vin + ".status.isCarLocked", value, true); } async setOutsideTemperature(vin, value) { @@ -5085,9 +5099,22 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.lock", state.val, true); } - if (id.indexOf("carCoordinate.latitude") !== -1 && state.ts === state.lc) { - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); + if ((id.indexOf("carCoordinate.latitude") !== -1 || + id.indexOf("parkingposition.lat") !== -1) && + state.ts === state.lc) { + const latitudeValue; + const longitude; + const longitudeValue; + if (id.indexOf("carCoordinate.latitude") !== -1) { + latitudeValue = state.val / 1000000; + longitude = await this.getStateAsync(id.replace("latitude", "longitude")); + longitudeValue = parseFloat(longitude.val) / 1000000; + } else { + // values of ID. models + latitudeValue = state.val; + longitude = await this.getStateAsync(id.replace("lat", "lon")); + longitudeValue = longitude.val; + } await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { type: "state", @@ -5100,7 +5127,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.latitudeConv", state.val / 1000000, true); + this.setState(vin + ".position.latitudeConv", latitudeValue, true); await this.setObjectNotExistsAsync(vin + ".position.longitudeConv", { type: "state", common: { @@ -5112,7 +5139,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.longitudeConv", longitudeValue / 1000000, true); + this.setState(vin + ".position.longitudeConv", longitudeValue, true); await this.setObjectNotExistsAsync(vin + ".position.geohash", { type: "state", @@ -5136,13 +5163,13 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.geohash", geohash.encode(state.val / 1000000, longitudeValue / 1000000), true); + this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); return; } - this.reversePosition(state.val / 1000000, longitudeValue / 1000000, vin); + this.reversePosition(latitudeValue, longitudeValue, vin); } if (this.config.reversePos && id.indexOf("position.latitude") !== -1 && state.ts === state.lc) { From d437abaf23eccf8bdbad9f4b03ac8afb49c0e4a3 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 28 Dec 2022 14:40:36 +0100 Subject: [PATCH 442/729] bugfix --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 8c41ca2b..f4aba154 100644 --- a/main.js +++ b/main.js @@ -5102,9 +5102,9 @@ class VwWeconnect extends utils.Adapter { if ((id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) && state.ts === state.lc) { - const latitudeValue; - const longitude; - const longitudeValue; + let latitudeValue; + let longitude; + let longitudeValue; if (id.indexOf("carCoordinate.latitude") !== -1) { latitudeValue = state.val / 1000000; longitude = await this.getStateAsync(id.replace("latitude", "longitude")); From ae08f0034925d58db2e6093f7db1d457e813451e Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 09:11:26 +0100 Subject: [PATCH 443/729] fix keys --- main.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main.js b/main.js index f4aba154..16b118da 100644 --- a/main.js +++ b/main.js @@ -3957,18 +3957,10 @@ class VwWeconnect extends utils.Adapter { // setOutsideTemperature(vin, value); //} // Gather general values from ID. models - if (isStatusData && this.key == "doorLockStatus") { + if (this.key == "doorLockStatus") { adapter.log.info("Locked recognized: " + value); adapter.setIsCarLocked(vin, value == "locked"); } - if (path == "ParkingPosition") { - if (this.key == "lat") { - - } - if (this.key == "lon") { - - } - } if (isStatusData && this.key == "value") { // Audi and Skoda have different (shorter) dataId if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { From e27d21a30b9068281ea644ffd02940493711d20e Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 11:07:37 +0100 Subject: [PATCH 444/729] test --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 16b118da..7ed85e1e 100644 --- a/main.js +++ b/main.js @@ -3957,6 +3957,7 @@ class VwWeconnect extends utils.Adapter { // setOutsideTemperature(vin, value); //} // Gather general values from ID. models + adapter.log.info("key: " + this.key + " path: " + path + " value = " + value); if (this.key == "doorLockStatus") { adapter.log.info("Locked recognized: " + value); adapter.setIsCarLocked(vin, value == "locked"); @@ -5091,6 +5092,7 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.lock", state.val, true); } + adapter.log.info("id = " + id); if ((id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) && state.ts === state.lc) { From d0cbcd7b65c9cd15bfcc51d815eb5d483912fcb3 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 11:12:17 +0100 Subject: [PATCH 445/729] bugfix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 7ed85e1e..d84dd147 100644 --- a/main.js +++ b/main.js @@ -5092,7 +5092,7 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.lock", state.val, true); } - adapter.log.info("id = " + id); + this.log.info("id = " + id); if ((id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) && state.ts === state.lc) { From 542ae86dfe046adab7a7369aed7ab36048f84f16 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 11:15:33 +0100 Subject: [PATCH 446/729] disable print --- main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.js b/main.js index d84dd147..f12d6192 100644 --- a/main.js +++ b/main.js @@ -5091,8 +5091,6 @@ class VwWeconnect extends utils.Adapter { if (id.indexOf(".status.isCarLocked") !== -1) { this.setState(vin + ".remote.lock", state.val, true); } - - this.log.info("id = " + id); if ((id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) && state.ts === state.lc) { From aaccf869d4a0108d838b218d4476aa65025c2970 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 11:21:23 +0100 Subject: [PATCH 447/729] move lockstatus to stateChange --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index f12d6192..4c8bade7 100644 --- a/main.js +++ b/main.js @@ -3956,12 +3956,6 @@ class VwWeconnect extends utils.Adapter { //if (isStatusData && newPath.endsWith(".outdoorTemperature.content")) { // setOutsideTemperature(vin, value); //} - // Gather general values from ID. models - adapter.log.info("key: " + this.key + " path: " + path + " value = " + value); - if (this.key == "doorLockStatus") { - adapter.log.info("Locked recognized: " + value); - adapter.setIsCarLocked(vin, value == "locked"); - } if (isStatusData && this.key == "value") { // Audi and Skoda have different (shorter) dataId if ((dataId == "0x030104FFFF" || dataId == "0x0301FFFFFF") && fieldId == "0x0301040001") { @@ -5091,6 +5085,12 @@ class VwWeconnect extends utils.Adapter { if (id.indexOf(".status.isCarLocked") !== -1) { this.setState(vin + ".remote.lock", state.val, true); } + // Gather general values from ID. models + adapter.log.info("key: " + this.key + " path: " + path + " value = " + value); + if (id.indexOf("accessStatus.doorLockStatus") !== -1) { + adapter.log.info("Locked recognized: " + state.val); + adapter.setIsCarLocked(vin, state.val == "locked"); + } if ((id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) && state.ts === state.lc) { From 85876a0033974d18985f91072e03f908a8c64cd3 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 11:22:39 +0100 Subject: [PATCH 448/729] bugifx --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.js b/main.js index 4c8bade7..0912b5b7 100644 --- a/main.js +++ b/main.js @@ -5086,9 +5086,8 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.lock", state.val, true); } // Gather general values from ID. models - adapter.log.info("key: " + this.key + " path: " + path + " value = " + value); if (id.indexOf("accessStatus.doorLockStatus") !== -1) { - adapter.log.info("Locked recognized: " + state.val); + this.log.info("Locked recognized: " + state.val); adapter.setIsCarLocked(vin, state.val == "locked"); } if ((id.indexOf("carCoordinate.latitude") !== -1 || From a1428ff9cbb742cf75837cbd693442f6dd11d6ff Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 11:24:11 +0100 Subject: [PATCH 449/729] bugifx --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 0912b5b7..182b24d4 100644 --- a/main.js +++ b/main.js @@ -5088,7 +5088,7 @@ class VwWeconnect extends utils.Adapter { // Gather general values from ID. models if (id.indexOf("accessStatus.doorLockStatus") !== -1) { this.log.info("Locked recognized: " + state.val); - adapter.setIsCarLocked(vin, state.val == "locked"); + this.setIsCarLocked(vin, state.val == "locked"); } if ((id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) && From 2be56bab3bb4bf1f9dce9ece04b48a8bdf0962e6 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 22:24:46 +0100 Subject: [PATCH 450/729] change --- main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index 182b24d4..b09f0f71 100644 --- a/main.js +++ b/main.js @@ -5090,9 +5090,8 @@ class VwWeconnect extends utils.Adapter { this.log.info("Locked recognized: " + state.val); this.setIsCarLocked(vin, state.val == "locked"); } - if ((id.indexOf("carCoordinate.latitude") !== -1 || - id.indexOf("parkingposition.lat") !== -1) && - state.ts === state.lc) { + if (id.indexOf("carCoordinate.latitude") !== -1 || + id.indexOf("parkingposition.lat") !== -1) { let latitudeValue; let longitude; let longitudeValue; @@ -5155,12 +5154,13 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); - - if (!this.config.reversePos) { - this.log.debug("reverse pos deactivated"); - return; + if (state.ts === state.lc) { + if (!this.config.reversePos) { + this.log.debug("reverse pos deactivated"); + return; + } + this.reversePosition(latitudeValue, longitudeValue, vin); } - this.reversePosition(latitudeValue, longitudeValue, vin); } if (this.config.reversePos && id.indexOf("position.latitude") !== -1 && state.ts === state.lc) { From 1ce804f8be6ccfd1ccc7d659f77e8ed5e5446ea7 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 23:42:52 +0100 Subject: [PATCH 451/729] fix --- main.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index b09f0f71..2ce83221 100644 --- a/main.js +++ b/main.js @@ -48,6 +48,7 @@ class VwWeconnect extends utils.Adapter { this.vinArray = []; this.etags = {}; + this.hasRemoteLock = this.statesArray = [ { @@ -2300,6 +2301,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.hasRemoteLock = true; this.setObjectNotExists(vehicle + ".remote.ventilationv2", { type: "state", common: { @@ -3755,6 +3757,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }) .then(() => { + this.log.info("Parking position status = " + resp.statusCode); if (resp.statusCode === 204) { this.setState(vin + ".position.isMoving", true, true); resolve(); @@ -5083,12 +5086,13 @@ class VwWeconnect extends utils.Adapter { } } if (id.indexOf(".status.isCarLocked") !== -1) { - this.setState(vin + ".remote.lock", state.val, true); + if (this.hasRemoteLock) { + this.setState(vin + ".remote.lock", state.val, true); + } } // Gather general values from ID. models if (id.indexOf("accessStatus.doorLockStatus") !== -1) { - this.log.info("Locked recognized: " + state.val); - this.setIsCarLocked(vin, state.val == "locked"); + this.setIsCarLocked(vin, state.val === "locked"); } if (id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) { @@ -5163,7 +5167,7 @@ class VwWeconnect extends utils.Adapter { } } - if (this.config.reversePos && id.indexOf("position.latitude") !== -1 && state.ts === state.lc) { + if (this.config.reversePos && id.indexOf("position.latitude") !== -1) { const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); const longitudeValue = parseFloat(longitude.val); @@ -5186,8 +5190,9 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.geohash", geohash.encode(state.val, longitudeValue), true); - - this.reversePosition(state.val, longitudeValue, vin); + if (state.ts === state.lc) { + this.reversePosition(state.val, longitudeValue, vin); + } } } } else { From ee803845f775718843262ed6068ed80d828c591a Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 23:51:30 +0100 Subject: [PATCH 452/729] fix parkingposition --- main.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 2ce83221..5b184003 100644 --- a/main.js +++ b/main.js @@ -48,7 +48,8 @@ class VwWeconnect extends utils.Adapter { this.vinArray = []; this.etags = {}; - this.hasRemoteLock = + this.hasRemoteLock = false; + this.isFirstLocation = true; this.statesArray = [ { @@ -3743,7 +3744,7 @@ class VwWeconnect extends utils.Adapter { return; } } - if (path === "position" || path === "parkingPosition") { + if (path === "position" || path === "parkingposition") { adapter.log.info("Parking Position: " + resp.statusCode); this.setObjectNotExistsAsync(vin + "." + path + ".isMoving", { type: "state", @@ -5086,7 +5087,7 @@ class VwWeconnect extends utils.Adapter { } } if (id.indexOf(".status.isCarLocked") !== -1) { - if (this.hasRemoteLock) { + if (this.hasRemoteLock === true) { this.setState(vin + ".remote.lock", state.val, true); } } @@ -5158,7 +5159,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); - if (state.ts === state.lc) { + if (state.ts === state.lc || this.isFirstLocation === true) { if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); return; @@ -5190,7 +5191,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.geohash", geohash.encode(state.val, longitudeValue), true); - if (state.ts === state.lc) { + if (state.ts === state.lc || this.isFirstLocation === true) { this.reversePosition(state.val, longitudeValue, vin); } } @@ -5206,6 +5207,7 @@ class VwWeconnect extends utils.Adapter { async reversePosition(latitude, longitudeValue, vin) { this.log.debug("reverse pos started"); + this.isFirstLocation = false; request.get( { From 792ebaad5a4ec731db522bac4d135e5ead19d376 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 29 Dec 2022 23:56:40 +0100 Subject: [PATCH 453/729] test --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 5b184003..21d47162 100644 --- a/main.js +++ b/main.js @@ -3744,8 +3744,8 @@ class VwWeconnect extends utils.Adapter { return; } } + adapter.log.info("Resp: " + resp.statusCode + " path = " + path); if (path === "position" || path === "parkingposition") { - adapter.log.info("Parking Position: " + resp.statusCode); this.setObjectNotExistsAsync(vin + "." + path + ".isMoving", { type: "state", common: { From c67f28570efda1e86de72edf4006217dc46045bc Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 30 Dec 2022 00:01:27 +0100 Subject: [PATCH 454/729] fix test --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index 21d47162..805ade5c 100644 --- a/main.js +++ b/main.js @@ -3744,7 +3744,6 @@ class VwWeconnect extends utils.Adapter { return; } } - adapter.log.info("Resp: " + resp.statusCode + " path = " + path); if (path === "position" || path === "parkingposition") { this.setObjectNotExistsAsync(vin + "." + path + ".isMoving", { type: "state", From 9b6708270be0f0a2daae4394ec0a9ea4e87a17ad Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Jan 2023 10:08:41 +0100 Subject: [PATCH 455/729] fix skoda login --- main.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 11fe6ff7..971a1550 100644 --- a/main.js +++ b/main.js @@ -1063,6 +1063,21 @@ class VwWeconnect extends utils.Adapter { body += "&brand=" + brand; } + if (this.config.type === "skodae") { + const parsedParameters = qs.parse(hash); + method = "POST"; + url = "https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId=TECHNICAL"; + body = JSON.stringify({ + authorizationCode: parsedParameters.code, + }); + headers = { + accept: "*/*", + authorization: "Bearer " + parsedParameters.id_token, + "content-type": "application/json", + "user-agent": "OneConnect/000000117 CFNetwork/1240.0.4 Darwin/20.6.0", + "accept-language": "de-de", + }; + } if (this.config.type === "go") { url = "https://dmp.apps.emea.vwapps.io/mobility-platform/token"; body = @@ -1242,8 +1257,8 @@ class VwWeconnect extends utils.Adapter { this.secondAccessToken = this.config.atoken; this.secondRefreshToken = this.config.rtoken; } - this.config.atoken = tokens.access_token; - this.config.rtoken = tokens.refresh_token; + this.config.atoken = tokens.access_token || tokens.accessToken; + this.config.rtoken = tokens.refresh_token || tokens.refreshToken; if (this.config.type === "seatelli" || this.config.type === "skodapower") { this.config.atoken = tokens.token; } @@ -1820,8 +1835,11 @@ class VwWeconnect extends utils.Adapter { } this.log.debug(JSON.stringify(body)); if (this.config.type === "id") { + this.log.info("Found " + body.data.length + " vehicles"); + body.data.forEach((element) => { const vin = element.vin; + this.log.info(`Create vehicle ${vin}`); if (!vin) { this.log.info("No vin found for:" + JSON.stringify(element)); return; From 5258d16f58c3a4ed39b309a757353f792fd9fd8e Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Jan 2023 12:12:56 +0100 Subject: [PATCH 456/729] fix skoda token --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 145d0444..dae67b30 100644 --- a/main.js +++ b/main.js @@ -158,7 +158,7 @@ class VwWeconnect extends utils.Adapter { this.scope = "openid mbb profile"; this.redirect = "skodaconnect://oidc.login/"; this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; + this.responseType = "code%20id_token%20token"; this.xappversion = "3.2.6"; this.xappname = "cz.skodaauto.connect"; } @@ -1067,6 +1067,7 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "skodae") { const parsedParameters = qs.parse(hash); + this.config.atoken = parsedParameters.access_token; method = "POST"; url = "https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId=TECHNICAL"; body = JSON.stringify({ From 094392bac3ca0d01a2544b3ffd86c360d2b3c398 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Jan 2023 13:46:38 +0100 Subject: [PATCH 457/729] fix parsing personal data --- main.js | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/main.js b/main.js index dae67b30..bb5c679c 100644 --- a/main.js +++ b/main.js @@ -18,6 +18,7 @@ const traverse = require("traverse"); const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); const axios = require("axios").default; +const Json2iob = require("./lib/json2iob"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -34,6 +35,7 @@ class VwWeconnect extends utils.Adapter { this.on("unload", this.onUnload.bind(this)); this.extractKeys = extractKeys; + this.json2iob = new Json2iob(this); this.jar = request.jar(); this.userAgent = "ioBroker v"; this.refreshTokenInterval = null; @@ -1077,7 +1079,7 @@ class VwWeconnect extends utils.Adapter { accept: "*/*", authorization: "Bearer " + parsedParameters.id_token, "content-type": "application/json", - "user-agent": "OneConnect/000000117 CFNetwork/1240.0.4 Darwin/20.6.0", + "user-agent": this.useragent, "accept-language": "de-de", }; } @@ -1581,25 +1583,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); const data = JSON.parse(body); this.config.identifier = data.businessIdentifierValue; - Object.keys(data).forEach((key) => { - this.setObjectNotExistsAsync("personal." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState("personal." + key, data[key], true); - }) - .catch((error) => { - this.log.error(error); - }); - }); + this.json2iob.parse("personal", data); resolve(); } catch (err) { @@ -2029,6 +2013,7 @@ class VwWeconnect extends utils.Adapter { return; } if (this.config.type === "skodae") { + this.log.info(`Found ${body.vehicles.length} vehicles`); body.vehicles.forEach(async (element) => { const vin = element.vin; this.vinArray.push(vin); @@ -5113,8 +5098,7 @@ class VwWeconnect extends utils.Adapter { if (id.indexOf("accessStatus.doorLockStatus") !== -1) { this.setIsCarLocked(vin, state.val === "locked"); } - if (id.indexOf("carCoordinate.latitude") !== -1 || - id.indexOf("parkingposition.lat") !== -1) { + if (id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) { let latitudeValue; let longitude; let longitudeValue; @@ -5123,7 +5107,7 @@ class VwWeconnect extends utils.Adapter { longitude = await this.getStateAsync(id.replace("latitude", "longitude")); longitudeValue = parseFloat(longitude.val) / 1000000; } else { - // values of ID. models + // values of ID. models latitudeValue = state.val; longitude = await this.getStateAsync(id.replace("lat", "lon")); longitudeValue = longitude.val; From 530e4ba3eb124145a142d9fcc8bb715c9dce341c Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Jan 2023 13:50:23 +0100 Subject: [PATCH 458/729] add lib --- lib/json2iob.js | 294 ++++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 178 ++++++++++++++++------------ package.json | 9 +- 3 files changed, 403 insertions(+), 78 deletions(-) create mode 100644 lib/json2iob.js diff --git a/lib/json2iob.js b/lib/json2iob.js new file mode 100644 index 00000000..6f63e24b --- /dev/null +++ b/lib/json2iob.js @@ -0,0 +1,294 @@ +//v1.9 +/* +options: +write //set common write variable to true +forceIndex //instead of trying to find names for array entries, use the index as the name +channelName //set name of the root channel +preferedArrayName //set key to use this as an array entry name +preferedArrayDec //set key to use this as an array entry description +autoCast (true false) // make JSON.parse to parse numbers correctly +descriptions: Object of names for state keys +*/ +const JSONbig = require("json-bigint")({ storeAsString: true }); +module.exports = class Json2iob { + constructor(adapter) { + this.adapter = adapter; + this.alreadyCreatedObjects = {}; + } + + async parse(path, element, options) { + try { + if (element === null || element === undefined) { + this.adapter.log.debug("Cannot extract empty: " + path); + return; + } + + const objectKeys = Object.keys(element); + + if (!options || !options.write) { + if (!options) { + options = { write: false }; + } else { + options["write"] = false; + } + } + + if (typeof element === "string" || typeof element === "number") { + const lastPathElement = path.split(".").pop(); + + if (!this.alreadyCreatedObjects[path]) { + await this.adapter + .setObjectNotExistsAsync(path, { + type: "state", + common: { + name: lastPathElement, + role: this.getRole(element, options.write), + type: element !== null ? typeof element : "mixed", + write: options.write, + read: true, + }, + native: {}, + }) + .then(() => { + this.alreadyCreatedObjects[path] = true; + }) + .catch((error) => { + this.adapter.log.error(error); + }); + } + await this.adapter.setStateAsync(path, element, true); + + return; + } + if (!this.alreadyCreatedObjects[path]) { + let name = options.channelName || ""; + if (options.preferedArrayDesc && element[options.preferedArrayDesc]) { + name = element[options.preferedArrayDesc]; + } + await this.adapter + .setObjectNotExistsAsync(path, { + type: "channel", + common: { + name: name, + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.alreadyCreatedObjects[path] = true; + options.channelName = undefined; + }) + .catch((error) => { + this.adapter.log.error(error); + }); + } + if (Array.isArray(element)) { + await this.extractArray(element, "", path, options); + return; + } + + for (const key of objectKeys) { + if (this.isJsonString(element[key]) && options.autoCast) { + element[key] = JSONbig.parse(element[key]); + } + + if (Array.isArray(element[key])) { + await this.extractArray(element, key, path, options); + } else if (element[key] !== null && typeof element[key] === "object") { + await this.parse(path + "." + key, element[key], options); + } else { + const pathKey = key.replace(/\./g, "_"); + if (!this.alreadyCreatedObjects[path + "." + pathKey]) { + let objectName = key; + if (options.descriptions && options.descriptions[key]) { + objectName = options.descriptions[key]; + } + const type = element[key] !== null ? typeof element[key] : "mixed"; + const common = { + name: objectName, + role: this.getRole(element[key], options.write), + type: type, + write: options.write, + read: true, + }; + + await this.adapter + .setObjectNotExistsAsync(path + "." + pathKey, { + type: "state", + common: common, + native: {}, + }) + .then(() => { + this.alreadyCreatedObjects[path + "." + pathKey] = true; + }) + .catch((error) => { + this.adapter.log.error(error); + }); + } + await this.adapter.setStateAsync(path + "." + pathKey, element[key], true); + } + } + } catch (error) { + this.adapter.log.error("Error extract keys: " + path + " " + JSON.stringify(element)); + this.adapter.log.error(error); + } + } + async extractArray(element, key, path, options) { + try { + if (key) { + element = element[key]; + } + for (let index in element) { + const arrayElement = element[index]; + index = parseInt(index) + 1; + if (index < 10) { + index = "0" + index; + } + let arrayPath = key + index; + if (typeof arrayElement === "string" && key !== "") { + await this.parse(path + "." + key + "." + arrayElement, arrayElement, options); + continue; + } + if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { + arrayPath = arrayElement[Object.keys(arrayElement)[0]]; + } + for (const keyName of Object.keys(arrayElement)) { + if (keyName.endsWith("Id") && arrayElement[keyName] !== null) { + if (arrayElement[keyName] && arrayElement[keyName].replace) { + arrayPath = arrayElement[keyName].replace(/\./g, ""); + } else { + arrayPath = arrayElement[keyName]; + } + } + } + for (const keyName in Object.keys(arrayElement)) { + if (keyName.endsWith("Name")) { + if (arrayElement[keyName] && arrayElement[keyName].replace) { + arrayPath = arrayElement[keyName].replace(/\./g, ""); + } else { + arrayPath = arrayElement[keyName]; + } + } + } + + if (arrayElement.id) { + if (arrayElement.id.replace) { + arrayPath = arrayElement.id.replace(/\./g, ""); + } else { + arrayPath = arrayElement.id; + } + } + if (arrayElement.name) { + arrayPath = arrayElement.name.replace(/\./g, ""); + } + if (arrayElement.label) { + arrayPath = arrayElement.label.replace(/\./g, ""); + } + if (arrayElement.labelText) { + arrayPath = arrayElement.labelText.replace(/\./g, ""); + } + if (arrayElement.start_date_time) { + arrayPath = arrayElement.start_date_time.replace(/\./g, ""); + } + if (options.preferedArrayName && options.preferedArrayName.indexOf("+") !== -1) { + const preferedArrayNameArray = options.preferedArrayName.split("+"); + if (arrayElement[preferedArrayNameArray[0]]) { + const element0 = arrayElement[preferedArrayNameArray[0]].replace(/\./g, "").replace(/ /g, ""); + let element1 = ""; + if (preferedArrayNameArray[1].indexOf("/") !== -1) { + const subArray = preferedArrayNameArray[1].split("/"); + const subElement = arrayElement[subArray[0]]; + if (subElement && subElement[subArray[1]] !== undefined) { + element1 = subElement[subArray[1]]; + } else if (arrayElement[subArray[1]] !== undefined) { + element1 = arrayElement[subArray[1]]; + } + } else { + element1 = arrayElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); + } + arrayPath = element0 + "-" + element1; + } + } else if (options.preferedArrayName && options.preferedArrayName.indexOf("/") !== -1) { + const preferedArrayNameArray = options.preferedArrayName.split("/"); + const subElement = arrayElement[preferedArrayNameArray[0]]; + if (subElement) { + arrayPath = subElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); + } + } else if (options.preferedArrayName && arrayElement[options.preferedArrayName]) { + arrayPath = arrayElement[options.preferedArrayName].toString().replace(/\./g, ""); + } + + if (options.forceIndex) { + arrayPath = key + index; + } + //special case array with 2 string objects + if ( + !options.forceIndex && + Object.keys(arrayElement).length === 2 && + typeof Object.keys(arrayElement)[0] === "string" && + typeof Object.keys(arrayElement)[1] === "string" && + typeof arrayElement[Object.keys(arrayElement)[0]] !== "object" && + typeof arrayElement[Object.keys(arrayElement)[1]] !== "object" && + arrayElement[Object.keys(arrayElement)[0]] !== "null" + ) { + let subKey = arrayElement[Object.keys(arrayElement)[0]]; + const subValue = arrayElement[Object.keys(arrayElement)[1]]; + const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; + if (key) { + subKey = key + "." + subKey; + } + if (!this.alreadyCreatedObjects[path + "." + subKey]) { + await this.adapter + .setObjectNotExistsAsync(path + "." + subKey, { + type: "state", + common: { + name: subName, + role: this.getRole(subValue, options.write), + type: subValue !== null ? typeof subValue : "mixed", + write: options.write, + read: true, + }, + native: {}, + }) + .then(() => { + this.alreadyCreatedObjects[path + "." + subKey] = true; + }); + } + await this.adapter.setStateAsync(path + "." + subKey, subValue, true); + continue; + } + await this.parse(path + "." + arrayPath, arrayElement, options); + } + } catch (error) { + this.adapter.log.error("Cannot extract array " + path); + this.adapter.log.error(error); + } + } + isJsonString(str) { + try { + JSON.parse(str); + } catch (e) { + return false; + } + return true; + } + getRole(element, write) { + if (typeof element === "boolean" && !write) { + return "indicator"; + } + if (typeof element === "boolean" && write) { + return "switch"; + } + if (typeof element === "number" && !write) { + return "value"; + } + if (typeof element === "number" && write) { + return "level"; + } + if (typeof element === "string") { + return "text"; + } + return "state"; + } +}; diff --git a/package-lock.json b/package-lock.json index c2de97fa..9405155a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@iobroker/adapter-core": "^2.6.7", "@peculiar/webcrypto": "^1.4.1", "axios": "^0.27.2", + "json-bigint": "^1.0.0", "ngeohash": "^0.6.3", "qs": "^6.11.0", "request": "^2.88.2", @@ -23,34 +24,34 @@ "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.11", + "@types/node": "^18.11.18", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.29.0", + "eslint": "^8.31.0", "eslint-plugin-promise": "^6.1.1", - "mocha": "^10.1.0", + "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^14.0.2", "sinon-chai": "^3.7.0", - "typescript": "~4.9.3" + "typescript": "~4.9.4" }, "engines": { "node": ">=10.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": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -65,14 +66,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "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" @@ -266,9 +267,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.11.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz", - "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==" + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -302,9 +303,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "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" @@ -493,6 +494,14 @@ "tweetnacl": "^0.14.3" } }, + "node_modules/bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -851,13 +860,13 @@ } }, "node_modules/eslint": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", - "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", + "version": "8.31.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz", + "integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -876,7 +885,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -980,9 +989,9 @@ } }, "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "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.8.0", @@ -1308,9 +1317,9 @@ } }, "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1410,9 +1419,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.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" @@ -1606,6 +1615,14 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -1762,9 +1779,9 @@ } }, "node_modules/mocha": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", - "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -2594,9 +2611,9 @@ } }, "node_modules/typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2775,15 +2792,15 @@ }, "dependencies": { "@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", + "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -2792,14 +2809,14 @@ } }, "@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, "@humanwhocodes/module-importer": { @@ -2970,9 +2987,9 @@ "dev": true }, "@types/node": { - "version": "18.11.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz", - "integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==" + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" }, "@types/proxyquire": { "version": "1.3.28", @@ -3006,9 +3023,9 @@ "dev": true }, "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "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": { @@ -3154,6 +3171,11 @@ "tweetnacl": "^0.14.3" } }, + "bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3420,13 +3442,13 @@ "dev": true }, "eslint": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", - "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", + "version": "8.31.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz", + "integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.1", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -3445,7 +3467,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -3518,9 +3540,9 @@ "dev": true }, "espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "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.8.0", @@ -3756,9 +3778,9 @@ } }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3826,9 +3848,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.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "import-fresh": { @@ -3974,6 +3996,14 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "requires": { + "bignumber.js": "^9.0.0" + } + }, "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -4101,9 +4131,9 @@ } }, "mocha": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", - "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "requires": { "ansi-colors": "4.1.1", @@ -4701,9 +4731,9 @@ "dev": true }, "typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true }, "universalify": { diff --git a/package.json b/package.json index 0c967a0d..66d9c3f7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@iobroker/adapter-core": "^2.6.7", "@peculiar/webcrypto": "^1.4.1", "axios": "^0.27.2", + "json-bigint": "^1.0.0", "ngeohash": "^0.6.3", "qs": "^6.11.0", "request": "^2.88.2", @@ -34,19 +35,19 @@ "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.11", + "@types/node": "^18.11.18", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.29.0", + "eslint": "^8.31.0", "eslint-plugin-promise": "^6.1.1", - "mocha": "^10.1.0", + "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^14.0.2", "sinon-chai": "^3.7.0", - "typescript": "~4.9.3" + "typescript": "~4.9.4" }, "engines": { "node": ">=10.0.0" From 7933187c5db464a1a33a67d3ca8c56547bd843d6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Jan 2023 13:54:27 +0100 Subject: [PATCH 459/729] update test workflow --- .github/workflows/test-and-release.yml | 155 ++++++++----------------- 1 file changed, 46 insertions(+), 109 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index c2e13373..d753d70b 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -5,7 +5,7 @@ name: Test and Release on: push: branches: - - "*" + - "main" tags: # normal versions - "v[0-9]+.[0-9]+.[0-9]+" @@ -13,6 +13,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: @@ -20,135 +25,67 @@ jobs: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: ioBroker/testing-action-check@v1 with: - node-version: ${{ matrix.node-version }} - - - name: Install Dependencies - run: npm ci - - - name: Lint source code - run: npm run lint - - name: Test package files - run: npm run test:package + node-version: "16.x" + # Uncomment the following line if your adapter cannot be installed using 'npm ci' + # install-command: 'npm install' + lint: true # Runs adapter tests on all supported node versions and OSes adapter-tests: if: contains(github.event.head_commit.message, '[skip ci]') == false - needs: [check-and-lint] - runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [18.x, 14.x, 16.x] + node-version: [14.x, 16.x, 18.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: ioBroker/testing-action-adapter@v1 with: node-version: ${{ matrix.node-version }} - - - name: Install Dependencies - run: npm ci - - - name: Run unit tests - run: npm run test:unit - - - name: Run integration tests (unix only) - if: startsWith(runner.OS, 'windows') == false - run: DEBUG=testing:* npm run test:integration - - - name: Run integration tests (windows only) - if: startsWith(runner.OS, 'windows') - run: set DEBUG=testing:* & npm run test:integration + os: ${{ matrix.os }} + # Uncomment the following line if your adapter cannot be installed using 'npm ci' + # install-command: 'npm install' # TODO: To enable automatic npm releases, create a token on npmjs.org # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options # Then uncomment the following block: -# # Deploys the final package to NPM -# deploy: -# needs: [adapter-tests] -# -# # Trigger this step only when a commit on any branch is tagged with a version number -# if: | -# contains(github.event.head_commit.message, '[skip ci]') == false && -# github.event_name == 'push' && -# startsWith(github.ref, 'refs/tags/v') -# -# runs-on: ubuntu-latest -# strategy: -# matrix: -# node-version: [14.x] -# -# steps: -# - name: Checkout code -# uses: actions/checkout@v2 +# # Deploys the final package to NPM +# deploy: +# needs: [check-and-lint, adapter-tests] # -# - name: Use Node.js ${{ matrix.node-version }} -# uses: actions/setup-node@v1 -# with: -# node-version: ${{ matrix.node-version }} +# # Trigger this step only when a commit on any branch is tagged with a version number +# if: | +# contains(github.event.head_commit.message, '[skip ci]') == false && +# github.event_name == 'push' && +# startsWith(github.ref, 'refs/tags/v') # -# - name: Extract the version and commit body from the tag -# id: extract_release -# # The body may be multiline, therefore newlines and % need to be escaped -# run: | -# VERSION="${{ github.ref }}" -# VERSION=${VERSION##*/v} -# 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-output name=BODY::$BODY" +# runs-on: ubuntu-latest # -# - name: Publish package to npm -# run: | -# npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} -# npm whoami -# npm publish +# # Write permissions are required to create Github releases +# permissions: +# contents: write # -# - name: Create Github Release -# uses: actions/create-release@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# tag_name: ${{ github.ref }} -# release_name: Release v${{ steps.extract_release.outputs.VERSION }} -# draft: false -# # Prerelease versions create prereleases on Github -# prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} -# body: ${{ steps.extract_release.outputs.BODY }} +# steps: +# - uses: ioBroker/testing-action-deploy@v1 +# with: +# node-version: '16.x' +# # Uncomment the following line if your adapter cannot be installed using 'npm ci' +# # install-command: 'npm install' +# npm-token: ${{ secrets.NPM_TOKEN }} +# github-token: ${{ secrets.GITHUB_TOKEN }} # -# # When using Sentry for error reporting, Sentry could be informed about new releases -# # To enable create a API-Token in Sentry (User settings, API keys) -# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options -# # Then uncomment and customize the following block: -# #- name: Notify Sentry.io about the release -# # run: | -# # npm i -g @sentry/cli -# # export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} -# # export SENTRY_URL=https://sentry.iobroker.net -# # export SENTRY_ORG=iobroker -# # export SENTRY_PROJECT=iobroker-vw-connect -# # export SENTRY_VERSION=iobroker.vw-connect@${{ steps.extract_release.outputs.VERSION }} -# # sentry-cli releases new $SENTRY_VERSION -# # sentry-cli releases finalize $SENTRY_VERSION -# # # Add the following line BEFORE finalize if repositories are connected in Sentry -# # #sentry-cli releases set-commits $SENTRY_VERSION --auto -# # # Add the following line BEFORE finalize if sourcemap uploads are needed -# # #sentry-cli releases files $SENTRY_VERSION upload-sourcemaps build/ +# # When using Sentry for error reporting, Sentry can be informed about new releases +# # To enable create a API-Token in Sentry (User settings, API keys) +# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options +# # Then uncomment and customize the following block: +# sentry: true +# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }} +# sentry-project: "iobroker-vw-connect" +# sentry-version-prefix: "iobroker.vw-connect" +# # If your sentry project is linked to a GitHub repository, you can enable the following option +# # sentry-github-integration: true From 131a127262f69a21b8b41afc62bcf2782277d603 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Jan 2023 13:56:36 +0100 Subject: [PATCH 460/729] update branch --- .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 d753d70b..3872ef90 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -5,7 +5,7 @@ name: Test and Release on: push: branches: - - "main" + - "*" tags: # normal versions - "v[0-9]+.[0-9]+.[0-9]+" From 8d5140d3463771487972674c43aa7c161ce26eab Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 2 Jan 2023 14:04:26 +0100 Subject: [PATCH 461/729] add forceindex --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index bb5c679c..a1a556e9 100644 --- a/main.js +++ b/main.js @@ -1583,7 +1583,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); const data = JSON.parse(body); this.config.identifier = data.businessIdentifierValue; - this.json2iob.parse("personal", data); + this.json2iob.parse("personal", data, { forceIndex: true }); resolve(); } catch (err) { From 9262577a896299afe3a21f310a27387840f0d9c4 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 2 Jan 2023 14:59:56 +0100 Subject: [PATCH 462/729] =?UTF-8?q?check=20f=C3=BCr=20longitude=20instead?= =?UTF-8?q?=20of=20latitude?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/main.js b/main.js index a1a556e9..5a7785cc 100644 --- a/main.js +++ b/main.js @@ -5098,19 +5098,20 @@ class VwWeconnect extends utils.Adapter { if (id.indexOf("accessStatus.doorLockStatus") !== -1) { this.setIsCarLocked(vin, state.val === "locked"); } - if (id.indexOf("carCoordinate.latitude") !== -1 || id.indexOf("parkingposition.lat") !== -1) { + // check für changes of longitude instead of latitude, because latitude will be already updated when longitude updates but not vice versa + if (id.indexOf("carCoordinate.longitude") !== -1 || id.indexOf("parkingposition.lon") !== -1) { + let latitude; let latitudeValue; - let longitude; let longitudeValue; - if (id.indexOf("carCoordinate.latitude") !== -1) { - latitudeValue = state.val / 1000000; - longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - longitudeValue = parseFloat(longitude.val) / 1000000; + if (id.indexOf("carCoordinate.longitude") !== -1) { + longitudeValue = state.val / 1000000; + latitude = await this.getStateAsync(id.replace("longitude", "latitude")); + latitudeValue = parseFloat(longitude.val) / 1000000; } else { // values of ID. models - latitudeValue = state.val; - longitude = await this.getStateAsync(id.replace("lat", "lon")); - longitudeValue = longitude.val; + longitudeValue = state.val; + latitude = await this.getStateAsync(id.replace("lon", "lat")); + latitudeValue = longitude.val; } await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { @@ -5170,9 +5171,10 @@ class VwWeconnect extends utils.Adapter { } } - if (this.config.reversePos && id.indexOf("position.latitude") !== -1) { - const longitude = await this.getStateAsync(id.replace("latitude", "longitude")); - const longitudeValue = parseFloat(longitude.val); + if (this.config.reversePos && id.indexOf("position.longitude") !== -1) { + const latitude = await this.getStateAsync(id.replace("longitude", "latitude")); + const latitudeValue = parseFloat(longitude.val); + const longitudeValue = state.val; await this.setObjectNotExistsAsync(vin + ".position", { type: "channel", @@ -5192,9 +5194,9 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.geohash", geohash.encode(state.val, longitudeValue), true); + this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); if (state.ts === state.lc || this.isFirstLocation === true) { - this.reversePosition(state.val, longitudeValue, vin); + this.reversePosition(latitudeValue, longitudeValue, vin); } } } From 3ae5748f3ab3c4134d1acdf2aa915d8ed6a61b06 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 2 Jan 2023 15:02:04 +0100 Subject: [PATCH 463/729] bugfix --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 5a7785cc..3837d0f8 100644 --- a/main.js +++ b/main.js @@ -5106,12 +5106,12 @@ class VwWeconnect extends utils.Adapter { if (id.indexOf("carCoordinate.longitude") !== -1) { longitudeValue = state.val / 1000000; latitude = await this.getStateAsync(id.replace("longitude", "latitude")); - latitudeValue = parseFloat(longitude.val) / 1000000; + latitudeValue = parseFloat(latitude.val) / 1000000; } else { // values of ID. models longitudeValue = state.val; latitude = await this.getStateAsync(id.replace("lon", "lat")); - latitudeValue = longitude.val; + latitudeValue = latitude.val; } await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { @@ -5173,7 +5173,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.reversePos && id.indexOf("position.longitude") !== -1) { const latitude = await this.getStateAsync(id.replace("longitude", "latitude")); - const latitudeValue = parseFloat(longitude.val); + const latitudeValue = parseFloat(latitude.val); const longitudeValue = state.val; await this.setObjectNotExistsAsync(vin + ".position", { From 0ce3df1042497d22f9614f136695d9ca1efaa947 Mon Sep 17 00:00:00 2001 From: Martijn Poppen Date: Wed, 4 Jan 2023 07:23:44 +0100 Subject: [PATCH 464/729] FIX: extra checks for err.message Sometimes the adapter crashes when err.message is undefine --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 3837d0f8..bd1a09f3 100644 --- a/main.js +++ b/main.js @@ -492,7 +492,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (this.type === "Wc") { - if (err && err.message === "Invalid protocol: wecharge:") { + if (err && err.message && err.message === "Invalid protocol: wecharge:") { this.log.debug("Found WeCharge connection"); this.getTokens(loginRequest, code_verifier, reject, resolve); } else { @@ -501,7 +501,7 @@ class VwWeconnect extends utils.Adapter { } return; } - if (err && err.message.indexOf("Invalid protocol:") !== -1) { + if (err && err.message && err.message.indexOf("Invalid protocol:") !== -1) { this.log.debug("Found Token"); this.getTokens(loginRequest, code_verifier, reject, resolve); return; From 54d477c352b1ba034a9beb5c45f122a14cb46056 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 6 Jan 2023 18:01:22 +0100 Subject: [PATCH 465/729] optimize location status --- main.js | 205 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 103 insertions(+), 102 deletions(-) diff --git a/main.js b/main.js index bd1a09f3..d9e8b873 100644 --- a/main.js +++ b/main.js @@ -3748,7 +3748,7 @@ class VwWeconnect extends utils.Adapter { return; } } - if (path === "position" || path === "parkingposition") { + if (path === "position") { this.setObjectNotExistsAsync(vin + "." + path + ".isMoving", { type: "state", common: { @@ -5094,110 +5094,27 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.lock", state.val, true); } } + if (id.endsWith(".carCoordinate.latitude")) { + this.setLatitude(vin, state.val / 1000000); + } + if (id.endsWith(".carCoordinate.longitude")) { + this.setLongitude(vin, state.val / 1000000); + } + if (id.endsWith(".position.latitude")) { + this.setLatitude(vin, parseFloat(state.val)); + } + if (id.endsWith(".position.longitude")) { + this.setLongitude(vin, parseFloat(state.val)); + } // Gather general values from ID. models - if (id.indexOf("accessStatus.doorLockStatus") !== -1) { + if (id.endsWith("accessStatus.doorLockStatus")) { this.setIsCarLocked(vin, state.val === "locked"); } - // check für changes of longitude instead of latitude, because latitude will be already updated when longitude updates but not vice versa - if (id.indexOf("carCoordinate.longitude") !== -1 || id.indexOf("parkingposition.lon") !== -1) { - let latitude; - let latitudeValue; - let longitudeValue; - if (id.indexOf("carCoordinate.longitude") !== -1) { - longitudeValue = state.val / 1000000; - latitude = await this.getStateAsync(id.replace("longitude", "latitude")); - latitudeValue = parseFloat(latitude.val) / 1000000; - } else { - // values of ID. models - longitudeValue = state.val; - latitude = await this.getStateAsync(id.replace("lon", "lat")); - latitudeValue = latitude.val; - } - - await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { - type: "state", - common: { - name: "latitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.latitudeConv", latitudeValue, true); - await this.setObjectNotExistsAsync(vin + ".position.longitudeConv", { - type: "state", - common: { - name: "longitude converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.longitudeConv", longitudeValue, true); - - await this.setObjectNotExistsAsync(vin + ".position.geohash", { - type: "state", - common: { - name: "geohash converted", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - await this.setObjectNotExistsAsync(vin + ".position.geohash", { - type: "state", - common: { - name: "Geohash", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); - if (state.ts === state.lc || this.isFirstLocation === true) { - if (!this.config.reversePos) { - this.log.debug("reverse pos deactivated"); - return; - } - this.reversePosition(latitudeValue, longitudeValue, vin); - } + if (id.endsWith(".parkingposition.lat")) { + this.setLatitude(vin, state.val); } - - if (this.config.reversePos && id.indexOf("position.longitude") !== -1) { - const latitude = await this.getStateAsync(id.replace("longitude", "latitude")); - const latitudeValue = parseFloat(latitude.val); - const longitudeValue = state.val; - - await this.setObjectNotExistsAsync(vin + ".position", { - type: "channel", - common: { - name: "Position", - }, - native: {}, - }); - await this.setObjectNotExistsAsync(vin + ".position.geohash", { - type: "state", - common: { - name: "Geohash", - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); - if (state.ts === state.lc || this.isFirstLocation === true) { - this.reversePosition(latitudeValue, longitudeValue, vin); - } + if (id.endsWith(".parkingposition.lon")) { + this.setLongitude(vin, state.val); } } } else { @@ -5209,9 +5126,93 @@ class VwWeconnect extends utils.Adapter { } } + async setPositionChanel() { + await this.setObjectNotExistsAsync(vin + ".position", { + type: "channel", + common: { + name: "Position", + }, + native: {}, + }); + } + + async setLatitude(vin, value) { + await this.setPositionChanel(); + await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { + type: "state", + common: { + name: "latitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.latitudeConv", value, true); + updateGeohash(vin, state); + } + + async setLongitude(vin, value) { + await this.setPositionChanel(); + await this.setObjectNotExistsAsync(vin + ".position.longitudeConv", { + type: "state", + common: { + name: "longitude converted", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.longitudeConv", value, true); + updateGeohash(vin, state); + } + + async updateGeohash(vin, state) { + if (state.ts !== state.lc && ! this.isFirstLocation === true) { + return; + } + this.isFirstLocation = false; + + latitude = await this.getStateAsync(vin + ".position.latitudeConv"); + if (latitude === undefined || latitude === null) { + return; + } + longitude = await this.getStateAsync(vin + ".position.longitudeConv"); + if (longitude === undefined || longitude === null) { + return; + } + // Update only if both longitude and latitude were updated in the last 3 seconds. + // Otherwise only one value of both were updated yet and coordinates are not yet valid. + const now = Date.now.getTime(); + if (now - latitude.ts > 3000 || now - longitude.ts > 3000) { + return; + } + const latitudeValue = latitude.val; + const longitudeValue = longitude.val; + await this.setObjectNotExistsAsync(vin + ".position.geohash", { + type: "state", + common: { + name: "Geohash", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); + if (!this.config.reversePos) { + this.log.debug("reverse pos deactivated"); + return; + } + this.reversePosition(latitudeValue, longitudeValue, vin); + } + async reversePosition(latitude, longitudeValue, vin) { this.log.debug("reverse pos started"); - this.isFirstLocation = false; request.get( { From 66683ecda9e350b9c9fdc2b9e81f0603886b1170 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 6 Jan 2023 18:04:38 +0100 Subject: [PATCH 466/729] bugfix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index d9e8b873..70da4d80 100644 --- a/main.js +++ b/main.js @@ -5126,7 +5126,7 @@ class VwWeconnect extends utils.Adapter { } } - async setPositionChanel() { + async setPositionChanel(vin) { await this.setObjectNotExistsAsync(vin + ".position", { type: "channel", common: { @@ -5137,7 +5137,7 @@ class VwWeconnect extends utils.Adapter { } async setLatitude(vin, value) { - await this.setPositionChanel(); + await this.setPositionChanel(vin); await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { type: "state", common: { From 7a159d5e78418a958414a68542e25301619f5116 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 6 Jan 2023 18:08:34 +0100 Subject: [PATCH 467/729] bugfix --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 70da4d80..d14d99f4 100644 --- a/main.js +++ b/main.js @@ -5150,7 +5150,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.latitudeConv", value, true); - updateGeohash(vin, state); + this.updateGeohash(vin, state); } async setLongitude(vin, value) { @@ -5167,7 +5167,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.longitudeConv", value, true); - updateGeohash(vin, state); + this.updateGeohash(vin, state); } async updateGeohash(vin, state) { @@ -5176,11 +5176,11 @@ class VwWeconnect extends utils.Adapter { } this.isFirstLocation = false; - latitude = await this.getStateAsync(vin + ".position.latitudeConv"); + const latitude = await this.getStateAsync(vin + ".position.latitudeConv"); if (latitude === undefined || latitude === null) { return; } - longitude = await this.getStateAsync(vin + ".position.longitudeConv"); + const longitude = await this.getStateAsync(vin + ".position.longitudeConv"); if (longitude === undefined || longitude === null) { return; } From 3382cf65ee4380b71b14ca5ca31003db7f792013 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 6 Jan 2023 18:26:21 +0100 Subject: [PATCH 468/729] bugfix --- main.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index d14d99f4..ecc9c5db 100644 --- a/main.js +++ b/main.js @@ -5150,7 +5150,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.latitudeConv", value, true); - this.updateGeohash(vin, state); + this.updateGeohash(vin); } async setLongitude(vin, value) { @@ -5167,15 +5167,10 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.setState(vin + ".position.longitudeConv", value, true); - this.updateGeohash(vin, state); + this.updateGeohash(vin); } - async updateGeohash(vin, state) { - if (state.ts !== state.lc && ! this.isFirstLocation === true) { - return; - } - this.isFirstLocation = false; - + async updateGeohash(vin) { const latitude = await this.getStateAsync(vin + ".position.latitudeConv"); if (latitude === undefined || latitude === null) { return; @@ -5184,6 +5179,12 @@ class VwWeconnect extends utils.Adapter { if (longitude === undefined || longitude === null) { return; } + // Update only if one of both have been changed + if (this.isFirstLocation !== true && latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { + return; + } + this.isFirstLocation = false; + // Update only if both longitude and latitude were updated in the last 3 seconds. // Otherwise only one value of both were updated yet and coordinates are not yet valid. const now = Date.now.getTime(); From 4c0226a8574a15f4c3bf9947fd263c916e333d09 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 6 Jan 2023 18:30:40 +0100 Subject: [PATCH 469/729] bufgifx --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index ecc9c5db..7e52e3ee 100644 --- a/main.js +++ b/main.js @@ -5187,7 +5187,7 @@ class VwWeconnect extends utils.Adapter { // Update only if both longitude and latitude were updated in the last 3 seconds. // Otherwise only one value of both were updated yet and coordinates are not yet valid. - const now = Date.now.getTime(); + const now = Date.now(); if (now - latitude.ts > 3000 || now - longitude.ts > 3000) { return; } From 1e2af8e82c20f326b44bc85f76dbab94339f39d4 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 6 Jan 2023 18:37:43 +0100 Subject: [PATCH 470/729] always get geolocation after restart --- main.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/main.js b/main.js index 7e52e3ee..11c6fb94 100644 --- a/main.js +++ b/main.js @@ -5179,18 +5179,21 @@ class VwWeconnect extends utils.Adapter { if (longitude === undefined || longitude === null) { return; } - // Update only if one of both have been changed - if (this.isFirstLocation !== true && latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { - return; + if (this.isFirstLocation === true) { + this.isFirstLocation = false; + } else { + // Update only if one of both have been changed + if (latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { + return; + } + // Update only if both longitude and latitude were updated in the last 3 seconds. + // Otherwise only one value of both were updated yet and coordinates are not yet valid. + const now = Date.now(); + if (now - latitude.ts > 3000 || now - longitude.ts > 3000) { + return; + } } - this.isFirstLocation = false; - // Update only if both longitude and latitude were updated in the last 3 seconds. - // Otherwise only one value of both were updated yet and coordinates are not yet valid. - const now = Date.now(); - if (now - latitude.ts > 3000 || now - longitude.ts > 3000) { - return; - } const latitudeValue = latitude.val; const longitudeValue = longitude.val; await this.setObjectNotExistsAsync(vin + ".position.geohash", { From 6cd4eb9a25cc6593ec63cc01314c74db2d878dfc Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 09:13:53 +0100 Subject: [PATCH 471/729] test --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 11c6fb94..625240a7 100644 --- a/main.js +++ b/main.js @@ -2393,6 +2393,7 @@ class VwWeconnect extends utils.Adapter { }, }) .then((res) => { + this.log.info("ParkingPosition resp = " + JSON.stringify(res)); this.log.debug(JSON.stringify(res.data)); this.extractKeys(this, vin + ".parkingposition", res.data.data); }) From b14dd794bed21eca83ca649f0eb55c4711a39bf7 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 09:21:01 +0100 Subject: [PATCH 472/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 625240a7..e3ab8400 100644 --- a/main.js +++ b/main.js @@ -2393,7 +2393,7 @@ class VwWeconnect extends utils.Adapter { }, }) .then((res) => { - this.log.info("ParkingPosition resp = " + JSON.stringify(res)); + this.log.info("ParkingPosition resp = " + JSON.stringify(res.response)); this.log.debug(JSON.stringify(res.data)); this.extractKeys(this, vin + ".parkingposition", res.data.data); }) From f416e52e0ee2b187e4e7b0e5c2c71c39c532a0f8 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 09:24:24 +0100 Subject: [PATCH 473/729] additional infos --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index e3ab8400..9cbbc55f 100644 --- a/main.js +++ b/main.js @@ -2393,7 +2393,7 @@ class VwWeconnect extends utils.Adapter { }, }) .then((res) => { - this.log.info("ParkingPosition resp = " + JSON.stringify(res.response)); + this.log.info("ParkingPosition status = " + res.status + " / " + res.statusText + " => " + JSON.stringify(res.data)); this.log.debug(JSON.stringify(res.data)); this.extractKeys(this, vin + ".parkingposition", res.data.data); }) From 6436f66b54c42dcad69a954832c57f47a7716ca5 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 15:27:54 +0100 Subject: [PATCH 474/729] carIsMoving for ID. models --- main.js | 57 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/main.js b/main.js index 9cbbc55f..78487122 100644 --- a/main.js +++ b/main.js @@ -2393,7 +2393,11 @@ class VwWeconnect extends utils.Adapter { }, }) .then((res) => { - this.log.info("ParkingPosition status = " + res.status + " / " + res.statusText + " => " + JSON.stringify(res.data)); + if (res.status == 200) { + setIsCarMoving(vin, false); + } else if (res.status == 204) { + setIsCarMoving(vin, true); + } this.log.debug(JSON.stringify(res.data)); this.extractKeys(this, vin + ".parkingposition", res.data.data); }) @@ -2427,7 +2431,8 @@ class VwWeconnect extends utils.Adapter { } } - this.extractKeys(this, vin + ".status", data); + //this.extractKeys(this, vin + ".status", data); + this.json2iob.parse(vin+".status", data, { forceIndex: true }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -3750,33 +3755,10 @@ class VwWeconnect extends utils.Adapter { } } if (path === "position") { - this.setObjectNotExistsAsync(vin + "." + path + ".isMoving", { - type: "state", - common: { - name: "is car moving", - role: "indicator", - type: "boolean", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.log.info("Parking position status = " + resp.statusCode); - if (resp.statusCode === 204) { - this.setState(vin + ".position.isMoving", true, true); - resolve(); - return; - } else { - this.setState(vin + ".position.isMoving", false, true); - } - if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { - body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; - } - }) - .catch((error) => { - this.log.error(error); - }); + if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { + body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; + } + this.setIsCarMoving(resp.statusCode === 204); } if (body === undefined || body === "" || body.error) { @@ -4027,6 +4009,23 @@ class VwWeconnect extends utils.Adapter { }); } + async setIsCarMoving(vin, isMoving) { + this.setObjectNotExistsAsync(vin + ".parking.isMoving", { + type: "state", + common: { + name: "is car moving", + role: "indicator", + type: "boolean", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState(vin + ".position.isMoving", isMoving, true); + }); + } + async setIsCarLocked(vin, value) { await this.setObjectNotExistsAsync(vin + ".status.isCarLocked", { type: "state", From cb633a40e6c0d5bf334f3ce4c505883f61b7ca5b Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 15:30:16 +0100 Subject: [PATCH 475/729] test for update hash --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 78487122..e80c7904 100644 --- a/main.js +++ b/main.js @@ -5184,12 +5184,14 @@ class VwWeconnect extends utils.Adapter { } else { // Update only if one of both have been changed if (latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { + this.log.info("No update lat ts " + latitude.ts + " <-> lc " + latitude.lc + ", long ts " + longitude.ts + " <-> lc " +longitude.lc); return; } // Update only if both longitude and latitude were updated in the last 3 seconds. // Otherwise only one value of both were updated yet and coordinates are not yet valid. const now = Date.now(); if (now - latitude.ts > 3000 || now - longitude.ts > 3000) { + this.log.info("No update now - lat = " + (now - latitude.ts) + ", now - long =" + (now - longitude.ts)); return; } } From f59565d2104d79383364133769a940d5c8f26d32 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 15:33:23 +0100 Subject: [PATCH 476/729] bugfix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index e80c7904..b2787f2c 100644 --- a/main.js +++ b/main.js @@ -2394,9 +2394,9 @@ class VwWeconnect extends utils.Adapter { }) .then((res) => { if (res.status == 200) { - setIsCarMoving(vin, false); + this.setIsCarMoving(vin, false); } else if (res.status == 204) { - setIsCarMoving(vin, true); + this.setIsCarMoving(vin, true); } this.log.debug(JSON.stringify(res.data)); this.extractKeys(this, vin + ".parkingposition", res.data.data); From a4e897f11bff2a3f72c0d2d3dc9a881b7f9f069d Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 15:40:02 +0100 Subject: [PATCH 477/729] end test --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index b2787f2c..1eea503a 100644 --- a/main.js +++ b/main.js @@ -2431,7 +2431,7 @@ class VwWeconnect extends utils.Adapter { } } - //this.extractKeys(this, vin + ".status", data); + this.extractKeys(this, vin + ".status", data); this.json2iob.parse(vin+".status", data, { forceIndex: true }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { From eb01bc3dfb621804598c93c778b1a9a54133fae9 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 15:44:47 +0100 Subject: [PATCH 478/729] bugifx --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 1eea503a..099831ab 100644 --- a/main.js +++ b/main.js @@ -3758,7 +3758,7 @@ class VwWeconnect extends utils.Adapter { if (body && body.storedPositionResponse && body.storedPositionResponse.parkingTimeUTC) { body.storedPositionResponse.position.parkingTimeUTC = body.storedPositionResponse.parkingTimeUTC; } - this.setIsCarMoving(resp.statusCode === 204); + this.setIsCarMoving(vin, resp.statusCode === 204); } if (body === undefined || body === "" || body.error) { @@ -4010,7 +4010,7 @@ class VwWeconnect extends utils.Adapter { } async setIsCarMoving(vin, isMoving) { - this.setObjectNotExistsAsync(vin + ".parking.isMoving", { + this.setObjectNotExistsAsync(vin + ".position.isMoving", { type: "state", common: { name: "is car moving", From 3c23251252296fc870f03710ca6058b209f35322 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sat, 7 Jan 2023 16:05:48 +0100 Subject: [PATCH 479/729] bugifx --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 099831ab..6a477765 100644 --- a/main.js +++ b/main.js @@ -5183,7 +5183,7 @@ class VwWeconnect extends utils.Adapter { this.isFirstLocation = false; } else { // Update only if one of both have been changed - if (latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { + if ((latitude.ts - latitude.lc > 500) && (longitude.ts - longitude.lc > 500)) { this.log.info("No update lat ts " + latitude.ts + " <-> lc " + latitude.lc + ", long ts " + longitude.ts + " <-> lc " +longitude.lc); return; } From 6a0cb7356a1d034652778c8ef32c7119cb02d180 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 8 Jan 2023 08:30:32 +0100 Subject: [PATCH 480/729] fix time check for location lookup --- main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 6a477765..cb32440f 100644 --- a/main.js +++ b/main.js @@ -5183,14 +5183,13 @@ class VwWeconnect extends utils.Adapter { this.isFirstLocation = false; } else { // Update only if one of both have been changed - if ((latitude.ts - latitude.lc > 500) && (longitude.ts - longitude.lc > 500)) { + if (latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { this.log.info("No update lat ts " + latitude.ts + " <-> lc " + latitude.lc + ", long ts " + longitude.ts + " <-> lc " +longitude.lc); return; } - // Update only if both longitude and latitude were updated in the last 3 seconds. + // Update only if both longitude and latitude were updated within the same 3 seconds. // Otherwise only one value of both were updated yet and coordinates are not yet valid. - const now = Date.now(); - if (now - latitude.ts > 3000 || now - longitude.ts > 3000) { + if (Math.abs(latitude.ts - longitude.ts) > 3000) { this.log.info("No update now - lat = " + (now - latitude.ts) + ", now - long =" + (now - longitude.ts)); return; } From a54f84fc7992408a3fe8dce5a767fc8fa7464182 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 9 Jan 2023 16:01:47 +0100 Subject: [PATCH 481/729] bugfix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index cb32440f..c45bcad7 100644 --- a/main.js +++ b/main.js @@ -5190,7 +5190,7 @@ class VwWeconnect extends utils.Adapter { // Update only if both longitude and latitude were updated within the same 3 seconds. // Otherwise only one value of both were updated yet and coordinates are not yet valid. if (Math.abs(latitude.ts - longitude.ts) > 3000) { - this.log.info("No update now - lat = " + (now - latitude.ts) + ", now - long =" + (now - longitude.ts)); + this.log.info("No update lat = " + latitude.ts + ", long =" + longitude.ts); return; } } From 61d7d583a82085c743b1026293cc2ff2fa2978f5 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 10 Jan 2023 18:35:01 +0100 Subject: [PATCH 482/729] wait for state update for faster update of geohash --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index c45bcad7..1ded2658 100644 --- a/main.js +++ b/main.js @@ -5149,7 +5149,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.latitudeConv", value, true); + await this.setState(vin + ".position.latitudeConv", value, true); this.updateGeohash(vin); } @@ -5166,7 +5166,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.longitudeConv", value, true); + await this.setState(vin + ".position.longitudeConv", value, true); this.updateGeohash(vin); } From 40f9f3e41970fbddf391a57bcd513d6c3fe5fb2b Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Jan 2023 09:50:57 +0100 Subject: [PATCH 483/729] check lc instead of ts for valid location --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 1ded2658..bc9acf13 100644 --- a/main.js +++ b/main.js @@ -5167,7 +5167,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); await this.setState(vin + ".position.longitudeConv", value, true); - this.updateGeohash(vin); + await this.updateGeohash(vin); } async updateGeohash(vin) { @@ -5189,8 +5189,8 @@ class VwWeconnect extends utils.Adapter { } // Update only if both longitude and latitude were updated within the same 3 seconds. // Otherwise only one value of both were updated yet and coordinates are not yet valid. - if (Math.abs(latitude.ts - longitude.ts) > 3000) { - this.log.info("No update lat = " + latitude.ts + ", long =" + longitude.ts); + if (Math.abs(latitude.lc - longitude.lc) > 3000) { + this.log.info("No update lat = " + latitude.lc + ", long =" + longitude.lc); return; } } @@ -5208,7 +5208,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); + await this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); return; @@ -5216,12 +5216,12 @@ class VwWeconnect extends utils.Adapter { this.reversePosition(latitudeValue, longitudeValue, vin); } - async reversePosition(latitude, longitudeValue, vin) { + async reversePosition(latitudeValue, longitudeValue, vin) { this.log.debug("reverse pos started"); request.get( { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + latitude + "&lon=" + longitudeValue + "&format=json", + url: "https://nominatim.openstreetmap.org/reverse?lat=" + latitudeValue + "&lon=" + longitudeValue + "&format=json", headers: { "User-Agent": "ioBroker/vw-connect", From 027341c4ecce8bd174ac363cf37fa274e3351ad2 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Wed, 11 Jan 2023 18:01:03 +0100 Subject: [PATCH 484/729] bugifx --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index bc9acf13..e7a0a395 100644 --- a/main.js +++ b/main.js @@ -5150,7 +5150,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); await this.setState(vin + ".position.latitudeConv", value, true); - this.updateGeohash(vin); + await this.updateGeohash(vin); } async setLongitude(vin, value) { From e502c8afe5501f906a6a03a8bf260c5384eed4e0 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 12 Jan 2023 08:53:34 +0100 Subject: [PATCH 485/729] log for address from info to debug --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index e7a0a395..7e8fafe2 100644 --- a/main.js +++ b/main.js @@ -5184,13 +5184,13 @@ class VwWeconnect extends utils.Adapter { } else { // Update only if one of both have been changed if (latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { - this.log.info("No update lat ts " + latitude.ts + " <-> lc " + latitude.lc + ", long ts " + longitude.ts + " <-> lc " +longitude.lc); + this.log.debug("No update lat ts " + latitude.ts + " <-> lc " + latitude.lc + ", long ts " + longitude.ts + " <-> lc " +longitude.lc); return; } // Update only if both longitude and latitude were updated within the same 3 seconds. // Otherwise only one value of both were updated yet and coordinates are not yet valid. if (Math.abs(latitude.lc - longitude.lc) > 3000) { - this.log.info("No update lat = " + latitude.lc + ", long =" + longitude.lc); + this.log.debug("No update lat = " + latitude.lc + ", long =" + longitude.lc); return; } } From c097fdfb49327a6313ca5bf0b619089d85eec369 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 12 Jan 2023 10:35:52 +0100 Subject: [PATCH 486/729] fix sync of position writing --- .eslintignore | 2 + .eslintrc.json | 82 ++++---- .prettierignore | 2 + .prettierrc.js | 9 + main.js | 446 +++++++++++++++++++++++++++++--------------- tsconfig.check.json | 7 + tsconfig.json | 63 +++---- 7 files changed, 385 insertions(+), 226 deletions(-) create mode 100644 .eslintignore create mode 100644 .prettierignore create mode 100644 .prettierrc.js create mode 100644 tsconfig.check.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..478d05aa --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +.prettierrc.js +**/.eslintrc.js \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 7711eddc..a596ba33 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,42 +1,42 @@ { - "plugins": ["promise"], - "env": { - "es6": true, - "node": true, - "mocha": true - }, - "extends": "eslint:recommended", - "rules": { - "promise/no-return-wrap": "error", - "promise/param-names": "error", - "promise/catch-or-return": "error", - "promise/no-native": "off", - "promise/no-new-statics": "error", - "no-async-promise-executor": "off", - "indent": [ - "error", - 2, - { - "SwitchCase": 1 - } - ], - "no-console": "off", - "no-var": "error", - "prefer-const": "error", - "quotes": [ - "error", - "double", - { - "avoidEscape": true, - "allowTemplateLiterals": true - } - ], - "semi": [ - "error", - "always" - ] - }, - "parserOptions": { - "ecmaVersion": 2020 - } -} \ No newline at end of file + "root": true, + "env": { + "es6": true, + "node": true, + "mocha": true + }, + "extends": ["eslint:recommended"], + "plugins": [], + "rules": { + "indent": [ + "error", + 2, + { + "SwitchCase": 1 + } + ], + "no-console": "off", + "no-unused-vars": [ + "error", + { + "ignoreRestSiblings": true, + "argsIgnorePattern": "^_" + } + ], + "no-var": "error", + "no-trailing-spaces": "error", + "prefer-const": "error", + "quotes": [ + "error", + "double", + { + "avoidEscape": true, + "allowTemplateLiterals": true + } + ], + "semi": ["error", "always"] + }, + "parserOptions": { + "ecmaVersion": 2020 + } +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..515bcd4f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +package.json +package-lock.json \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 00000000..a2c24871 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,9 @@ +module.exports = { + semi: true, + trailingComma: "all", + singleQuote: false, + printWidth: 120, + useTabs: false, + tabWidth: 2, + endOfLine: "lf", +}; diff --git a/main.js b/main.js index 7e8fafe2..cdfe8717 100644 --- a/main.js +++ b/main.js @@ -349,7 +349,7 @@ class VwWeconnect extends utils.Adapter { state.element2, state.element3, state.element4, - tripType + tripType, ).catch(() => { this.log.debug("error while getting " + state.url); }); @@ -362,7 +362,7 @@ class VwWeconnect extends utils.Adapter { state.element, state.element2, state.element3, - state.element4 + state.element4, ).catch(() => { this.log.debug("error while getting " + state.url); }); @@ -469,7 +469,10 @@ class VwWeconnect extends utils.Adapter { this.log.warn("Failed to get login url"); }); if (!url) { - url = "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; + url = + "https://login.apps.emea.vwapps.io/authorize?nonce=" + + this.randomString(16) + + "&redirect_uri=weconnect://authenticated"; } } const loginRequest = request( @@ -478,7 +481,8 @@ class VwWeconnect extends utils.Adapter { url: url, headers: { "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, @@ -511,7 +515,10 @@ class VwWeconnect extends utils.Adapter { resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); err && err.message && this.log.error(err.message); - loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); + loginRequest && + loginRequest.uri && + loginRequest.uri.query && + this.log.debug(loginRequest.uri.query.toString()); reject(); return; @@ -539,7 +546,8 @@ class VwWeconnect extends utils.Adapter { headers: { "Content-Type": "application/x-www-form-urlencoded", "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, @@ -611,10 +619,13 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); this.log.debug(JSON.stringify(resp.headers)); - if (resp.headers.location.split("&").length <= 2 || resp.headers.location.indexOf("/terms-and-conditions?") !== -1) { + if ( + resp.headers.location.split("&").length <= 2 || + resp.headers.location.indexOf("/terms-and-conditions?") !== -1 + ) { this.log.warn(resp.headers.location); this.log.warn( - "No valid userid, please check username and password or visit this link or logout and login in your app account:" + "No valid userid, please check username and password or visit this link or logout and login in your app account:", ); this.log.warn("https://" + resp.request.host + resp.headers.location); this.log.warn("Try to auto accept new consent"); @@ -658,7 +669,10 @@ class VwWeconnect extends utils.Adapter { gzip: true, }, (err, resp, body) => { - if ((err && err.message.indexOf("Invalid protocol:") !== -1) || (resp && resp.statusCode >= 400)) { + if ( + (err && err.message.indexOf("Invalid protocol:") !== -1) || + (resp && resp.statusCode >= 400) + ) { this.log.warn("Failed to auto accept"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -670,9 +684,9 @@ class VwWeconnect extends utils.Adapter { setTimeout(() => { this.restart(); }, 10 * 1000); - } + }, ); - } + }, ); reject(); @@ -682,7 +696,9 @@ class VwWeconnect extends utils.Adapter { if (!this.stringIsAValidUrl(resp.headers.location)) { if (resp.headers.location.indexOf("&error=") !== -1) { const location = resp.headers.location; - this.log.error("Error: " + location.substring(location.indexOf("error="), location.length - 1)); + this.log.error( + "Error: " + location.substring(location.indexOf("error="), location.length - 1), + ); } else { this.log.error("No valid login url, please download the log and visit:"); this.log.error("http://" + resp.request.host + resp.headers.location); @@ -737,7 +753,7 @@ class VwWeconnect extends utils.Adapter { this.getTokens(getRequest, code_verifier, reject, resolve); } else { this.log.error( - "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings" + "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings", ); try { this.log.debug(JSON.stringify(body)); @@ -746,31 +762,33 @@ class VwWeconnect extends utils.Adapter { reject(); } } - } + }, ); } - } + }, ); } catch (err2) { - this.log.error("Login was not successful, please check your login credentials and selected type"); + this.log.error( + "Login was not successful, please check your login credentials and selected type", + ); err && this.log.error(err); this.log.error(err2); this.log.error(err2.stack); reject(); } - } + }, ); } catch (err) { this.log.error(err); reject(); } - } + }, ); } catch (err) { this.log.error(err); reject(); } - } + }, ); }); } @@ -826,7 +844,16 @@ class VwWeconnect extends utils.Adapter { this.statesArray.forEach((state) => { if (state.path == "tripdata") { this.tripTypes.forEach((tripType) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { + this.getVehicleStatus( + vin, + state.url, + state.path, + state.element, + state.element2, + null, + null, + tripType, + ).catch(() => { this.log.debug("error while getting " + state.url); }); }); @@ -844,7 +871,10 @@ class VwWeconnect extends utils.Adapter { request( { method: "GET", - url: "https://login.apps.emea.vwapps.io/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", + url: + "https://login.apps.emea.vwapps.io/authorize?nonce=" + + this.randomString(16) + + "&redirect_uri=weconnect://authenticated", headers: { Host: "login.apps.emea.vwapps.io", "user-agent": this.userAgent, @@ -865,7 +895,7 @@ class VwWeconnect extends utils.Adapter { return; } resolve(resp.request.href); - } + }, ); }); } @@ -1004,9 +1034,9 @@ class VwWeconnect extends utils.Adapter { }, 0.9 * 60 * 60 * 1000); // 0.9hours resolve(); - } + }, ); - } + }, ); } getTokens(getRequest, code_verifier, reject, resolve) { @@ -1145,7 +1175,9 @@ class VwWeconnect extends utils.Adapter { }; if (this.type === "Wc") { method = "GET"; - url = "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + jwtauth_code; + url = + "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + + jwtauth_code; redirerctUri = "wecharge://authenticated"; headers["x-api-key"] = "yabajourasW9N8sm+9F/oP=="; } @@ -1204,7 +1236,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } @@ -1349,7 +1381,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } @@ -1497,7 +1529,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); this.restart(); } - } + }, ); }); } @@ -1549,7 +1581,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); return; } @@ -1590,7 +1622,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -1637,7 +1669,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -1696,7 +1728,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -1709,7 +1741,9 @@ class VwWeconnect extends utils.Adapter { } let method = "get"; let body = {}; - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); + let url = this.replaceVarInUrl( + "https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles", + ); let headers = { "User-Agent": this.userAgent, "X-App-Version": this.xappversion, @@ -1806,7 +1840,9 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); body && this.log.error(JSON.stringify(body)); @@ -2374,7 +2410,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Not able to find vehicle, did you choose the correct type in the settings?"); reject(); } - } + }, ); }); } @@ -2431,8 +2467,8 @@ class VwWeconnect extends utils.Adapter { } } - this.extractKeys(this, vin + ".status", data); - this.json2iob.parse(vin+".status", data, { forceIndex: true }); + // this.extractKeys(this, vin + ".status", data); + this.json2iob.parse(vin + ".status", data, { forceIndex: true }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -2460,7 +2496,12 @@ class VwWeconnect extends utils.Adapter { return new Promise((resolve, reject) => { request.get( { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + this.seatcupraUser + "/vehicles/" + vin + "/mycar", + url: + "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + + this.seatcupraUser + + "/vehicles/" + + vin + + "/mycar", headers: { accept: "*/*", @@ -2509,7 +2550,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); request.get( @@ -2539,7 +2580,7 @@ class VwWeconnect extends utils.Adapter { } catch (err) { this.log.error(err); } - } + }, ); request.get( { @@ -2568,7 +2609,7 @@ class VwWeconnect extends utils.Adapter { } catch (err) { this.log.error(err); } - } + }, ); }); } @@ -2597,7 +2638,7 @@ class VwWeconnect extends utils.Adapter { } this.log.info(JSON.stringify(body)); resolve(); - } + }, ); }); } @@ -2606,11 +2647,15 @@ class VwWeconnect extends utils.Adapter { const statusArray = [ { path: "driverlog", - url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/driverlogs?page=0&limit=100&returnPollData=true", + url: + "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + + vin + + "/driverlogs?page=0&limit=100&returnPollData=true", }, { path: "lastParkingPosition", - url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", + url: + "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", }, { path: "status", @@ -2671,7 +2716,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); }); @@ -2688,7 +2733,8 @@ class VwWeconnect extends utils.Adapter { ]; for (const status of statusArray) { - const url = "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; + const url = + "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; const headers = { "api-key": "ok", accept: "application/json", @@ -2820,7 +2866,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -2863,20 +2909,23 @@ class VwWeconnect extends utils.Adapter { ]; endpoints.forEach((element) => { const elementArray = element.split("/"); - this.genericRequest("https://api.elli.eco/" + element, header, path + "." + elementArray[elementArray.length - 1], [404, 409]).catch( - (hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); + this.genericRequest( + "https://api.elli.eco/" + element, + header, + path + "." + elementArray[elementArray.length - 1], + [404, 409], + ).catch((hideError, err) => { + if (hideError) { + return; } - ); + this.log.error(err); + }); }); this.genericRequest( "https://api.elli.eco/customer/v1/charging/records?limit=" + this.config.historyLimit + "&offset=0", header, path + ".records", - [404] + [404], ).catch((hideError, err) => { if (hideError) { return; @@ -2887,20 +2936,27 @@ class VwWeconnect extends utils.Adapter { this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, path + ".stations", [404], "stations") .then((body) => { body.forEach((station) => { - this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, path + ".stations." + station.name, [404]).catch( - (hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; - } - this.log.error("Failed to get sessions"); + this.genericRequest( + "https://api.elli.eco/chargeathome/v1/stations/" + station.id, + header, + path + ".stations." + station.name, + [404], + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; } - ); + this.log.error("Failed to get sessions"); + }); this.genericRequest( - "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", + "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + + station.id + + "&limit=" + + this.config.historyLimit + + "&offset=0", header, path + ".stations." + station.name + ".chargingrecords", - [404] + [404], ).catch((hideError) => { if (hideError) { this.log.debug("Failed to get sessions"); @@ -2916,7 +2972,7 @@ class VwWeconnect extends utils.Adapter { "&offset=0", header, path + ".stations." + station.name + ".chargingrecords.total-charged", - [404] + [404], ).catch((hideError) => { if (hideError) { this.log.debug("Failed to get total-charged"); @@ -2968,7 +3024,7 @@ class VwWeconnect extends utils.Adapter { header, "wecharge.chargeandpay.subscriptions", [404], - "result" + "result", ) .then((body) => { body.forEach((subs) => { @@ -2976,7 +3032,7 @@ class VwWeconnect extends utils.Adapter { "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wecharge.chargeandpay.tariffs." + subs.tariff_id, - [404] + [404], ).catch((hideError) => { if (hideError) { this.log.debug("Failed to get tariff"); @@ -2998,7 +3054,7 @@ class VwWeconnect extends utils.Adapter { header, "wecharge.chargeandpay.records", [404, 500], - "result" + "result", ) .then((body) => { this.setObjectNotExistsAsync("wecharge.chargeandpay.recordsJson", { @@ -3033,16 +3089,19 @@ class VwWeconnect extends utils.Adapter { "wecharge.homecharging.stations", [404], "result", - "stations" + "stations", ) .then((body) => { body.forEach((station) => { this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=" + limit, + "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + + station.id + + "&limit=" + + limit, header, "wecharge.homecharging.stations." + station.name + ".sessions", [404], - "charging_sessions" + "charging_sessions", ) .then((body) => { this.setObjectNotExistsAsync("wecharge.homecharging.stations." + station.name + ".sessionsJson", { @@ -3057,13 +3116,21 @@ class VwWeconnect extends utils.Adapter { native: {}, }) .then(() => { - this.setState("wecharge.homecharging.stations." + station.name + ".sessionsJson", JSON.stringify(body), true); + this.setState( + "wecharge.homecharging.stations." + station.name + ".sessionsJson", + JSON.stringify(body), + true, + ); }) .catch((error) => { this.log.error(error); }); - this.extractKeys(this, "wecharge.homecharging.stations." + station.name + ".sessions.latestItem", body[0]); + this.extractKeys( + this, + "wecharge.homecharging.stations." + station.name + ".sessions.latestItem", + body[0], + ); }) .catch((hideError) => { if (hideError) { @@ -3090,7 +3157,7 @@ class VwWeconnect extends utils.Adapter { header, "wecharge.homecharging.records", [404], - "charging_records" + "charging_records", ) .then((body) => { this.setObjectNotExistsAsync("wecharge.homecharging.recordsJson", { @@ -3200,7 +3267,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3274,7 +3341,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3328,7 +3395,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3388,7 +3455,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3437,7 +3504,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3447,8 +3514,12 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - let accept = "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; - let url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", vin); + let accept = + "application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + let url = this.replaceVarInUrl( + "$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin/", + vin, + ); if ( this.config.type !== "vw" && this.config.type !== "vwv2" && @@ -3457,7 +3528,10 @@ class VwWeconnect extends utils.Adapter { this.config.type !== "seat" && this.config.type !== "skoda" ) { - url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", vin); + url = this.replaceVarInUrl( + "https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/$type/$country/vehicle/$vin/carportdata", + vin, + ); accept = "application/json"; } const atoken = this.config.vwatoken; @@ -3481,7 +3555,9 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3514,7 +3590,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3540,7 +3616,8 @@ class VwWeconnect extends utils.Adapter { "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", + Accept: + "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", }, followAllRedirects: true, gzip: true, @@ -3549,7 +3626,9 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3602,7 +3681,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3624,7 +3703,8 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "vwv2") { method = "GET"; url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); - accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + accept = + " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; } this.log.debug("Request update " + url); request( @@ -3647,7 +3727,9 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error(vin); if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3664,7 +3746,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } catch (err) { this.log.error(err); @@ -3735,7 +3817,9 @@ class VwWeconnect extends utils.Adapter { return; } else { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3814,7 +3898,8 @@ class VwWeconnect extends utils.Adapter { result.tripData.sort((a, b) => { return new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(); }); - if (this.config.numberOfTrips > 0) result.tripData = result.tripData.slice(0, this.config.numberOfTrips); + if (this.config.numberOfTrips > 0) + result.tripData = result.tripData.slice(0, this.config.numberOfTrips); this.setObjectNotExistsAsync(vin + ".tripdata" + tripType + ".rawJson", { type: "state", common: { @@ -4004,13 +4089,13 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); reject(); } - } + }, ); }); } async setIsCarMoving(vin, isMoving) { - this.setObjectNotExistsAsync(vin + ".position.isMoving", { + await this.setObjectNotExistsAsync(vin + ".position.isMoving", { type: "state", common: { name: "is car moving", @@ -4020,12 +4105,10 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }) - .then(() => { - this.setState(vin + ".position.isMoving", isMoving, true); - }); + }); + await this.setStateAsync(vin + ".position.isMoving", isMoving, true); } - + async setIsCarLocked(vin, value) { await this.setObjectNotExistsAsync(vin + ".status.isCarLocked", { type: "state", @@ -4186,7 +4269,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); reject(); } - } + }, ); }); } @@ -4241,7 +4324,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); reject(); } - } + }, ); }); } @@ -4298,7 +4381,8 @@ class VwWeconnect extends utils.Adapter { securityToken: secToken, }, }; - let url = "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed"; + let url = + "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed"; if (this.homeRegionSetter[vin]) { url = url.replace("https://mal-1a.prd.ece.vwg-connect.com", this.homeRegionSetter[vin]); } @@ -4340,7 +4424,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } else { this.log.error("No Security information found"); @@ -4351,7 +4435,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -4452,7 +4536,7 @@ class VwWeconnect extends utils.Adapter { matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); } else { this.log.warn( - "The adapter needs in the future NodeJS v12. https://forum.iobroker.net/topic/22867/how-to-node-js-f%C3%BCr-iobroker-richtig-updaten" + "The adapter needs in the future NodeJS v12. https://forum.iobroker.net/topic/22867/how-to-node-js-f%C3%BCr-iobroker-richtig-updaten", ); matches = this.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g, body); } @@ -4553,7 +4637,7 @@ class VwWeconnect extends utils.Adapter { return; } body && this.log.info(JSON.stringify(body)); - } + }, ); } if (id.indexOf("stopCharging") !== -1) { @@ -4593,7 +4677,7 @@ class VwWeconnect extends utils.Adapter { return; } body && this.log.info(JSON.stringify(body)); - } + }, ); } if (id.indexOf("Settings.") != -1) { @@ -4665,7 +4749,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -4690,7 +4774,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set min limit state"); }); @@ -4705,7 +4789,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -4743,7 +4827,11 @@ class VwWeconnect extends utils.Adapter { if (action === "targetTemperatureInCelsius") { if (this.config.type === "skodae") { const pre = this.name + "." + this.instance; - this.setState(pre + "." + vin + ".status.air-conditioning.settings.targetTemperatureInKelvin", state.val + 273.15, false); + this.setState( + pre + "." + vin + ".status.air-conditioning.settings.targetTemperatureInKelvin", + state.val + 273.15, + false, + ); } } if (action === "climatisation" || action === "climatisationv2" || action === "climatisationv3") { @@ -4761,7 +4849,8 @@ class VwWeconnect extends utils.Adapter { }); return; } else { - body = '\n\n startClimatisation\n'; + body = + '\n\n startClimatisation\n'; if (action === "climatisationv2") { const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); let heaterSource = "electric"; @@ -4774,7 +4863,8 @@ class VwWeconnect extends utils.Adapter { " \n"; } if (state.val === false) { - body = '\n\n stopClimatisation\n'; + body = + '\n\n stopClimatisation\n'; } contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; if (action === "climatisationv3") { @@ -4784,7 +4874,7 @@ class VwWeconnect extends utils.Adapter { heaterSource = heaterSourceState.val; } const isMirrorHeatingEnabledState = await this.getStateAsync( - vin + ".climater.settings.climaterElementSettings.isMirrorHeatingEnabled.content" + vin + ".climater.settings.climaterElementSettings.isMirrorHeatingEnabled.content", ); let isMirror = true; if (isMirrorHeatingEnabledState.val) { @@ -4852,7 +4942,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -4881,7 +4971,10 @@ class VwWeconnect extends utils.Adapter { } contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml"; if (action === "ventilationv2") { - body = '{"performAction":{"quickstart":{"startMode":"ventilation","active":true,"climatisationDuration":' + duration + "}}}"; + body = + '{"performAction":{"quickstart":{"startMode":"ventilation","active":true,"climatisationDuration":' + + duration + + "}}}"; if (state.val === false) { body = '{"performAction":{"quickstop":{"active":false}}}'; } @@ -4897,7 +4990,13 @@ class VwWeconnect extends utils.Adapter { } contentType = "application/json; charset=utf-8"; } - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", + body, + contentType, + secToken, + ).catch(() => { this.log.error("failed set state"); }); } @@ -4908,7 +5007,9 @@ class VwWeconnect extends utils.Adapter { temp = (parseFloat(state.val) + 273) * 10; } - const climatisationWithoutHVpowerState = await this.getStateAsync(vin + ".climater.settings.climatisationWithoutHVpower.content"); + const climatisationWithoutHVpowerState = await this.getStateAsync( + vin + ".climater.settings.climatisationWithoutHVpower.content", + ); let climatisationWithoutHVpower = false; if (climatisationWithoutHVpowerState.val) { @@ -4932,23 +5033,25 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); } if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; + body = + '\n\n startWindowHeating\n'; if (state.val === false) { - body = '\n\n stopWindowHeating\n'; + body = + '\n\n stopWindowHeating\n'; } contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; this.setVehicleStatus( vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -4973,7 +5076,12 @@ class VwWeconnect extends utils.Adapter { longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", + body, + contentType, + ).catch(() => { this.log.error("failed set state"); }); } @@ -4998,7 +5106,12 @@ class VwWeconnect extends utils.Adapter { longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", + body, + contentType, + ).catch(() => { this.log.error("failed set state"); }); } @@ -5012,7 +5125,8 @@ class VwWeconnect extends utils.Adapter { } contentType = "application/vnd.vwg.mbb.RemoteStandheizung_v2_0_0+xml"; if (action === "standheizungv2") { - body = '{"performAction":{"quickstart":{"startMode":"heating","active":true,"climatisationDuration":30}}}'; + body = + '{"performAction":{"quickstart":{"startMode":"heating","active":true,"climatisationDuration":30}}}'; if (state.val === false) { body = '{"performAction":{"quickstop":{"active":false}}}'; } @@ -5020,7 +5134,13 @@ class VwWeconnect extends utils.Adapter { } const secToken = await this.requestSecToken(vin, "rheating_v1/operations/P_QSACT"); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", body, contentType, secToken).catch(() => { + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/rs/v1/$type/$country/vehicles/$vin/action", + body, + contentType, + secToken, + ).catch(() => { this.log.error("failed set state"); }); } @@ -5035,11 +5155,15 @@ class VwWeconnect extends utils.Adapter { } contentType = "application/vnd.vwg.mbb.RemoteLockUnlock_v1_0_0+xml"; const secToken = await this.requestSecToken(vin, "rlu_v1/operations/" + lockAction); - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", body, contentType, secToken).catch( - () => { - this.log.error("failed set state"); - } - ); + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/rlu/v1/$type/$country/vehicles/$vin/actions", + body, + contentType, + secToken, + ).catch(() => { + this.log.error("failed set state"); + }); } } @@ -5095,16 +5219,16 @@ class VwWeconnect extends utils.Adapter { } } if (id.endsWith(".carCoordinate.latitude")) { - this.setLatitude(vin, state.val / 1000000); + await this.setLatitude(vin, state.val / 1000000); } if (id.endsWith(".carCoordinate.longitude")) { - this.setLongitude(vin, state.val / 1000000); + await this.setLongitude(vin, state.val / 1000000); } if (id.endsWith(".position.latitude")) { - this.setLatitude(vin, parseFloat(state.val)); + await this.setLatitude(vin, parseFloat(state.val)); } if (id.endsWith(".position.longitude")) { - this.setLongitude(vin, parseFloat(state.val)); + await this.setLongitude(vin, parseFloat(state.val)); } // Gather general values from ID. models if (id.endsWith("accessStatus.doorLockStatus")) { @@ -5149,7 +5273,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - await this.setState(vin + ".position.latitudeConv", value, true); + await this.setStateAsync(vin + ".position.latitudeConv", value, true); await this.updateGeohash(vin); } @@ -5166,17 +5290,18 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - await this.setState(vin + ".position.longitudeConv", value, true); + await this.setStateAsync(vin + ".position.longitudeConv", value, true); await this.updateGeohash(vin); } async updateGeohash(vin) { + await this.sleep(5000); //wait for all states const latitude = await this.getStateAsync(vin + ".position.latitudeConv"); - if (latitude === undefined || latitude === null) { + if (latitude == null) { return; } const longitude = await this.getStateAsync(vin + ".position.longitudeConv"); - if (longitude === undefined || longitude === null) { + if (longitude == null) { return; } if (this.isFirstLocation === true) { @@ -5184,7 +5309,16 @@ class VwWeconnect extends utils.Adapter { } else { // Update only if one of both have been changed if (latitude.ts !== latitude.lc && longitude.ts !== longitude.lc) { - this.log.debug("No update lat ts " + latitude.ts + " <-> lc " + latitude.lc + ", long ts " + longitude.ts + " <-> lc " +longitude.lc); + this.log.debug( + "No update lat ts " + + latitude.ts + + " <-> lc " + + latitude.lc + + ", long ts " + + longitude.ts + + " <-> lc " + + longitude.lc, + ); return; } // Update only if both longitude and latitude were updated within the same 3 seconds. @@ -5208,20 +5342,27 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - await this.setState(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); + await this.setStateAsync(vin + ".position.geohash", geohash.encode(latitudeValue, longitudeValue), true); if (!this.config.reversePos) { this.log.debug("reverse pos deactivated"); return; } - this.reversePosition(latitudeValue, longitudeValue, vin); + await this.reversePosition(latitudeValue, longitudeValue, vin); + } + sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); } - async reversePosition(latitudeValue, longitudeValue, vin) { this.log.debug("reverse pos started"); request.get( { - url: "https://nominatim.openstreetmap.org/reverse?lat=" + latitudeValue + "&lon=" + longitudeValue + "&format=json", + url: + "https://nominatim.openstreetmap.org/reverse?lat=" + + latitudeValue + + "&lon=" + + longitudeValue + + "&format=json", headers: { "User-Agent": "ioBroker/vw-connect", @@ -5242,7 +5383,16 @@ class VwWeconnect extends utils.Adapter { try { const number = body.address.house_number || ""; const city = body.address.city || body.address.town || body.address.village; - const fullAdress = body.address.road + " " + number + ", " + body.address.postcode + " " + city + ", " + body.address.country; + const fullAdress = + body.address.road + + " " + + number + + ", " + + body.address.postcode + + " " + + city + + ", " + + body.address.country; await this.setObjectNotExistsAsync(vin + ".position.address.displayName", { type: "state", common: { @@ -5254,7 +5404,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setState(vin + ".position.address.displayName", fullAdress, true); + await this.setStateAsync(vin + ".position.address.displayName", fullAdress, true); Object.keys(body.address).forEach((key) => { this.setObjectNotExistsAsync(vin + ".position.address." + key, { type: "state", @@ -5280,7 +5430,7 @@ class VwWeconnect extends utils.Adapter { } else { this.log.error(JSON.stringify(body)); } - } + }, ); } } diff --git a/tsconfig.check.json b/tsconfig.check.json new file mode 100644 index 00000000..273f42f4 --- /dev/null +++ b/tsconfig.check.json @@ -0,0 +1,7 @@ +// Specialized tsconfig for type-checking js files +{ + "extends": "./tsconfig.json", + "compilerOptions": {}, + "include": ["**/*.js", "**/*.d.ts"], + "exclude": ["**/build", "node_modules/", "widgets/"] +} diff --git a/tsconfig.json b/tsconfig.json index ea169f58..a23d7e7a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,41 +1,30 @@ +// Root tsconfig to set the settings and power editor support for all TS files { - "compileOnSave": true, - "compilerOptions": { - // do not compile anything, this file is just to configure type checking - "noEmit": true, + // To update the compilation target, install a different version of @tsconfig/node... and reference it here + // https://github.com/tsconfig/bases#node-14-tsconfigjson + "extends": "@tsconfig/node14/tsconfig.json", + "compilerOptions": { + // do not compile anything, this file is just to configure type checking + "noEmit": true, - // check JS files - "allowJs": true, - "checkJs": true, + // check JS files + "allowJs": true, + "checkJs": true, - "module": "commonjs", - "moduleResolution": "node", - // this is necessary for the automatic typing of the adapter config - "resolveJsonModule": true, + // This is necessary for the automatic typing of the adapter config + "resolveJsonModule": true, - // Set this to false if you want to disable the very strict rules (not recommended) - "strict": true, - // Or enable some of those features for more fine-grained control - "strictNullChecks": false, - "noImplicitThis":false, - - // "strictPropertyInitialization": true, - "strictBindCallApply": false, - "noImplicitAny": false, - "strictFunctionTypes":false, - // "noUnusedLocals": true, - // "noUnusedParameters": true, - - // Consider targetting es2017 or higher if you require the new NodeJS 8+ features - "target": "es2015", - - }, - "include": [ - "**/*.js", - "**/*.d.ts" - ], - "exclude": [ - "node_modules/**", - "admin/**" - ] -} \ No newline at end of file + // If you want to disable the stricter type checks (not recommended), uncomment the following line + // "strict": false, + // And enable some of those features for more fine-grained control + // "strictNullChecks": true, + // "strictPropertyInitialization": true, + // "strictBindCallApply": true, + "noImplicitAny": false, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + "useUnknownInCatchVariables": false + }, + "include": ["**/*.js", "**/*.d.ts"], + "exclude": ["node_modules/**", "widgets/**"] +} From bf25a393ceef94e16eb8d87b46193729e7f55776 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 08:57:45 +0100 Subject: [PATCH 487/729] cleanupValues not in json reply --- main.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index cdfe8717..f8edc914 100644 --- a/main.js +++ b/main.js @@ -5347,12 +5347,13 @@ class VwWeconnect extends utils.Adapter { this.log.debug("reverse pos deactivated"); return; } - await this.reversePosition(latitudeValue, longitudeValue, vin); + await this.reversePosition(latitudeValue, longitudeValue, vin, latitude.ts); } sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } - async reversePosition(latitudeValue, longitudeValue, vin) { + + async reversePosition(latitudeValue, longitudeValue, vin, ts) { this.log.debug("reverse pos started"); request.get( @@ -5424,6 +5425,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); }); }); + this.cleanupOtherStatesInChannel(vin, ".position.address", ts); } catch (err) { this.log.error(err); } @@ -5435,6 +5437,26 @@ class VwWeconnect extends utils.Adapter { } } +/** + * Read all states of channel and empty all state with older timestamp than ts. + * If only some of the state of a channel get updated (e.g. because not all values are contained + * in some json reply), this make it possible than all other state are emptied. + * @param {*} vin + * @param {*} channel + * @param {*} ts + */ +function cleanupOtherStatesInChannel(vin, channel, ts) { + const states = await getStatesAsync(von + channel + ".*"); + this.log.info("States: " + von + channel + ".*, ts = " + ts); + for (const state in states) { + this.log.info("state " + state.id + " ts = " + state.ts); + if (state.ts < ts) { + this.log.info("delete this state"); + setState(state.id, null, true); + } + } +} + // @ts-ignore parent is a valid property on module if (module.parent) { // Export the constructor in compact mode From ef29f77b78464b6ce80d8b076e132b2ccfaaef8e Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:06:05 +0100 Subject: [PATCH 488/729] bugifx --- main.js | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/main.js b/main.js index f8edc914..0b4fab09 100644 --- a/main.js +++ b/main.js @@ -5435,26 +5435,27 @@ class VwWeconnect extends utils.Adapter { }, ); } -} -/** - * Read all states of channel and empty all state with older timestamp than ts. - * If only some of the state of a channel get updated (e.g. because not all values are contained - * in some json reply), this make it possible than all other state are emptied. - * @param {*} vin - * @param {*} channel - * @param {*} ts - */ -function cleanupOtherStatesInChannel(vin, channel, ts) { - const states = await getStatesAsync(von + channel + ".*"); - this.log.info("States: " + von + channel + ".*, ts = " + ts); - for (const state in states) { - this.log.info("state " + state.id + " ts = " + state.ts); - if (state.ts < ts) { - this.log.info("delete this state"); - setState(state.id, null, true); + /** + * Read all states of channel and empty all state with older timestamp than ts. + * If only some of the state of a channel get updated (e.g. because not all values are contained + * in some json reply), this make it possible than all other state are emptied. + * @param {*} vin + * @param {*} channel + * @param {*} ts + */ + async cleanupOtherStatesInChannel(vin, channel, ts) { + const states = await getStatesAsync(von + channel + ".*"); + this.log.info("States: " + von + channel + ".*, ts = " + ts); + for (const state in states) { + this.log.info("state " + state.id + " ts = " + state.ts); + if (state.ts < ts) { + this.log.info("delete this state"); + setState(state.id, null, true); + } } } + } // @ts-ignore parent is a valid property on module From 298f58a43b6e2a4cacbecf55b500dfb1ff105dd0 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:08:47 +0100 Subject: [PATCH 489/729] bugfix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 0b4fab09..c562eabe 100644 --- a/main.js +++ b/main.js @@ -5445,7 +5445,7 @@ class VwWeconnect extends utils.Adapter { * @param {*} ts */ async cleanupOtherStatesInChannel(vin, channel, ts) { - const states = await getStatesAsync(von + channel + ".*"); + const states = await this.getStatesAsync(von + channel + ".*"); this.log.info("States: " + von + channel + ".*, ts = " + ts); for (const state in states) { this.log.info("state " + state.id + " ts = " + state.ts); From a8b4a5170d1932e8aa50547cf5d7d48045b4ece3 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:11:32 +0100 Subject: [PATCH 490/729] bugfix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index c562eabe..caa0c20e 100644 --- a/main.js +++ b/main.js @@ -5445,8 +5445,8 @@ class VwWeconnect extends utils.Adapter { * @param {*} ts */ async cleanupOtherStatesInChannel(vin, channel, ts) { - const states = await this.getStatesAsync(von + channel + ".*"); - this.log.info("States: " + von + channel + ".*, ts = " + ts); + const states = await this.getStatesAsync(vin + channel + ".*"); + this.log.info("States: " + vin + channel + ".*, ts = " + ts); for (const state in states) { this.log.info("state " + state.id + " ts = " + state.ts); if (state.ts < ts) { From 6643adc573e6080dad15d2b774907c8a122abab1 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:15:18 +0100 Subject: [PATCH 491/729] test --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index caa0c20e..ba479e03 100644 --- a/main.js +++ b/main.js @@ -5448,7 +5448,7 @@ class VwWeconnect extends utils.Adapter { const states = await this.getStatesAsync(vin + channel + ".*"); this.log.info("States: " + vin + channel + ".*, ts = " + ts); for (const state in states) { - this.log.info("state " + state.id + " ts = " + state.ts); + this.log.info("state " + JSON.stringify(state)); if (state.ts < ts) { this.log.info("delete this state"); setState(state.id, null, true); From 2839af0fa9fbdae150a2751950a3a4a1e6686ffb Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:17:47 +0100 Subject: [PATCH 492/729] extend reading states --- main.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index ba479e03..d478c1b5 100644 --- a/main.js +++ b/main.js @@ -5447,11 +5447,12 @@ class VwWeconnect extends utils.Adapter { async cleanupOtherStatesInChannel(vin, channel, ts) { const states = await this.getStatesAsync(vin + channel + ".*"); this.log.info("States: " + vin + channel + ".*, ts = " + ts); - for (const state in states) { - this.log.info("state " + JSON.stringify(state)); - if (state.ts < ts) { + for (const stateName in states) { + const state = await this.getStateAsync(stateName); + this.log.info("state " + JSON.stringify(stateName)); + if (stateName.ts < ts) { this.log.info("delete this state"); - setState(state.id, null, true); + setState(stateName.id, null, true); } } } From 7038b289e8ae0732a5309d1da1091add4f78a4b2 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:25:29 +0100 Subject: [PATCH 493/729] optimize reading all states --- main.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index d478c1b5..3778b23a 100644 --- a/main.js +++ b/main.js @@ -5447,14 +5447,14 @@ class VwWeconnect extends utils.Adapter { async cleanupOtherStatesInChannel(vin, channel, ts) { const states = await this.getStatesAsync(vin + channel + ".*"); this.log.info("States: " + vin + channel + ".*, ts = " + ts); - for (const stateName in states) { - const state = await this.getStateAsync(stateName); - this.log.info("state " + JSON.stringify(stateName)); - if (stateName.ts < ts) { - this.log.info("delete this state"); - setState(stateName.id, null, true); + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + this.log.info("state " + JSON.stringify(state[Name])); + if (state[keyName].ts < ts) { + this.log.info("delete this state " + state[keyName].id); + setState(state[keyName].id, null, true); } - } + }); } } From a8cf27e5118f050ab4bef5a6516878884160b97c Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:27:28 +0100 Subject: [PATCH 494/729] bugfix --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 3778b23a..069c781e 100644 --- a/main.js +++ b/main.js @@ -5449,10 +5449,10 @@ class VwWeconnect extends utils.Adapter { this.log.info("States: " + vin + channel + ".*, ts = " + ts); const allIds = Object.keys(states); allIds.forEach((keyName) => { - this.log.info("state " + JSON.stringify(state[Name])); - if (state[keyName].ts < ts) { - this.log.info("delete this state " + state[keyName].id); - setState(state[keyName].id, null, true); + this.log.info("state " + JSON.stringify(states[Name])); + if (states[keyName].ts < ts) { + this.log.info("delete this state " + states[keyName].id); + setState(states[keyName].id, null, true); } }); } From d9c05ff04bf00d92f5489c810e6bfe4863617bdd Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:30:47 +0100 Subject: [PATCH 495/729] bugifx --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 069c781e..62540015 100644 --- a/main.js +++ b/main.js @@ -5449,7 +5449,7 @@ class VwWeconnect extends utils.Adapter { this.log.info("States: " + vin + channel + ".*, ts = " + ts); const allIds = Object.keys(states); allIds.forEach((keyName) => { - this.log.info("state " + JSON.stringify(states[Name])); + this.log.info("state " + JSON.stringify(states[keyName])); if (states[keyName].ts < ts) { this.log.info("delete this state " + states[keyName].id); setState(states[keyName].id, null, true); From 9bfa34e133752db908c7c92a5820f6f7150ed148 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:32:21 +0100 Subject: [PATCH 496/729] bugfix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 62540015..ad3958f0 100644 --- a/main.js +++ b/main.js @@ -5452,7 +5452,7 @@ class VwWeconnect extends utils.Adapter { this.log.info("state " + JSON.stringify(states[keyName])); if (states[keyName].ts < ts) { this.log.info("delete this state " + states[keyName].id); - setState(states[keyName].id, null, true); + this.setState(states[keyName].id, null, true); } }); } From 6b011bf53763a35b0668ff261be73209e876a703 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 09:33:25 +0100 Subject: [PATCH 497/729] fix --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index ad3958f0..66ec98cd 100644 --- a/main.js +++ b/main.js @@ -5452,7 +5452,7 @@ class VwWeconnect extends utils.Adapter { this.log.info("state " + JSON.stringify(states[keyName])); if (states[keyName].ts < ts) { this.log.info("delete this state " + states[keyName].id); - this.setState(states[keyName].id, null, true); + this.setState(keyName, null, true); } }); } From 9d5efe86cc9bdfe489bd80b11b4e28171122fc5b Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 15:04:50 +0100 Subject: [PATCH 498/729] other time check --- main.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/main.js b/main.js index 66ec98cd..a91b057b 100644 --- a/main.js +++ b/main.js @@ -5347,13 +5347,13 @@ class VwWeconnect extends utils.Adapter { this.log.debug("reverse pos deactivated"); return; } - await this.reversePosition(latitudeValue, longitudeValue, vin, latitude.ts); + await this.reversePosition(latitudeValue, longitudeValue, vin); } sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } - async reversePosition(latitudeValue, longitudeValue, vin, ts) { + async reversePosition(latitudeValue, longitudeValue, vin) { this.log.debug("reverse pos started"); request.get( @@ -5382,6 +5382,7 @@ class VwWeconnect extends utils.Adapter { } if (body.display_name) { try { + const timestamp = Date().now; const number = body.address.house_number || ""; const city = body.address.city || body.address.town || body.address.village; const fullAdress = @@ -5407,7 +5408,7 @@ class VwWeconnect extends utils.Adapter { }); await this.setStateAsync(vin + ".position.address.displayName", fullAdress, true); Object.keys(body.address).forEach((key) => { - this.setObjectNotExistsAsync(vin + ".position.address." + key, { + await this.setObjectNotExistsAsync(vin + ".position.address." + key, { type: "state", common: { name: key, @@ -5418,14 +5419,12 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }) - .then(() => { - this.setState(vin + ".position.address." + key, body.address[key], true); - }) .catch((error) => { this.log.error(error); }); + await this.setStateAsync(vin + ".position.address." + key, body.address[key], true); }); - this.cleanupOtherStatesInChannel(vin, ".position.address", ts); + this.cleanupOtherStatesInChannel(vin, ".position.address", timestamp); } catch (err) { this.log.error(err); } @@ -5446,12 +5445,11 @@ class VwWeconnect extends utils.Adapter { */ async cleanupOtherStatesInChannel(vin, channel, ts) { const states = await this.getStatesAsync(vin + channel + ".*"); - this.log.info("States: " + vin + channel + ".*, ts = " + ts); + this.log.info("States: " + vin + channel + ".*, ts = " + ts + " now: " + Date.now()); const allIds = Object.keys(states); allIds.forEach((keyName) => { - this.log.info("state " + JSON.stringify(states[keyName])); + this.log.info("state " + keyName + ": " + JSON.stringify(states[keyName])); if (states[keyName].ts < ts) { - this.log.info("delete this state " + states[keyName].id); this.setState(keyName, null, true); } }); From d596fcf2ed0cd3d3d95c96503aa7978898014685 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 15:07:25 +0100 Subject: [PATCH 499/729] bugfix --- main.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main.js b/main.js index a91b057b..5d6f9235 100644 --- a/main.js +++ b/main.js @@ -5418,10 +5418,7 @@ class VwWeconnect extends utils.Adapter { read: true, }, native: {}, - }) - .catch((error) => { - this.log.error(error); - }); + }); await this.setStateAsync(vin + ".position.address." + key, body.address[key], true); }); this.cleanupOtherStatesInChannel(vin, ".position.address", timestamp); From 33edc07563dff58a89166758d7305e3e8178c9ab Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 17:36:50 +0100 Subject: [PATCH 500/729] add sync to inline function --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 5d6f9235..010d9d11 100644 --- a/main.js +++ b/main.js @@ -5407,7 +5407,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); await this.setStateAsync(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach((key) => { + Object.keys(body.address).forEach(async (key) => { await this.setObjectNotExistsAsync(vin + ".position.address." + key, { type: "state", common: { From 575e9ab7f0c4281163560ad9730903fa451664f7 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Sun, 15 Jan 2023 17:43:41 +0100 Subject: [PATCH 501/729] drop log infos --- main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.js b/main.js index 010d9d11..92f065ff 100644 --- a/main.js +++ b/main.js @@ -5442,10 +5442,8 @@ class VwWeconnect extends utils.Adapter { */ async cleanupOtherStatesInChannel(vin, channel, ts) { const states = await this.getStatesAsync(vin + channel + ".*"); - this.log.info("States: " + vin + channel + ".*, ts = " + ts + " now: " + Date.now()); const allIds = Object.keys(states); allIds.forEach((keyName) => { - this.log.info("state " + keyName + ": " + JSON.stringify(states[keyName])); if (states[keyName].ts < ts) { this.setState(keyName, null, true); } From 7a69b35b828dfeec52dd4bdddd41bbd73852266d Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 16 Jan 2023 10:48:46 +0100 Subject: [PATCH 502/729] insert test messages --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 92f065ff..43094f95 100644 --- a/main.js +++ b/main.js @@ -5443,7 +5443,9 @@ class VwWeconnect extends utils.Adapter { async cleanupOtherStatesInChannel(vin, channel, ts) { const states = await this.getStatesAsync(vin + channel + ".*"); const allIds = Object.keys(states); + this.log.info("Check channel für timestamp " + ts); allIds.forEach((keyName) => { + this.log.info("key = " + keyName + " ts = " + states[keyName].ts + " value = " + states[keyName].val); if (states[keyName].ts < ts) { this.setState(keyName, null, true); } From d4f35a17262de978a548514a0c4d03b4621ad187 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 16 Jan 2023 10:52:28 +0100 Subject: [PATCH 503/729] skip blank in address if house number missing --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 43094f95..87c63aa0 100644 --- a/main.js +++ b/main.js @@ -5387,7 +5387,7 @@ class VwWeconnect extends utils.Adapter { const city = body.address.city || body.address.town || body.address.village; const fullAdress = body.address.road + - " " + + (number == "" ? "" : " ") + number + ", " + body.address.postcode + From a530f0ca9cc59f9ded6616b6040e8fe9732cdef6 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 16 Jan 2023 10:53:51 +0100 Subject: [PATCH 504/729] bugfix --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 87c63aa0..68e511e2 100644 --- a/main.js +++ b/main.js @@ -5382,12 +5382,12 @@ class VwWeconnect extends utils.Adapter { } if (body.display_name) { try { - const timestamp = Date().now; + const timestamp = Date.now(); const number = body.address.house_number || ""; const city = body.address.city || body.address.town || body.address.village; const fullAdress = body.address.road + - (number == "" ? "" : " ") + + (number == "" ? "" : " ") + // skip blank if house number missing number + ", " + body.address.postcode + From 93747432dcf21276d54a1daee9c116f4e8f87df4 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 16 Jan 2023 11:13:46 +0100 Subject: [PATCH 505/729] replace forEach by for to use await --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 68e511e2..a19ff853 100644 --- a/main.js +++ b/main.js @@ -5407,7 +5407,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); await this.setStateAsync(vin + ".position.address.displayName", fullAdress, true); - Object.keys(body.address).forEach(async (key) => { + for (const key in Object.keys(body.address)) { await this.setObjectNotExistsAsync(vin + ".position.address." + key, { type: "state", common: { @@ -5420,7 +5420,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); await this.setStateAsync(vin + ".position.address." + key, body.address[key], true); - }); + } this.cleanupOtherStatesInChannel(vin, ".position.address", timestamp); } catch (err) { this.log.error(err); From b246cb952e8553e4b2e377da5c4d0e0d079b1b7c Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Mon, 16 Jan 2023 11:21:26 +0100 Subject: [PATCH 506/729] bugfix --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index a19ff853..a661a000 100644 --- a/main.js +++ b/main.js @@ -5407,7 +5407,9 @@ class VwWeconnect extends utils.Adapter { native: {}, }); await this.setStateAsync(vin + ".position.address.displayName", fullAdress, true); - for (const key in Object.keys(body.address)) { + const keys = Object.keys(body.address); + for (const keyIndex in keys) { + const key = keys[keyIndex]; await this.setObjectNotExistsAsync(vin + ".position.address." + key, { type: "state", common: { From e6b79b080be8c1aa01b54719ba07543af7b9fabc Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 20 Jan 2023 22:46:19 +0100 Subject: [PATCH 507/729] extend cleanup to arrays of id. reply --- lib/json2iob.js | 22 ++++++++++++++++++++++ main.js | 22 +--------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/lib/json2iob.js b/lib/json2iob.js index 6f63e24b..dd0773e5 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -139,6 +139,7 @@ module.exports = class Json2iob { if (key) { element = element[key]; } + const aktTimestamp = Date.now(); for (let index in element) { const arrayElement = element[index]; index = parseInt(index) + 1; @@ -260,11 +261,13 @@ module.exports = class Json2iob { } await this.parse(path + "." + arrayPath, arrayElement, options); } + this.cleanupOtherStatesInChannel(path, aktTimestamp); } catch (error) { this.adapter.log.error("Cannot extract array " + path); this.adapter.log.error(error); } } + isJsonString(str) { try { JSON.parse(str); @@ -291,4 +294,23 @@ module.exports = class Json2iob { } return "state"; } + + /** + * Read all states of channel and empty all state with older timestamp than ts. + * If only some of the state of a channel get updated (e.g. because not all values are contained + * in some json reply), this make it possible than all other state are emptied. + * @param {*} vin + * @param {*} channel + * @param {*} ts + */ + async cleanupOtherStatesInChannel(channel, ts) { + const states = await this.adapter.getStatesAsync(channel + ".*"); + const allIds = Object.keys(states); + allIds.forEach((keyName) => { + if (states[keyName].ts < ts) { + this.adapter.setState(keyName, null, true); + } + }); + } + }; diff --git a/main.js b/main.js index a661a000..5f5a2d57 100644 --- a/main.js +++ b/main.js @@ -5423,7 +5423,7 @@ class VwWeconnect extends utils.Adapter { }); await this.setStateAsync(vin + ".position.address." + key, body.address[key], true); } - this.cleanupOtherStatesInChannel(vin, ".position.address", timestamp); + this.json2iob.cleanupOtherStatesInChannel(vin + ".position.address", timestamp); } catch (err) { this.log.error(err); } @@ -5434,26 +5434,6 @@ class VwWeconnect extends utils.Adapter { ); } - /** - * Read all states of channel and empty all state with older timestamp than ts. - * If only some of the state of a channel get updated (e.g. because not all values are contained - * in some json reply), this make it possible than all other state are emptied. - * @param {*} vin - * @param {*} channel - * @param {*} ts - */ - async cleanupOtherStatesInChannel(vin, channel, ts) { - const states = await this.getStatesAsync(vin + channel + ".*"); - const allIds = Object.keys(states); - this.log.info("Check channel für timestamp " + ts); - allIds.forEach((keyName) => { - this.log.info("key = " + keyName + " ts = " + states[keyName].ts + " value = " + states[keyName].val); - if (states[keyName].ts < ts) { - this.setState(keyName, null, true); - } - }); - } - } // @ts-ignore parent is a valid property on module From 44e4f5716cead7a1b745b73e4c45850408b6fc64 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 20 Jan 2023 22:55:28 +0100 Subject: [PATCH 508/729] test --- lib/json2iob.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/json2iob.js b/lib/json2iob.js index dd0773e5..13c75aea 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -256,11 +256,13 @@ module.exports = class Json2iob { this.alreadyCreatedObjects[path + "." + subKey] = true; }); } + this.adapter.log.info("set " + path + "/" + subKey + " - value: " + subValue); await this.adapter.setStateAsync(path + "." + subKey, subValue, true); continue; } await this.parse(path + "." + arrayPath, arrayElement, options); } + this.adapter.log.info("Cleanup " + path + " - timestamp: " + aktTimestamp); this.cleanupOtherStatesInChannel(path, aktTimestamp); } catch (error) { this.adapter.log.error("Cannot extract array " + path); From 11d85f47c6dd4fa60ef5d8b51ddeff237840f155 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 20 Jan 2023 22:59:58 +0100 Subject: [PATCH 509/729] x --- lib/json2iob.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/json2iob.js b/lib/json2iob.js index 13c75aea..a1f7d912 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -256,14 +256,11 @@ module.exports = class Json2iob { this.alreadyCreatedObjects[path + "." + subKey] = true; }); } - this.adapter.log.info("set " + path + "/" + subKey + " - value: " + subValue); await this.adapter.setStateAsync(path + "." + subKey, subValue, true); continue; } await this.parse(path + "." + arrayPath, arrayElement, options); } - this.adapter.log.info("Cleanup " + path + " - timestamp: " + aktTimestamp); - this.cleanupOtherStatesInChannel(path, aktTimestamp); } catch (error) { this.adapter.log.error("Cannot extract array " + path); this.adapter.log.error(error); From c510ba3612a801217cad74c178f3ea3c64592340 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Fri, 20 Jan 2023 23:00:47 +0100 Subject: [PATCH 510/729] x --- lib/json2iob.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/json2iob.js b/lib/json2iob.js index a1f7d912..a543f75a 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -139,7 +139,6 @@ module.exports = class Json2iob { if (key) { element = element[key]; } - const aktTimestamp = Date.now(); for (let index in element) { const arrayElement = element[index]; index = parseInt(index) + 1; From 5fab4089310163dd87a0da3ec33c9f8131891dae Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 25 Jan 2023 10:20:50 +0100 Subject: [PATCH 511/729] add default homeregion --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index cdfe8717..bb5a7716 100644 --- a/main.js +++ b/main.js @@ -900,7 +900,7 @@ class VwWeconnect extends utils.Adapter { }); } replaceVarInUrl(url, vin, tripType) { - const curHomeRegion = this.homeRegion[vin]; + const curHomeRegion = this.homeRegion[vin] || "https://msg.volkswagen.de"; return url .replace("/$vin", "/" + vin + "") .replace("$homeregion/", curHomeRegion + "/") From 0cba270be8a98b14a5ab13e5c98c51bfee65c601 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 11 Feb 2023 17:43:30 +0100 Subject: [PATCH 512/729] ignore 412 --- main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 7158a25b..406a20b0 100644 --- a/main.js +++ b/main.js @@ -2786,6 +2786,10 @@ class VwWeconnect extends utils.Adapter { this.log.debug("304 No values updated"); return; } + if (error.response.status === 412) { + this.log.debug(JSON.stringify(error.response.data)); + return; + } this.log.error(JSON.stringify(error.response.data)); } this.log.error(error); @@ -5387,7 +5391,7 @@ class VwWeconnect extends utils.Adapter { const city = body.address.city || body.address.town || body.address.village; const fullAdress = body.address.road + - (number == "" ? "" : " ") + // skip blank if house number missing + (number == "" ? "" : " ") + // skip blank if house number missing number + ", " + body.address.postcode + @@ -5433,7 +5437,6 @@ class VwWeconnect extends utils.Adapter { }, ); } - } // @ts-ignore parent is a valid property on module From 3c6ad4c1141cb79d84b7400db600ee98db07ee44 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 11 Feb 2023 17:45:27 +0100 Subject: [PATCH 513/729] add 500 error as info --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index 406a20b0..d8a4e439 100644 --- a/main.js +++ b/main.js @@ -2790,6 +2790,10 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(error.response.data)); return; } + if (error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } this.log.error(JSON.stringify(error.response.data)); } this.log.error(error); From b3547fa43b4e778194ae229699bb7ad222407dea Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 16 Feb 2023 13:22:26 +0100 Subject: [PATCH 514/729] add odommeter warning --- main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index d8a4e439..c08250d4 100644 --- a/main.js +++ b/main.js @@ -2466,7 +2466,12 @@ class VwWeconnect extends utils.Adapter { } } } - + if (data.odometerStatus.error) { + this.log.warn("Odometer Error: " + data.odometerStatus.error); + this.log.info( + "Please activate die Standortdaten freigeben und die automatische Terminvereinbarung in der VW App to receive odometer data", + ); + } // this.extractKeys(this, vin + ".status", data); this.json2iob.parse(vin + ".status", data, { forceIndex: true }); if (this.config.rawJson) { From d4af4041f9b7d3101d38006f99c8c79c9b9c8e8a Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 16 Feb 2023 14:23:12 +0100 Subject: [PATCH 515/729] add 15min limit for we charging --- main.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.js b/main.js index c08250d4..14fa2532 100644 --- a/main.js +++ b/main.js @@ -627,6 +627,9 @@ class VwWeconnect extends utils.Adapter { this.log.warn( "No valid userid, please check username and password or visit this link or logout and login in your app account:", ); + this.log.warn( + "Bitte logge dich in die App erneut ein und akzeptiere eventuelle Nutzungsbedingungen.", + ); this.log.warn("https://" + resp.request.host + resp.headers.location); this.log.warn("Try to auto accept new consent"); @@ -1268,6 +1271,7 @@ class VwWeconnect extends utils.Adapter { return; } this.log.info("Start Wallcharging login"); + //this.config.type === "wc" this.type = "Wc"; this.country = "DE"; @@ -1282,6 +1286,7 @@ class VwWeconnect extends utils.Adapter { this.login() .then(() => { this.log.info("Wallcharging login was successfull"); + this.log.info("Minimum update interval is 15min for Wallcharging data, to prevent blocking"); }) .catch(() => { this.log.warn("Failled wall charger login"); @@ -3007,6 +3012,12 @@ class VwWeconnect extends utils.Adapter { } getWcData(limit) { + //check if latest fetching is minimum 15 minutes ago + if (this.lastWcFetch && this.lastWcFetch + 15 * 60 * 1000 > Date.now()) { + this.log.debug("We Charge data already fetched in last 15 minutes"); + return; + } + this.lastWcFetch = Date.now(); if (limit == -1) { this.log.debug("We Charge disabled in config"); return; From b82037c298ebae8ac5761b5afaccdd9ac09391bc Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 16 Feb 2023 21:29:27 +0100 Subject: [PATCH 516/729] 0.0.60 set minimum wc interval --- README.md | 4 ++++ io-package.json | 20 ++++++++++++++++++-- main.js | 19 +++++++++++++++++-- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 42 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c518103e..a023658c 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,10 @@ Door and window states: ## Changelog +### 0.0.60 + +- Minor improvements. WeCharge Minimum interval is now 15 minutes + ### 0.0.55 - fix id status update diff --git a/io-package.json b/io-package.json index f8b53915..18906427 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.0.56", + "version": "0.0.60", "news": { + "0.0.60": { + "en": "Minor improvements. WeCharge Minimum interval is now 15 minutes", + "de": "Kleine Verbesserungen. WeCharge Mindestintervall beträgt jetzt 15 Minuten" + }, "0.0.56": { "en": "Fix invalid state warning" }, @@ -78,7 +82,19 @@ "zh-cn": "大众我们连接的适配器" }, "authors": ["ta2k ", "Sneak-L8 "], - "keywords": ["VW", "Connect", "Audi", "myAudi", "Skoda", "Skoda Connect", "VW Connect", "VW Connect ID", "ID.3", "VW Connect Go", "Seat"], + "keywords": [ + "VW", + "Connect", + "Audi", + "myAudi", + "Skoda", + "Skoda Connect", + "VW Connect", + "VW Connect ID", + "ID.3", + "VW Connect Go", + "Seat" + ], "license": "MIT", "platform": "Javascript/Node.js", "main": "main.js", diff --git a/main.js b/main.js index 14fa2532..ca827d03 100644 --- a/main.js +++ b/main.js @@ -2496,6 +2496,10 @@ class VwWeconnect extends utils.Adapter { resolve(); }) .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } this.log.error(error); error.response && this.log.error(JSON.stringify(error.response.data)); reject(); @@ -3017,6 +3021,10 @@ class VwWeconnect extends utils.Adapter { this.log.debug("We Charge data already fetched in last 15 minutes"); return; } + if (!this.config.wc_access_token) { + this.log.debug("We Charge access token not set"); + return; + } this.lastWcFetch = Date.now(); if (limit == -1) { this.log.debug("We Charge disabled in config"); @@ -3066,12 +3074,16 @@ class VwWeconnect extends utils.Adapter { }); }); }) - .catch((hideError) => { + .catch((hideError, err) => { if (hideError) { this.log.debug("Failed to get subscription"); return; } + this.log.error("Failed to get subscription"); + if (err && (err.statusCode === 401 || err.statusCode === 403)) { + this.config.wc_access_token = null; + } }); this.genericRequest( "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", @@ -3100,12 +3112,15 @@ class VwWeconnect extends utils.Adapter { }); this.extractKeys(this, "wecharge.chargeandpay.records.latestItem", body[0]); }) - .catch((hideError) => { + .catch((hideError, err) => { if (hideError) { this.log.debug("Failed to get chargeandpay records"); return; } this.log.error("Failed to get chargeandpay records"); + if (err && (err.statusCode === 401 || err.statusCode === 403)) { + this.config.wc_access_token = null; + } }); this.genericRequest( "https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, diff --git a/package-lock.json b/package-lock.json index 9405155a..9d2fe26b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.56", + "version": "0.0.60", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.56", + "version": "0.0.60", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.7", diff --git a/package.json b/package.json index 66d9c3f7..64a1b9ba 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.56" + "version": "0.0.60" } From 51b46d498b9b1027556c67246266d06c7551b298 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 17 Feb 2023 19:48:20 +0100 Subject: [PATCH 517/729] fix for loop --- lib/json2iob.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/json2iob.js b/lib/json2iob.js index a543f75a..4ff1b37e 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -295,20 +295,19 @@ module.exports = class Json2iob { /** * Read all states of channel and empty all state with older timestamp than ts. - * If only some of the state of a channel get updated (e.g. because not all values are contained + * If only some of the state of a channel get updated (e.g. because not all values are contained * in some json reply), this make it possible than all other state are emptied. - * @param {*} vin - * @param {*} channel - * @param {*} ts + * @param {*} vin + * @param {*} channel + * @param {*} ts */ async cleanupOtherStatesInChannel(channel, ts) { const states = await this.adapter.getStatesAsync(channel + ".*"); const allIds = Object.keys(states); - allIds.forEach((keyName) => { - if (states[keyName].ts < ts) { - this.adapter.setState(keyName, null, true); + for (const keyName of allIds) { + if (states[keyName] && states[keyName].ts < ts) { + await this.adapter.setStateAsync(keyName, null, true); } - }); + } } - }; From 4eb70a773948afc5e477dcd9fba2f7eef5444ddc Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 17 Feb 2023 19:51:06 +0100 Subject: [PATCH 518/729] add check --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index ca827d03..70097ffe 100644 --- a/main.js +++ b/main.js @@ -4570,6 +4570,7 @@ class VwWeconnect extends utils.Adapter { } extractHidden(body) { const returnObject = {}; + if (!body) return returnObject; let matches; if (body.matchAll) { matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); From 84c735872bb57a1cfa5adadde3d2e207be18ec11 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 23 Feb 2023 11:18:51 +0100 Subject: [PATCH 519/729] clear fields not send by id --- lib/json2iob.js | 201 ++++++++++++++++++++++++------------------------ main.js | 77 +++++-------------- 2 files changed, 121 insertions(+), 157 deletions(-) diff --git a/lib/json2iob.js b/lib/json2iob.js index 4ff1b37e..a595fd65 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -139,10 +139,12 @@ module.exports = class Json2iob { if (key) { element = element[key]; } + let lastTimestamp = Date.now(); + let pureStringArray = true; for (let index in element) { const arrayElement = element[index]; - index = parseInt(index) + 1; - if (index < 10) { + let indexNr = parseInt(index) + 1; + if (indexNr < 10) { index = "0" + index; } let arrayPath = key + index; @@ -150,116 +152,117 @@ module.exports = class Json2iob { await this.parse(path + "." + key + "." + arrayElement, arrayElement, options); continue; } - if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { - arrayPath = arrayElement[Object.keys(arrayElement)[0]]; - } - for (const keyName of Object.keys(arrayElement)) { - if (keyName.endsWith("Id") && arrayElement[keyName] !== null) { - if (arrayElement[keyName] && arrayElement[keyName].replace) { - arrayPath = arrayElement[keyName].replace(/\./g, ""); - } else { - arrayPath = arrayElement[keyName]; - } + pureStringArray = false; + if (! options.forceIndex) { + if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { + arrayPath = arrayElement[Object.keys(arrayElement)[0]]; } - } - for (const keyName in Object.keys(arrayElement)) { - if (keyName.endsWith("Name")) { - if (arrayElement[keyName] && arrayElement[keyName].replace) { - arrayPath = arrayElement[keyName].replace(/\./g, ""); - } else { - arrayPath = arrayElement[keyName]; + for (const keyName of Object.keys(arrayElement)) { + if (keyName.endsWith("Id") && arrayElement[keyName] !== null) { + if (arrayElement[keyName] && arrayElement[keyName].replace) { + arrayPath = arrayElement[keyName].replace(/\./g, ""); + } else { + arrayPath = arrayElement[keyName]; + } } } - } - - if (arrayElement.id) { - if (arrayElement.id.replace) { - arrayPath = arrayElement.id.replace(/\./g, ""); - } else { - arrayPath = arrayElement.id; - } - } - if (arrayElement.name) { - arrayPath = arrayElement.name.replace(/\./g, ""); - } - if (arrayElement.label) { - arrayPath = arrayElement.label.replace(/\./g, ""); - } - if (arrayElement.labelText) { - arrayPath = arrayElement.labelText.replace(/\./g, ""); - } - if (arrayElement.start_date_time) { - arrayPath = arrayElement.start_date_time.replace(/\./g, ""); - } - if (options.preferedArrayName && options.preferedArrayName.indexOf("+") !== -1) { - const preferedArrayNameArray = options.preferedArrayName.split("+"); - if (arrayElement[preferedArrayNameArray[0]]) { - const element0 = arrayElement[preferedArrayNameArray[0]].replace(/\./g, "").replace(/ /g, ""); - let element1 = ""; - if (preferedArrayNameArray[1].indexOf("/") !== -1) { - const subArray = preferedArrayNameArray[1].split("/"); - const subElement = arrayElement[subArray[0]]; - if (subElement && subElement[subArray[1]] !== undefined) { - element1 = subElement[subArray[1]]; - } else if (arrayElement[subArray[1]] !== undefined) { - element1 = arrayElement[subArray[1]]; + for (const keyName in Object.keys(arrayElement)) { + if (keyName.endsWith("Name")) { + if (arrayElement[keyName] && arrayElement[keyName].replace) { + arrayPath = arrayElement[keyName].replace(/\./g, ""); + } else { + arrayPath = arrayElement[keyName]; } + } + } + + if (arrayElement.id) { + if (arrayElement.id.replace) { + arrayPath = arrayElement.id.replace(/\./g, ""); } else { - element1 = arrayElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); + arrayPath = arrayElement.id; } - arrayPath = element0 + "-" + element1; } - } else if (options.preferedArrayName && options.preferedArrayName.indexOf("/") !== -1) { - const preferedArrayNameArray = options.preferedArrayName.split("/"); - const subElement = arrayElement[preferedArrayNameArray[0]]; - if (subElement) { - arrayPath = subElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); + if (arrayElement.name) { + arrayPath = arrayElement.name.replace(/\./g, ""); } - } else if (options.preferedArrayName && arrayElement[options.preferedArrayName]) { - arrayPath = arrayElement[options.preferedArrayName].toString().replace(/\./g, ""); - } - - if (options.forceIndex) { - arrayPath = key + index; - } - //special case array with 2 string objects - if ( - !options.forceIndex && - Object.keys(arrayElement).length === 2 && - typeof Object.keys(arrayElement)[0] === "string" && - typeof Object.keys(arrayElement)[1] === "string" && - typeof arrayElement[Object.keys(arrayElement)[0]] !== "object" && - typeof arrayElement[Object.keys(arrayElement)[1]] !== "object" && - arrayElement[Object.keys(arrayElement)[0]] !== "null" - ) { - let subKey = arrayElement[Object.keys(arrayElement)[0]]; - const subValue = arrayElement[Object.keys(arrayElement)[1]]; - const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; - if (key) { - subKey = key + "." + subKey; + if (arrayElement.label) { + arrayPath = arrayElement.label.replace(/\./g, ""); } - if (!this.alreadyCreatedObjects[path + "." + subKey]) { - await this.adapter - .setObjectNotExistsAsync(path + "." + subKey, { - type: "state", - common: { - name: subName, - role: this.getRole(subValue, options.write), - type: subValue !== null ? typeof subValue : "mixed", - write: options.write, - read: true, - }, - native: {}, - }) - .then(() => { - this.alreadyCreatedObjects[path + "." + subKey] = true; - }); + if (arrayElement.labelText) { + arrayPath = arrayElement.labelText.replace(/\./g, ""); + } + if (arrayElement.start_date_time) { + arrayPath = arrayElement.start_date_time.replace(/\./g, ""); + } + if (options.preferedArrayName && options.preferedArrayName.indexOf("+") !== -1) { + const preferedArrayNameArray = options.preferedArrayName.split("+"); + if (arrayElement[preferedArrayNameArray[0]]) { + const element0 = arrayElement[preferedArrayNameArray[0]].replace(/\./g, "").replace(/ /g, ""); + let element1 = ""; + if (preferedArrayNameArray[1].indexOf("/") !== -1) { + const subArray = preferedArrayNameArray[1].split("/"); + const subElement = arrayElement[subArray[0]]; + if (subElement && subElement[subArray[1]] !== undefined) { + element1 = subElement[subArray[1]]; + } else if (arrayElement[subArray[1]] !== undefined) { + element1 = arrayElement[subArray[1]]; + } + } else { + element1 = arrayElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); + } + arrayPath = element0 + "-" + element1; + } + } else if (options.preferedArrayName && options.preferedArrayName.indexOf("/") !== -1) { + const preferedArrayNameArray = options.preferedArrayName.split("/"); + const subElement = arrayElement[preferedArrayNameArray[0]]; + if (subElement) { + arrayPath = subElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); + } + } else if (options.preferedArrayName && arrayElement[options.preferedArrayName]) { + arrayPath = arrayElement[options.preferedArrayName].toString().replace(/\./g, ""); + } + //special case array with 2 string objects + if ( + Object.keys(arrayElement).length === 2 && + typeof Object.keys(arrayElement)[0] === "string" && + typeof Object.keys(arrayElement)[1] === "string" && + typeof arrayElement[Object.keys(arrayElement)[0]] !== "object" && + typeof arrayElement[Object.keys(arrayElement)[1]] !== "object" && + arrayElement[Object.keys(arrayElement)[0]] !== "null" + ) { + let subKey = arrayElement[Object.keys(arrayElement)[0]]; + const subValue = arrayElement[Object.keys(arrayElement)[1]]; + const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; + if (key) { + subKey = key + "." + subKey; + } + if (!this.alreadyCreatedObjects[path + "." + subKey]) { + await this.adapter + .setObjectNotExistsAsync(path + "." + subKey, { + type: "state", + common: { + name: subName, + role: this.getRole(subValue, options.write), + type: subValue !== null ? typeof subValue : "mixed", + write: options.write, + read: true, + }, + native: {}, + }) + .then(() => { + this.alreadyCreatedObjects[path + "." + subKey] = true; + }); + } + await this.adapter.setStateAsync(path + "." + subKey, subValue, true); + continue; } - await this.adapter.setStateAsync(path + "." + subKey, subValue, true); - continue; } await this.parse(path + "." + arrayPath, arrayElement, options); } + if (pureStringArray == true) { + this.cleanupOtherStatesInChannel(path + "." + key, lastTimestamp); + } } catch (error) { this.adapter.log.error("Cannot extract array " + path); this.adapter.log.error(error); diff --git a/main.js b/main.js index 70097ffe..9a7f2c71 100644 --- a/main.js +++ b/main.js @@ -302,15 +302,15 @@ class VwWeconnect extends utils.Adapter { this.vinArray.forEach((vin) => { if (this.config.type === "id" || this.config.type === "audietron") { this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); + this.log.error("get id status failed"); }); } else if (this.config.type === "seatcupra") { this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get cupra status Failed"); + this.log.error("get cupra status failed"); }); } else if (this.config.type === "audidata") { this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status Failed"); + this.log.error("get audi data status failed"); }); } else if (this.config.type === "skodae") { this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; @@ -627,9 +627,6 @@ class VwWeconnect extends utils.Adapter { this.log.warn( "No valid userid, please check username and password or visit this link or logout and login in your app account:", ); - this.log.warn( - "Bitte logge dich in die App erneut ein und akzeptiere eventuelle Nutzungsbedingungen.", - ); this.log.warn("https://" + resp.request.host + resp.headers.location); this.log.warn("Try to auto accept new consent"); @@ -806,13 +803,13 @@ class VwWeconnect extends utils.Adapter { } else if (this.config.type === "audidata") { this.vinArray.forEach((vin) => { this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status Failed"); + this.log.error("get audi data status failed"); }); }); } else if (this.config.type === "id") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); + this.log.error("get id status failed"); this.refreshIDToken().catch(() => {}); }); if (this.config.type === "id" && this.config.wc_access_token) { @@ -823,7 +820,7 @@ class VwWeconnect extends utils.Adapter { } else if (this.config.type === "audietron") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); + this.log.error("get id status failed"); this.refreshTokenv2().catch(() => {}); }); }); @@ -831,7 +828,7 @@ class VwWeconnect extends utils.Adapter { } else if (this.config.type === "seatcupra") { this.vinArray.forEach((vin) => { this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get seat status Failed"); + this.log.error("get seat status failed"); this.refreshSeatCupraToken().catch(() => {}); }); }); @@ -903,7 +900,7 @@ class VwWeconnect extends utils.Adapter { }); } replaceVarInUrl(url, vin, tripType) { - const curHomeRegion = this.homeRegion[vin] || "https://msg.volkswagen.de"; + const curHomeRegion = this.homeRegion[vin]; return url .replace("/$vin", "/" + vin + "") .replace("$homeregion/", curHomeRegion + "/") @@ -1271,7 +1268,6 @@ class VwWeconnect extends utils.Adapter { return; } this.log.info("Start Wallcharging login"); - //this.config.type === "wc" this.type = "Wc"; this.country = "DE"; @@ -1286,7 +1282,6 @@ class VwWeconnect extends utils.Adapter { this.login() .then(() => { this.log.info("Wallcharging login was successfull"); - this.log.info("Minimum update interval is 15min for Wallcharging data, to prevent blocking"); }) .catch(() => { this.log.warn("Failled wall charger login"); @@ -2463,22 +2458,17 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(res.data)); const data = {}; for (const key in res.data) { - for (const subkey in res.data[key]) { - if (key === "userCapabilities") { - data[key] = res.data[key]; - } else { + if (key === "userCapabilities") { + data[key] = res.data[key]; + } else { + for (const subkey in res.data[key]) { data[subkey] = res.data[key][subkey].value || {}; } } } - if (data.odometerStatus.error) { - this.log.warn("Odometer Error: " + data.odometerStatus.error); - this.log.info( - "Please activate die Standortdaten freigeben und die automatische Terminvereinbarung in der VW App to receive odometer data", - ); - } + // this.extractKeys(this, vin + ".status", data); - this.json2iob.parse(vin + ".status", data, { forceIndex: true }); + this.json2iob.parse(vin + ".status", data, { forceIndex: false }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -2496,12 +2486,8 @@ class VwWeconnect extends utils.Adapter { resolve(); }) .catch((error) => { - if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; - } this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); + error && error.response && this.log.error(JSON.stringify(error.response.data)); reject(); }); }); @@ -2800,14 +2786,6 @@ class VwWeconnect extends utils.Adapter { this.log.debug("304 No values updated"); return; } - if (error.response.status === 412) { - this.log.debug(JSON.stringify(error.response.data)); - return; - } - if (error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; - } this.log.error(JSON.stringify(error.response.data)); } this.log.error(error); @@ -3016,16 +2994,6 @@ class VwWeconnect extends utils.Adapter { } getWcData(limit) { - //check if latest fetching is minimum 15 minutes ago - if (this.lastWcFetch && this.lastWcFetch + 15 * 60 * 1000 > Date.now()) { - this.log.debug("We Charge data already fetched in last 15 minutes"); - return; - } - if (!this.config.wc_access_token) { - this.log.debug("We Charge access token not set"); - return; - } - this.lastWcFetch = Date.now(); if (limit == -1) { this.log.debug("We Charge disabled in config"); return; @@ -3074,16 +3042,12 @@ class VwWeconnect extends utils.Adapter { }); }); }) - .catch((hideError, err) => { + .catch((hideError) => { if (hideError) { this.log.debug("Failed to get subscription"); return; } - this.log.error("Failed to get subscription"); - if (err && (err.statusCode === 401 || err.statusCode === 403)) { - this.config.wc_access_token = null; - } }); this.genericRequest( "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", @@ -3112,15 +3076,12 @@ class VwWeconnect extends utils.Adapter { }); this.extractKeys(this, "wecharge.chargeandpay.records.latestItem", body[0]); }) - .catch((hideError, err) => { + .catch((hideError) => { if (hideError) { this.log.debug("Failed to get chargeandpay records"); return; } this.log.error("Failed to get chargeandpay records"); - if (err && (err.statusCode === 401 || err.statusCode === 403)) { - this.config.wc_access_token = null; - } }); this.genericRequest( "https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, @@ -4570,7 +4531,6 @@ class VwWeconnect extends utils.Adapter { } extractHidden(body) { const returnObject = {}; - if (!body) return returnObject; let matches; if (body.matchAll) { matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); @@ -5427,7 +5387,7 @@ class VwWeconnect extends utils.Adapter { const city = body.address.city || body.address.town || body.address.village; const fullAdress = body.address.road + - (number == "" ? "" : " ") + // skip blank if house number missing + (number == "" ? "" : " ") + // skip blank if house number missing number + ", " + body.address.postcode + @@ -5473,6 +5433,7 @@ class VwWeconnect extends utils.Adapter { }, ); } + } // @ts-ignore parent is a valid property on module From 1f537870a1c0616a1b7e4245b72dd4ccb27ad637 Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Thu, 23 Feb 2023 12:02:25 +0100 Subject: [PATCH 520/729] don't skip element level names --- lib/json2iob.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/json2iob.js b/lib/json2iob.js index a595fd65..6f3af6d5 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -258,7 +258,13 @@ module.exports = class Json2iob { continue; } } - await this.parse(path + "." + arrayPath, arrayElement, options); + let newPath; + if (key !== "") { + newPath = path + "." + key; + } else { + newPath = path; + } + await this.parse(newPath + "." + arrayPath, arrayElement, options); } if (pureStringArray == true) { this.cleanupOtherStatesInChannel(path + "." + key, lastTimestamp); From b21637d0e6ca4fbdd8829fbe598f713f40cfa6b1 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 27 Feb 2023 23:03:49 +0100 Subject: [PATCH 521/729] fix id urls --- main.js | 300 +++++++++++++++++++++++++------------------------------- 1 file changed, 132 insertions(+), 168 deletions(-) diff --git a/main.js b/main.js index 70097ffe..c251c33f 100644 --- a/main.js +++ b/main.js @@ -349,7 +349,7 @@ class VwWeconnect extends utils.Adapter { state.element2, state.element3, state.element4, - tripType, + tripType ).catch(() => { this.log.debug("error while getting " + state.url); }); @@ -362,7 +362,7 @@ class VwWeconnect extends utils.Adapter { state.element, state.element2, state.element3, - state.element4, + state.element4 ).catch(() => { this.log.debug("error while getting " + state.url); }); @@ -469,10 +469,7 @@ class VwWeconnect extends utils.Adapter { this.log.warn("Failed to get login url"); }); if (!url) { - url = - "https://login.apps.emea.vwapps.io/authorize?nonce=" + - this.randomString(16) + - "&redirect_uri=weconnect://authenticated"; + url = "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; } } const loginRequest = request( @@ -481,8 +478,7 @@ class VwWeconnect extends utils.Adapter { url: url, headers: { "User-Agent": this.userAgent, - Accept: - "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, @@ -515,10 +511,7 @@ class VwWeconnect extends utils.Adapter { resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); err && err.message && this.log.error(err.message); - loginRequest && - loginRequest.uri && - loginRequest.uri.query && - this.log.debug(loginRequest.uri.query.toString()); + loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); reject(); return; @@ -546,8 +539,7 @@ class VwWeconnect extends utils.Adapter { headers: { "Content-Type": "application/x-www-form-urlencoded", "User-Agent": this.userAgent, - Accept: - "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, @@ -619,16 +611,10 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); this.log.debug(JSON.stringify(resp.headers)); - if ( - resp.headers.location.split("&").length <= 2 || - resp.headers.location.indexOf("/terms-and-conditions?") !== -1 - ) { + if (resp.headers.location.split("&").length <= 2 || resp.headers.location.indexOf("/terms-and-conditions?") !== -1) { this.log.warn(resp.headers.location); this.log.warn( - "No valid userid, please check username and password or visit this link or logout and login in your app account:", - ); - this.log.warn( - "Bitte logge dich in die App erneut ein und akzeptiere eventuelle Nutzungsbedingungen.", + "No valid userid, please check username and password or visit this link or logout and login in your app account:" ); this.log.warn("https://" + resp.request.host + resp.headers.location); this.log.warn("Try to auto accept new consent"); @@ -651,7 +637,29 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { this.log.debug(body); - const form = this.extractHidden(body); + let form = this.extractHidden(body); + //check for empty form object + if (Object.keys(form).length === 0 && form.constructor === Object) { + try { + const stringJson = body + .split("window._IDK = ")[1] + .split(" { - if ( - (err && err.message.indexOf("Invalid protocol:") !== -1) || - (resp && resp.statusCode >= 400) - ) { + if (err && err.message.indexOf("Invalid protocol:") === 0) { + this.log.info("Auto accept succesful. Restart adapter in 10sec"); + setTimeout(() => { + this.restart(); + }, 10 * 1000); + return; + } + if ((err && err.message.indexOf("Invalid protocol:") !== -1) || (resp && resp.statusCode >= 400)) { this.log.warn("Failed to auto accept"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -687,9 +704,9 @@ class VwWeconnect extends utils.Adapter { setTimeout(() => { this.restart(); }, 10 * 1000); - }, + } ); - }, + } ); reject(); @@ -699,9 +716,7 @@ class VwWeconnect extends utils.Adapter { if (!this.stringIsAValidUrl(resp.headers.location)) { if (resp.headers.location.indexOf("&error=") !== -1) { const location = resp.headers.location; - this.log.error( - "Error: " + location.substring(location.indexOf("error="), location.length - 1), - ); + this.log.error("Error: " + location.substring(location.indexOf("error="), location.length - 1)); } else { this.log.error("No valid login url, please download the log and visit:"); this.log.error("http://" + resp.request.host + resp.headers.location); @@ -756,7 +771,7 @@ class VwWeconnect extends utils.Adapter { this.getTokens(getRequest, code_verifier, reject, resolve); } else { this.log.error( - "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings", + "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings" ); try { this.log.debug(JSON.stringify(body)); @@ -765,33 +780,31 @@ class VwWeconnect extends utils.Adapter { reject(); } } - }, + } ); } - }, + } ); } catch (err2) { - this.log.error( - "Login was not successful, please check your login credentials and selected type", - ); + this.log.error("Login was not successful, please check your login credentials and selected type"); err && this.log.error(err); this.log.error(err2); this.log.error(err2.stack); reject(); } - }, + } ); } catch (err) { this.log.error(err); reject(); } - }, + } ); } catch (err) { this.log.error(err); reject(); } - }, + } ); }); } @@ -847,16 +860,7 @@ class VwWeconnect extends utils.Adapter { this.statesArray.forEach((state) => { if (state.path == "tripdata") { this.tripTypes.forEach((tripType) => { - this.getVehicleStatus( - vin, - state.url, - state.path, - state.element, - state.element2, - null, - null, - tripType, - ).catch(() => { + this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { this.log.debug("error while getting " + state.url); }); }); @@ -874,12 +878,8 @@ class VwWeconnect extends utils.Adapter { request( { method: "GET", - url: - "https://login.apps.emea.vwapps.io/authorize?nonce=" + - this.randomString(16) + - "&redirect_uri=weconnect://authenticated", + url: "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", headers: { - Host: "login.apps.emea.vwapps.io", "user-agent": this.userAgent, accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "accept-language": "de-de", @@ -1037,9 +1037,9 @@ class VwWeconnect extends utils.Adapter { }, 0.9 * 60 * 60 * 1000); // 0.9hours resolve(); - }, + } ); - }, + } ); } getTokens(getRequest, code_verifier, reject, resolve) { @@ -1157,7 +1157,7 @@ class VwWeconnect extends utils.Adapter { code_verifier; } if (this.config.type === "id") { - url = "https://login.apps.emea.vwapps.io/login/v1"; + url = "https://emea.bff.cariad.digital/user-login/login/v1"; let redirerctUri = "weconnect://authenticated"; body = JSON.stringify({ @@ -1178,9 +1178,7 @@ class VwWeconnect extends utils.Adapter { }; if (this.type === "Wc") { method = "GET"; - url = - "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + - jwtauth_code; + url = "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + jwtauth_code; redirerctUri = "wecharge://authenticated"; headers["x-api-key"] = "yabajourasW9N8sm+9F/oP=="; } @@ -1239,7 +1237,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); } @@ -1386,7 +1384,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); } @@ -1534,7 +1532,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); this.restart(); } - }, + } ); }); } @@ -1586,7 +1584,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); return; } @@ -1674,7 +1672,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -1733,7 +1731,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -1746,9 +1744,7 @@ class VwWeconnect extends utils.Adapter { } let method = "get"; let body = {}; - let url = this.replaceVarInUrl( - "https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles", - ); + let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); let headers = { "User-Agent": this.userAgent, "X-App-Version": this.xappversion, @@ -1798,7 +1794,7 @@ class VwWeconnect extends utils.Adapter { }; } if (this.config.type === "id") { - url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; + url = "https://emea.bff.cariad.digital/vehicle/v1/vehicles"; // @ts-ignore headers = { accept: "*/*", @@ -1845,9 +1841,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error( - "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", - ); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); body && this.log.error(JSON.stringify(body)); @@ -2415,7 +2409,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Not able to find vehicle, did you choose the correct type in the settings?"); reject(); } - }, + } ); }); } @@ -2423,7 +2417,7 @@ class VwWeconnect extends utils.Adapter { return new Promise(async (resolve, reject) => { await axios({ method: "get", - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/parkingposition", + url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/parkingposition", headers: { "content-type": "application/json", accept: "*/*", @@ -2449,7 +2443,7 @@ class VwWeconnect extends utils.Adapter { await axios({ method: "get", - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/selectivestatus?jobs=all", + url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/selectivestatus?jobs=all", headers: { "content-type": "application/json", accept: "*/*", @@ -2564,7 +2558,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); request.get( @@ -2594,7 +2588,7 @@ class VwWeconnect extends utils.Adapter { } catch (err) { this.log.error(err); } - }, + } ); request.get( { @@ -2623,7 +2617,7 @@ class VwWeconnect extends utils.Adapter { } catch (err) { this.log.error(err); } - }, + } ); }); } @@ -2652,7 +2646,7 @@ class VwWeconnect extends utils.Adapter { } this.log.info(JSON.stringify(body)); resolve(); - }, + } ); }); } @@ -2661,15 +2655,11 @@ class VwWeconnect extends utils.Adapter { const statusArray = [ { path: "driverlog", - url: - "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + - vin + - "/driverlogs?page=0&limit=100&returnPollData=true", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/driverlogs?page=0&limit=100&returnPollData=true", }, { path: "lastParkingPosition", - url: - "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", + url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", }, { path: "status", @@ -2730,7 +2720,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); }); @@ -2747,8 +2737,7 @@ class VwWeconnect extends utils.Adapter { ]; for (const status of statusArray) { - const url = - "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; + const url = "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; const headers = { "api-key": "ok", accept: "application/json", @@ -2888,7 +2877,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -2931,23 +2920,20 @@ class VwWeconnect extends utils.Adapter { ]; endpoints.forEach((element) => { const elementArray = element.split("/"); - this.genericRequest( - "https://api.elli.eco/" + element, - header, - path + "." + elementArray[elementArray.length - 1], - [404, 409], - ).catch((hideError, err) => { - if (hideError) { - return; + this.genericRequest("https://api.elli.eco/" + element, header, path + "." + elementArray[elementArray.length - 1], [404, 409]).catch( + (hideError, err) => { + if (hideError) { + return; + } + this.log.error(err); } - this.log.error(err); - }); + ); }); this.genericRequest( "https://api.elli.eco/customer/v1/charging/records?limit=" + this.config.historyLimit + "&offset=0", header, path + ".records", - [404], + [404] ).catch((hideError, err) => { if (hideError) { return; @@ -2958,27 +2944,20 @@ class VwWeconnect extends utils.Adapter { this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, path + ".stations", [404], "stations") .then((body) => { body.forEach((station) => { - this.genericRequest( - "https://api.elli.eco/chargeathome/v1/stations/" + station.id, - header, - path + ".stations." + station.name, - [404], - ).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; + this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, path + ".stations." + station.name, [404]).catch( + (hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; + } + this.log.error("Failed to get sessions"); } - this.log.error("Failed to get sessions"); - }); + ); this.genericRequest( - "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + - station.id + - "&limit=" + - this.config.historyLimit + - "&offset=0", + "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", header, path + ".stations." + station.name + ".chargingrecords", - [404], + [404] ).catch((hideError) => { if (hideError) { this.log.debug("Failed to get sessions"); @@ -2994,7 +2973,7 @@ class VwWeconnect extends utils.Adapter { "&offset=0", header, path + ".stations." + station.name + ".chargingrecords.total-charged", - [404], + [404] ).catch((hideError) => { if (hideError) { this.log.debug("Failed to get total-charged"); @@ -3196,7 +3175,7 @@ class VwWeconnect extends utils.Adapter { header, "wecharge.homecharging.records", [404], - "charging_records", + "charging_records" ) .then((body) => { this.setObjectNotExistsAsync("wecharge.homecharging.recordsJson", { @@ -3306,7 +3285,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -3331,12 +3310,12 @@ class VwWeconnect extends utils.Adapter { if (value === "settings") { method = "PUT"; } - this.log.debug("https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value); + this.log.debug("https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/" + action + "/" + value); this.log.debug(JSON.stringify(body)); request( { method: method, - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value, + url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/" + action + "/" + value, headers: { "content-type": "application/json", @@ -3380,7 +3359,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -3434,7 +3413,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -3444,7 +3423,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug("Token Refresh started"); request.get( { - url: "https://login.apps.emea.vwapps.io/refresh/v1", + url: "https://emea.bff.cariad.digital/user-login/refresh/v1", headers: { accept: "*/*", @@ -3494,7 +3473,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -3629,7 +3608,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -3655,8 +3634,7 @@ class VwWeconnect extends utils.Adapter { "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, - Accept: - "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", + Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", }, followAllRedirects: true, gzip: true, @@ -3665,9 +3643,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error( - "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", - ); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3720,7 +3696,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -3742,8 +3718,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "vwv2") { method = "GET"; url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); - accept = - " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; } this.log.debug("Request update " + url); request( @@ -3766,9 +3741,7 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error(vin); if (resp && resp.statusCode === 429) { - this.log.error( - "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", - ); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3785,7 +3758,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); } catch (err) { this.log.error(err); @@ -3856,9 +3829,7 @@ class VwWeconnect extends utils.Adapter { return; } else { if (resp && resp.statusCode === 429) { - this.log.error( - "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", - ); + this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -4308,7 +4279,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); reject(); } - }, + } ); }); } @@ -4363,7 +4334,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); reject(); } - }, + } ); }); } @@ -4463,7 +4434,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); } else { this.log.error("No Security information found"); @@ -4474,7 +4445,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - }, + } ); }); } @@ -4677,7 +4648,7 @@ class VwWeconnect extends utils.Adapter { return; } body && this.log.info(JSON.stringify(body)); - }, + } ); } if (id.indexOf("stopCharging") !== -1) { @@ -4717,7 +4688,7 @@ class VwWeconnect extends utils.Adapter { return; } body && this.log.info(JSON.stringify(body)); - }, + } ); } if (id.indexOf("Settings.") != -1) { @@ -4789,7 +4760,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, - contentType, + contentType ).catch(() => { this.log.error("failed set state"); }); @@ -4814,7 +4785,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer/actions", body, - contentType, + contentType ).catch(() => { this.log.error("failed set min limit state"); }); @@ -4829,7 +4800,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, - contentType, + contentType ).catch(() => { this.log.error("failed set state"); }); @@ -4982,7 +4953,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType, + contentType ).catch(() => { this.log.error("failed set state"); }); @@ -5073,25 +5044,23 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType, + contentType ).catch(() => { this.log.error("failed set state"); }); } if (action === "windowheating") { - body = - '\n\n startWindowHeating\n'; + body = '\n\n startWindowHeating\n'; if (state.val === false) { - body = - '\n\n stopWindowHeating\n'; + body = '\n\n stopWindowHeating\n'; } contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; this.setVehicleStatus( vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType, + contentType ).catch(() => { this.log.error("failed set state"); }); @@ -5116,12 +5085,7 @@ class VwWeconnect extends utils.Adapter { longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus( - vin, - "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", - body, - contentType, - ).catch(() => { + this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { this.log.error("failed set state"); }); } From 9c2c6c81e9c6e36cb3d40c3a46a35c6182d639c4 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 27 Feb 2023 23:13:41 +0100 Subject: [PATCH 522/729] add odo check --- main.js | 252 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 160 insertions(+), 92 deletions(-) diff --git a/main.js b/main.js index c251c33f..a36c2d81 100644 --- a/main.js +++ b/main.js @@ -349,7 +349,7 @@ class VwWeconnect extends utils.Adapter { state.element2, state.element3, state.element4, - tripType + tripType, ).catch(() => { this.log.debug("error while getting " + state.url); }); @@ -362,7 +362,7 @@ class VwWeconnect extends utils.Adapter { state.element, state.element2, state.element3, - state.element4 + state.element4, ).catch(() => { this.log.debug("error while getting " + state.url); }); @@ -469,7 +469,10 @@ class VwWeconnect extends utils.Adapter { this.log.warn("Failed to get login url"); }); if (!url) { - url = "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; + url = + "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + + this.randomString(16) + + "&redirect_uri=weconnect://authenticated"; } } const loginRequest = request( @@ -478,7 +481,8 @@ class VwWeconnect extends utils.Adapter { url: url, headers: { "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, @@ -511,7 +515,10 @@ class VwWeconnect extends utils.Adapter { resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); err && err.message && this.log.error(err.message); - loginRequest && loginRequest.uri && loginRequest.uri.query && this.log.debug(loginRequest.uri.query.toString()); + loginRequest && + loginRequest.uri && + loginRequest.uri.query && + this.log.debug(loginRequest.uri.query.toString()); reject(); return; @@ -539,7 +546,8 @@ class VwWeconnect extends utils.Adapter { headers: { "Content-Type": "application/x-www-form-urlencoded", "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + Accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", "Accept-Language": "en-US,en;q=0.9", "Accept-Encoding": "gzip, deflate", "x-requested-with": this.xrequest, @@ -611,10 +619,13 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); this.log.debug(JSON.stringify(resp.headers)); - if (resp.headers.location.split("&").length <= 2 || resp.headers.location.indexOf("/terms-and-conditions?") !== -1) { + if ( + resp.headers.location.split("&").length <= 2 || + resp.headers.location.indexOf("/terms-and-conditions?") !== -1 + ) { this.log.warn(resp.headers.location); this.log.warn( - "No valid userid, please check username and password or visit this link or logout and login in your app account:" + "No valid userid, please check username and password or visit this link or logout and login in your app account:", ); this.log.warn("https://" + resp.request.host + resp.headers.location); this.log.warn("Try to auto accept new consent"); @@ -637,7 +648,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { this.log.debug(body); - let form = this.extractHidden(body); + const form = this.extractHidden(body); //check for empty form object if (Object.keys(form).length === 0 && form.constructor === Object) { try { @@ -647,7 +658,9 @@ class VwWeconnect extends utils.Adapter { .replace(/\n/g, "") .replace(/:\/\//g, "") .replace(/local:/g, ""); - const json = stringJson.replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ').replace(/'/g, '"'); + const json = stringJson + .replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ') + .replace(/'/g, '"'); const parsedJson = JSON.parse(json); form._csrf = parsedJson.csrf_token; form.hmac = parsedJson.templateModel.hmac; @@ -692,7 +705,10 @@ class VwWeconnect extends utils.Adapter { }, 10 * 1000); return; } - if ((err && err.message.indexOf("Invalid protocol:") !== -1) || (resp && resp.statusCode >= 400)) { + if ( + (err && err.message.indexOf("Invalid protocol:") !== -1) || + (resp && resp.statusCode >= 400) + ) { this.log.warn("Failed to auto accept"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -704,9 +720,9 @@ class VwWeconnect extends utils.Adapter { setTimeout(() => { this.restart(); }, 10 * 1000); - } + }, ); - } + }, ); reject(); @@ -716,7 +732,9 @@ class VwWeconnect extends utils.Adapter { if (!this.stringIsAValidUrl(resp.headers.location)) { if (resp.headers.location.indexOf("&error=") !== -1) { const location = resp.headers.location; - this.log.error("Error: " + location.substring(location.indexOf("error="), location.length - 1)); + this.log.error( + "Error: " + location.substring(location.indexOf("error="), location.length - 1), + ); } else { this.log.error("No valid login url, please download the log and visit:"); this.log.error("http://" + resp.request.host + resp.headers.location); @@ -771,7 +789,7 @@ class VwWeconnect extends utils.Adapter { this.getTokens(getRequest, code_verifier, reject, resolve); } else { this.log.error( - "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings" + "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings", ); try { this.log.debug(JSON.stringify(body)); @@ -780,31 +798,33 @@ class VwWeconnect extends utils.Adapter { reject(); } } - } + }, ); } - } + }, ); } catch (err2) { - this.log.error("Login was not successful, please check your login credentials and selected type"); + this.log.error( + "Login was not successful, please check your login credentials and selected type", + ); err && this.log.error(err); this.log.error(err2); this.log.error(err2.stack); reject(); } - } + }, ); } catch (err) { this.log.error(err); reject(); } - } + }, ); } catch (err) { this.log.error(err); reject(); } - } + }, ); }); } @@ -860,7 +880,16 @@ class VwWeconnect extends utils.Adapter { this.statesArray.forEach((state) => { if (state.path == "tripdata") { this.tripTypes.forEach((tripType) => { - this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, null, null, tripType).catch(() => { + this.getVehicleStatus( + vin, + state.url, + state.path, + state.element, + state.element2, + null, + null, + tripType, + ).catch(() => { this.log.debug("error while getting " + state.url); }); }); @@ -878,7 +907,10 @@ class VwWeconnect extends utils.Adapter { request( { method: "GET", - url: "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", + url: + "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + + this.randomString(16) + + "&redirect_uri=weconnect://authenticated", headers: { "user-agent": this.userAgent, accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", @@ -1037,9 +1069,9 @@ class VwWeconnect extends utils.Adapter { }, 0.9 * 60 * 60 * 1000); // 0.9hours resolve(); - } + }, ); - } + }, ); } getTokens(getRequest, code_verifier, reject, resolve) { @@ -1178,7 +1210,9 @@ class VwWeconnect extends utils.Adapter { }; if (this.type === "Wc") { method = "GET"; - url = "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + jwtauth_code; + url = + "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + + jwtauth_code; redirerctUri = "wecharge://authenticated"; headers["x-api-key"] = "yabajourasW9N8sm+9F/oP=="; } @@ -1237,7 +1271,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } @@ -1384,7 +1418,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } @@ -1532,7 +1566,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); this.restart(); } - } + }, ); }); } @@ -1584,7 +1618,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); return; } @@ -1672,7 +1706,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -1731,7 +1765,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -1744,7 +1778,9 @@ class VwWeconnect extends utils.Adapter { } let method = "get"; let body = {}; - let url = this.replaceVarInUrl("https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles"); + let url = this.replaceVarInUrl( + "https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles", + ); let headers = { "User-Agent": this.userAgent, "X-App-Version": this.xappversion, @@ -1841,7 +1877,9 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); body && this.log.error(JSON.stringify(body)); @@ -2409,7 +2447,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Not able to find vehicle, did you choose the correct type in the settings?"); reject(); } - } + }, ); }); } @@ -2465,7 +2503,7 @@ class VwWeconnect extends utils.Adapter { } } } - if (data.odometerStatus.error) { + if (data.odometerStatus && data.odometerStatus.error) { this.log.warn("Odometer Error: " + data.odometerStatus.error); this.log.info( "Please activate die Standortdaten freigeben und die automatische Terminvereinbarung in der VW App to receive odometer data", @@ -2558,7 +2596,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); request.get( @@ -2588,7 +2626,7 @@ class VwWeconnect extends utils.Adapter { } catch (err) { this.log.error(err); } - } + }, ); request.get( { @@ -2617,7 +2655,7 @@ class VwWeconnect extends utils.Adapter { } catch (err) { this.log.error(err); } - } + }, ); }); } @@ -2646,7 +2684,7 @@ class VwWeconnect extends utils.Adapter { } this.log.info(JSON.stringify(body)); resolve(); - } + }, ); }); } @@ -2655,11 +2693,15 @@ class VwWeconnect extends utils.Adapter { const statusArray = [ { path: "driverlog", - url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/driverlogs?page=0&limit=100&returnPollData=true", + url: + "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + + vin + + "/driverlogs?page=0&limit=100&returnPollData=true", }, { path: "lastParkingPosition", - url: "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", + url: + "https://audi-global-dmp.apps.emea.vwapps.io/mobility-platform/vehicle/" + vin + "/last-parking-position", }, { path: "status", @@ -2720,7 +2762,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); }); @@ -2737,7 +2779,8 @@ class VwWeconnect extends utils.Adapter { ]; for (const status of statusArray) { - const url = "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; + const url = + "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; const headers = { "api-key": "ok", accept: "application/json", @@ -2877,7 +2920,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -2920,20 +2963,23 @@ class VwWeconnect extends utils.Adapter { ]; endpoints.forEach((element) => { const elementArray = element.split("/"); - this.genericRequest("https://api.elli.eco/" + element, header, path + "." + elementArray[elementArray.length - 1], [404, 409]).catch( - (hideError, err) => { - if (hideError) { - return; - } - this.log.error(err); + this.genericRequest( + "https://api.elli.eco/" + element, + header, + path + "." + elementArray[elementArray.length - 1], + [404, 409], + ).catch((hideError, err) => { + if (hideError) { + return; } - ); + this.log.error(err); + }); }); this.genericRequest( "https://api.elli.eco/customer/v1/charging/records?limit=" + this.config.historyLimit + "&offset=0", header, path + ".records", - [404] + [404], ).catch((hideError, err) => { if (hideError) { return; @@ -2944,20 +2990,27 @@ class VwWeconnect extends utils.Adapter { this.genericRequest("https://api.elli.eco/chargeathome/v1/stations", header, path + ".stations", [404], "stations") .then((body) => { body.forEach((station) => { - this.genericRequest("https://api.elli.eco/chargeathome/v1/stations/" + station.id, header, path + ".stations." + station.name, [404]).catch( - (hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; - } - this.log.error("Failed to get sessions"); + this.genericRequest( + "https://api.elli.eco/chargeathome/v1/stations/" + station.id, + header, + path + ".stations." + station.name, + [404], + ).catch((hideError) => { + if (hideError) { + this.log.debug("Failed to get sessions"); + return; } - ); + this.log.error("Failed to get sessions"); + }); this.genericRequest( - "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + station.id + "&limit=" + this.config.historyLimit + "&offset=0", + "https://api.elli.eco/chargeathome/v1/chargingrecords?station_id=" + + station.id + + "&limit=" + + this.config.historyLimit + + "&offset=0", header, path + ".stations." + station.name + ".chargingrecords", - [404] + [404], ).catch((hideError) => { if (hideError) { this.log.debug("Failed to get sessions"); @@ -2973,7 +3026,7 @@ class VwWeconnect extends utils.Adapter { "&offset=0", header, path + ".stations." + station.name + ".chargingrecords.total-charged", - [404] + [404], ).catch((hideError) => { if (hideError) { this.log.debug("Failed to get total-charged"); @@ -3175,7 +3228,7 @@ class VwWeconnect extends utils.Adapter { header, "wecharge.homecharging.records", [404], - "charging_records" + "charging_records", ) .then((body) => { this.setObjectNotExistsAsync("wecharge.homecharging.recordsJson", { @@ -3285,7 +3338,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3359,7 +3412,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3413,7 +3466,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3473,7 +3526,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3608,7 +3661,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3634,7 +3687,8 @@ class VwWeconnect extends utils.Adapter { "X-App-Version": this.xappversion, "X-App-Name": this.xappname, Authorization: "Bearer " + this.config.vwatoken, - Accept: "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", + Accept: + "application/json, application/vnd.vwg.mbb.operationList_v3_0_2+xml, application/vnd.vwg.mbb.genericError_v1_0_2+xml", }, followAllRedirects: true, gzip: true, @@ -3643,7 +3697,9 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3696,7 +3752,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -3718,7 +3774,8 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "vwv2") { method = "GET"; url = this.replaceVarInUrl("$homeregion/fs-car/vehicleMgmt/vehicledata/v2/$type/$country/vehicles/$vin", vin); - accept = " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; + accept = + " application/vnd.vwg.mbb.vehicleDataDetail_v2_1_0+json, application/vnd.vwg.mbb.genericError_v1_0_2+json"; } this.log.debug("Request update " + url); request( @@ -3741,7 +3798,9 @@ class VwWeconnect extends utils.Adapter { if (err || (resp && resp.statusCode >= 400)) { this.log.error(vin); if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -3758,7 +3817,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } catch (err) { this.log.error(err); @@ -3829,7 +3888,9 @@ class VwWeconnect extends utils.Adapter { return; } else { if (resp && resp.statusCode === 429) { - this.log.error("Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often."); + this.log.error( + "Too many requests. Please turn on your car to send new requests. Maybe force update/update erzwingen is too often.", + ); } err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); @@ -4279,7 +4340,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); reject(); } - } + }, ); }); } @@ -4334,7 +4395,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err.stack); reject(); } - } + }, ); }); } @@ -4434,7 +4495,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); } else { this.log.error("No Security information found"); @@ -4445,7 +4506,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); reject(); } - } + }, ); }); } @@ -4648,7 +4709,7 @@ class VwWeconnect extends utils.Adapter { return; } body && this.log.info(JSON.stringify(body)); - } + }, ); } if (id.indexOf("stopCharging") !== -1) { @@ -4688,7 +4749,7 @@ class VwWeconnect extends utils.Adapter { return; } body && this.log.info(JSON.stringify(body)); - } + }, ); } if (id.indexOf("Settings.") != -1) { @@ -4760,7 +4821,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -4785,7 +4846,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/departuretimer/v1/$type/$country/vehicles/$vin/timer/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set min limit state"); }); @@ -4800,7 +4861,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -4953,7 +5014,7 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -5044,23 +5105,25 @@ class VwWeconnect extends utils.Adapter { vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); } if (action === "windowheating") { - body = '\n\n startWindowHeating\n'; + body = + '\n\n startWindowHeating\n'; if (state.val === false) { - body = '\n\n stopWindowHeating\n'; + body = + '\n\n stopWindowHeating\n'; } contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; this.setVehicleStatus( vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, - contentType + contentType, ).catch(() => { this.log.error("failed set state"); }); @@ -5085,7 +5148,12 @@ class VwWeconnect extends utils.Adapter { longitude.val + "}}}"; contentType = "application/json; charset=UTF-8"; - this.setVehicleStatus(vin, "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", body, contentType).catch(() => { + this.setVehicleStatus( + vin, + "$homeregion/fs-car/bs/rhf/v1/$type/$country/vehicles/$vin/honkAndFlash", + body, + contentType, + ).catch(() => { this.log.error("failed set state"); }); } From 542afe5be4a478d529b3c4478f22ba2aba2eb62b Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 28 Feb 2023 09:29:28 +0100 Subject: [PATCH 523/729] 0.61 --- README.md | 3 ++ io-package.json | 5 +- package-lock.json | 119 ++++++++++++++++++++++++++-------------------- package.json | 8 ++-- 4 files changed, 79 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index a023658c..23aa9bc1 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,9 @@ Door and window states: ## Changelog +### 0.0.61 +- Fix ID login + ### 0.0.60 - Minor improvements. WeCharge Minimum interval is now 15 minutes diff --git a/io-package.json b/io-package.json index 18906427..12173a87 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.60", + "version": "0.0.61", "news": { + "0.0.61:": { + "en": "Fix VW id login" + }, "0.0.60": { "en": "Minor improvements. WeCharge Minimum interval is now 15 minutes", "de": "Kleine Verbesserungen. WeCharge Mindestintervall beträgt jetzt 15 Minuten" diff --git a/package-lock.json b/package-lock.json index 9d2fe26b..b51ae357 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.60", + "version": "0.0.61", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.60", + "version": "0.0.61", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.7", @@ -24,28 +24,28 @@ "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.18", + "@types/node": "^18.14.2", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.31.0", + "eslint": "^8.35.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^14.0.2", "sinon-chai": "^3.7.0", - "typescript": "~4.9.4" + "typescript": "~4.9.5" }, "engines": { "node": ">=10.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", + "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -65,6 +65,15 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/js": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", + "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -267,9 +276,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" + "version": "18.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.2.tgz", + "integrity": "sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==" }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -303,9 +312,9 @@ "dev": true }, "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.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -860,12 +869,13 @@ } }, "node_modules/eslint": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz", - "integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", + "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.4.1", + "@eslint/eslintrc": "^2.0.0", + "@eslint/js": "8.35.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -879,7 +889,7 @@ "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", "espree": "^9.4.0", - "esquery": "^1.4.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -1006,9 +1016,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.4.2", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", + "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -1317,9 +1327,9 @@ } }, "node_modules/globals": { - "version": "13.19.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", - "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "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" @@ -2611,9 +2621,9 @@ } }, "node_modules/typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2792,9 +2802,9 @@ }, "dependencies": { "@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", + "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -2808,6 +2818,12 @@ "strip-json-comments": "^3.1.1" } }, + "@eslint/js": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", + "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "dev": true + }, "@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -2987,9 +3003,9 @@ "dev": true }, "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" + "version": "18.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.2.tgz", + "integrity": "sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==" }, "@types/proxyquire": { "version": "1.3.28", @@ -3023,9 +3039,9 @@ "dev": true }, "acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, "acorn-jsx": { @@ -3442,12 +3458,13 @@ "dev": true }, "eslint": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz", - "integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", + "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.4.1", + "@eslint/eslintrc": "^2.0.0", + "@eslint/js": "8.35.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -3461,7 +3478,7 @@ "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", "espree": "^9.4.0", - "esquery": "^1.4.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -3551,9 +3568,9 @@ } }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", + "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -3778,9 +3795,9 @@ } }, "globals": { - "version": "13.19.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", - "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "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" @@ -4731,9 +4748,9 @@ "dev": true }, "typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "universalify": { diff --git a/package.json b/package.json index 64a1b9ba..05d126e3 100644 --- a/package.json +++ b/package.json @@ -35,19 +35,19 @@ "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.11.18", + "@types/node": "^18.14.2", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.31.0", + "eslint": "^8.35.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^14.0.2", "sinon-chai": "^3.7.0", - "typescript": "~4.9.4" + "typescript": "~4.9.5" }, "engines": { "node": ">=10.0.0" @@ -78,5 +78,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.60" + "version": "0.0.61" } From 0f2c1261960b5d523777f315fa5b0a137dee912a Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 28 Feb 2023 17:28:48 +0100 Subject: [PATCH 524/729] merge from main repo --- main.js | 131 +++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 101 insertions(+), 30 deletions(-) diff --git a/main.js b/main.js index 9a7f2c71..a36c2d81 100644 --- a/main.js +++ b/main.js @@ -302,15 +302,15 @@ class VwWeconnect extends utils.Adapter { this.vinArray.forEach((vin) => { if (this.config.type === "id" || this.config.type === "audietron") { this.getIdStatus(vin).catch(() => { - this.log.error("get id status failed"); + this.log.error("get id status Failed"); }); } else if (this.config.type === "seatcupra") { this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get cupra status failed"); + this.log.error("get cupra status Failed"); }); } else if (this.config.type === "audidata") { this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status failed"); + this.log.error("get audi data status Failed"); }); } else if (this.config.type === "skodae") { this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; @@ -470,7 +470,7 @@ class VwWeconnect extends utils.Adapter { }); if (!url) { url = - "https://login.apps.emea.vwapps.io/authorize?nonce=" + + "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated"; } @@ -649,6 +649,30 @@ class VwWeconnect extends utils.Adapter { this.log.debug(body); const form = this.extractHidden(body); + //check for empty form object + if (Object.keys(form).length === 0 && form.constructor === Object) { + try { + const stringJson = body + .split("window._IDK = ")[1] + .split(" { + if (err && err.message.indexOf("Invalid protocol:") === 0) { + this.log.info("Auto accept succesful. Restart adapter in 10sec"); + setTimeout(() => { + this.restart(); + }, 10 * 1000); + return; + } if ( (err && err.message.indexOf("Invalid protocol:") !== -1) || (resp && resp.statusCode >= 400) @@ -803,13 +839,13 @@ class VwWeconnect extends utils.Adapter { } else if (this.config.type === "audidata") { this.vinArray.forEach((vin) => { this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status failed"); + this.log.error("get audi data status Failed"); }); }); } else if (this.config.type === "id") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { - this.log.error("get id status failed"); + this.log.error("get id status Failed"); this.refreshIDToken().catch(() => {}); }); if (this.config.type === "id" && this.config.wc_access_token) { @@ -820,7 +856,7 @@ class VwWeconnect extends utils.Adapter { } else if (this.config.type === "audietron") { this.vinArray.forEach((vin) => { this.getIdStatus(vin).catch(() => { - this.log.error("get id status failed"); + this.log.error("get id status Failed"); this.refreshTokenv2().catch(() => {}); }); }); @@ -828,7 +864,7 @@ class VwWeconnect extends utils.Adapter { } else if (this.config.type === "seatcupra") { this.vinArray.forEach((vin) => { this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get seat status failed"); + this.log.error("get seat status Failed"); this.refreshSeatCupraToken().catch(() => {}); }); }); @@ -872,11 +908,10 @@ class VwWeconnect extends utils.Adapter { { method: "GET", url: - "https://login.apps.emea.vwapps.io/authorize?nonce=" + + "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + this.randomString(16) + "&redirect_uri=weconnect://authenticated", headers: { - Host: "login.apps.emea.vwapps.io", "user-agent": this.userAgent, accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "accept-language": "de-de", @@ -900,7 +935,7 @@ class VwWeconnect extends utils.Adapter { }); } replaceVarInUrl(url, vin, tripType) { - const curHomeRegion = this.homeRegion[vin]; + const curHomeRegion = this.homeRegion[vin] || "https://msg.volkswagen.de"; return url .replace("/$vin", "/" + vin + "") .replace("$homeregion/", curHomeRegion + "/") @@ -1154,7 +1189,7 @@ class VwWeconnect extends utils.Adapter { code_verifier; } if (this.config.type === "id") { - url = "https://login.apps.emea.vwapps.io/login/v1"; + url = "https://emea.bff.cariad.digital/user-login/login/v1"; let redirerctUri = "weconnect://authenticated"; body = JSON.stringify({ @@ -1268,6 +1303,7 @@ class VwWeconnect extends utils.Adapter { return; } this.log.info("Start Wallcharging login"); + //this.config.type === "wc" this.type = "Wc"; this.country = "DE"; @@ -1282,6 +1318,7 @@ class VwWeconnect extends utils.Adapter { this.login() .then(() => { this.log.info("Wallcharging login was successfull"); + this.log.info("Minimum update interval is 15min for Wallcharging data, to prevent blocking"); }) .catch(() => { this.log.warn("Failled wall charger login"); @@ -1793,7 +1830,7 @@ class VwWeconnect extends utils.Adapter { }; } if (this.config.type === "id") { - url = "https://mobileapi.apps.emea.vwapps.io/vehicles"; + url = "https://emea.bff.cariad.digital/vehicle/v1/vehicles"; // @ts-ignore headers = { accept: "*/*", @@ -2418,7 +2455,7 @@ class VwWeconnect extends utils.Adapter { return new Promise(async (resolve, reject) => { await axios({ method: "get", - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/parkingposition", + url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/parkingposition", headers: { "content-type": "application/json", accept: "*/*", @@ -2444,7 +2481,7 @@ class VwWeconnect extends utils.Adapter { await axios({ method: "get", - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/selectivestatus?jobs=all", + url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/selectivestatus?jobs=all", headers: { "content-type": "application/json", accept: "*/*", @@ -2458,17 +2495,22 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(res.data)); const data = {}; for (const key in res.data) { - if (key === "userCapabilities") { - data[key] = res.data[key]; - } else { - for (const subkey in res.data[key]) { + for (const subkey in res.data[key]) { + if (key === "userCapabilities") { + data[key] = res.data[key]; + } else { data[subkey] = res.data[key][subkey].value || {}; } } } - + if (data.odometerStatus && data.odometerStatus.error) { + this.log.warn("Odometer Error: " + data.odometerStatus.error); + this.log.info( + "Please activate die Standortdaten freigeben und die automatische Terminvereinbarung in der VW App to receive odometer data", + ); + } // this.extractKeys(this, vin + ".status", data); - this.json2iob.parse(vin + ".status", data, { forceIndex: false }); + this.json2iob.parse(vin + ".status", data, { forceIndex: true }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -2486,8 +2528,12 @@ class VwWeconnect extends utils.Adapter { resolve(); }) .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } this.log.error(error); - error && error.response && this.log.error(JSON.stringify(error.response.data)); + error.response && this.log.error(JSON.stringify(error.response.data)); reject(); }); }); @@ -2786,6 +2832,14 @@ class VwWeconnect extends utils.Adapter { this.log.debug("304 No values updated"); return; } + if (error.response.status === 412) { + this.log.debug(JSON.stringify(error.response.data)); + return; + } + if (error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } this.log.error(JSON.stringify(error.response.data)); } this.log.error(error); @@ -2994,6 +3048,16 @@ class VwWeconnect extends utils.Adapter { } getWcData(limit) { + //check if latest fetching is minimum 15 minutes ago + if (this.lastWcFetch && this.lastWcFetch + 15 * 60 * 1000 > Date.now()) { + this.log.debug("We Charge data already fetched in last 15 minutes"); + return; + } + if (!this.config.wc_access_token) { + this.log.debug("We Charge access token not set"); + return; + } + this.lastWcFetch = Date.now(); if (limit == -1) { this.log.debug("We Charge disabled in config"); return; @@ -3042,12 +3106,16 @@ class VwWeconnect extends utils.Adapter { }); }); }) - .catch((hideError) => { + .catch((hideError, err) => { if (hideError) { this.log.debug("Failed to get subscription"); return; } + this.log.error("Failed to get subscription"); + if (err && (err.statusCode === 401 || err.statusCode === 403)) { + this.config.wc_access_token = null; + } }); this.genericRequest( "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", @@ -3076,12 +3144,15 @@ class VwWeconnect extends utils.Adapter { }); this.extractKeys(this, "wecharge.chargeandpay.records.latestItem", body[0]); }) - .catch((hideError) => { + .catch((hideError, err) => { if (hideError) { this.log.debug("Failed to get chargeandpay records"); return; } this.log.error("Failed to get chargeandpay records"); + if (err && (err.statusCode === 401 || err.statusCode === 403)) { + this.config.wc_access_token = null; + } }); this.genericRequest( "https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, @@ -3292,12 +3363,12 @@ class VwWeconnect extends utils.Adapter { if (value === "settings") { method = "PUT"; } - this.log.debug("https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value); + this.log.debug("https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/" + action + "/" + value); this.log.debug(JSON.stringify(body)); request( { method: method, - url: "https://mobileapi.apps.emea.vwapps.io/vehicles/" + vin + "/" + action + "/" + value, + url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/" + action + "/" + value, headers: { "content-type": "application/json", @@ -3405,7 +3476,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug("Token Refresh started"); request.get( { - url: "https://login.apps.emea.vwapps.io/refresh/v1", + url: "https://emea.bff.cariad.digital/user-login/refresh/v1", headers: { accept: "*/*", @@ -4531,6 +4602,7 @@ class VwWeconnect extends utils.Adapter { } extractHidden(body) { const returnObject = {}; + if (!body) return returnObject; let matches; if (body.matchAll) { matches = body.matchAll(/]* name=["']([^'"]*)|)(?=[^>]* value=["']([^'"]*)|)/g); @@ -5387,7 +5459,7 @@ class VwWeconnect extends utils.Adapter { const city = body.address.city || body.address.town || body.address.village; const fullAdress = body.address.road + - (number == "" ? "" : " ") + // skip blank if house number missing + (number == "" ? "" : " ") + // skip blank if house number missing number + ", " + body.address.postcode + @@ -5433,7 +5505,6 @@ class VwWeconnect extends utils.Adapter { }, ); } - } // @ts-ignore parent is a valid property on module From 5751aef1b5dbec54da433ae8ad258e67f29994ea Mon Sep 17 00:00:00 2001 From: Volker Sengler Date: Tue, 28 Feb 2023 17:35:04 +0100 Subject: [PATCH 525/729] redo changes for id. --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index a36c2d81..5b15cd96 100644 --- a/main.js +++ b/main.js @@ -2495,10 +2495,10 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(res.data)); const data = {}; for (const key in res.data) { - for (const subkey in res.data[key]) { - if (key === "userCapabilities") { - data[key] = res.data[key]; - } else { + if (key === "userCapabilities") { + data[key] = res.data[key]; + } else { + for (const subkey in res.data[key]) { data[subkey] = res.data[key][subkey].value || {}; } } @@ -2510,7 +2510,7 @@ class VwWeconnect extends utils.Adapter { ); } // this.extractKeys(this, vin + ".status", data); - this.json2iob.parse(vin + ".status", data, { forceIndex: true }); + this.json2iob.parse(vin + ".status", data, { forceIndex: false }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -2533,7 +2533,7 @@ class VwWeconnect extends utils.Adapter { return; } this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); + error && error.response && this.log.error(JSON.stringify(error.response.data)); reject(); }); }); From f733488dbd01f8ae659cfbe3479a806ba822ef58 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 28 Feb 2023 23:36:22 +0100 Subject: [PATCH 526/729] update audi urls --- main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index a36c2d81..142cb496 100644 --- a/main.js +++ b/main.js @@ -627,6 +627,7 @@ class VwWeconnect extends utils.Adapter { this.log.warn( "No valid userid, please check username and password or visit this link or logout and login in your app account:", ); + this.log.warn("Bitte in die App einloggen und die Nutzungsbedingungen akzeptieren."); this.log.warn("https://" + resp.request.host + resp.headers.location); this.log.warn("Try to auto accept new consent"); @@ -660,7 +661,8 @@ class VwWeconnect extends utils.Adapter { .replace(/local:/g, ""); const json = stringJson .replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ') - .replace(/'/g, '"'); + .replace(/'/g, '"') + .replace(/""/g, '"'); const parsedJson = JSON.parse(json); form._csrf = parsedJson.csrf_token; form.hmac = parsedJson.templateModel.hmac; @@ -1004,7 +1006,7 @@ class VwWeconnect extends utils.Adapter { request( { method: "POST", - url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", + url: "https://emea.bff.cariad.digital/login/v1/idk/token", headers: { accept: "application/json", "content-type": "application/x-www-form-urlencoded; charset=utf-8", @@ -1033,7 +1035,7 @@ class VwWeconnect extends utils.Adapter { request( { method: "POST", - url: "https://aazsproxy-service.apps.emea.vwapps.io/token", + url: "https://emea.bff.cariad.digital/login/v1/audi/token", headers: { accept: "application/json", "content-type": "application/json; charset=utf-8", @@ -3436,7 +3438,7 @@ class VwWeconnect extends utils.Adapter { request( { method: "POST", - url: "https://idkproxy-service.apps.emea.vwapps.io/v1/emea/token", + url: "https://emea.bff.cariad.digital/login/v1/idk/token", headers: headers, followAllRedirects: true, gzip: true, From 6e6ed744d6e04bc56fba0ac545e907cda5def517 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 1 Mar 2023 00:08:03 +0100 Subject: [PATCH 527/729] udpate qm auth --- main.js | 66 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/main.js b/main.js index 142cb496..8295878c 100644 --- a/main.js +++ b/main.js @@ -950,42 +950,42 @@ class VwWeconnect extends utils.Adapter { this.log.debug(timestamp.toString()); //credits to https://github.com/arjenvrh/audi_connect_ha/blob/master/custom_components/audiconnect/audi_services.py const xqmauth_secret = Buffer.from([ - 256 - 28, - 120, - 102, - 55, - 256 - 114, - 256 - 16, - 101, - 256 - 116, - 256 - 25, - 93, + 26, + 256 - 74, + 256 - 103, + 37, + 256 - 84, + 23, + 256 - 102, + 256 - 86, + 78, + 256 - 125, + 256 - 85, + 256 - 26, 113, - 0, - 122, - 256 - 128, - 256 - 97, - 52, - 97, - 107, - 256 - 106, - 53, - 256 - 30, - 256 - 20, - 34, - 256 - 126, - 69, - 120, - 76, - 31, - 99, - 256 - 24, - 256 - 115, + 256 - 87, + 71, + 109, + 23, + 100, + 24, + 256 - 72, + 91, + 256 - 41, 6, + 256 - 15, + 67, + 108, + 256 - 95, + 91, + 256 - 26, + 71, + 256 - 104, + 256 - 100, ]); const xqmauth_val = crypto.createHmac("sha256", xqmauth_secret).update(timestamp.toString()).digest("hex"); this.log.debug(timestamp.toString()); - return "v1:c95f4fd2:" + xqmauth_val; + return "v1:01da27b0:" + xqmauth_val; } getTokensv2(getRequest, code_verifier, reject, resolve) { const url = getRequest.uri.query; @@ -1040,7 +1040,7 @@ class VwWeconnect extends utils.Adapter { accept: "application/json", "content-type": "application/json; charset=utf-8", "accept-charset": "utf-8", - "x-app-version": "4.6.0", + "x-app-version": "4.13.0", "x-app-name": "myAudi", "accept-language": "de-de", "user-agent": this.userAgent, @@ -3433,7 +3433,7 @@ class VwWeconnect extends utils.Adapter { "accept-charset": "utf-8", "x-qmauth": this.getQmauth(), "accept-language": "de-de", - "user-agent": "myAudi-Android/4.6.0 (Build 800236847.2111261819) Android/11", + "user-agent": "myAudi-Android/4.13.0 (Build 800236847.2111261819) Android/11", }; request( { From fc80e6e9cbe52c21a6acbf3fe46653990626c5c0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 1 Mar 2023 12:38:08 +0100 Subject: [PATCH 528/729] add logs --- main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 8295878c..62e09c26 100644 --- a/main.js +++ b/main.js @@ -429,7 +429,7 @@ class VwWeconnect extends utils.Adapter { return new Promise(async (resolve, reject) => { const nonce = this.getNonce(); const state = uuidv4(); - + this.log.info(`Login in with ${this.config.type}`); let [code_verifier, codeChallenge] = this.getCodeChallenge(); if (this.config.type === "seatelli" || this.config.type === "skodapower") { [code_verifier, codeChallenge] = this.getCodeChallengev2(); @@ -766,7 +766,10 @@ class VwWeconnect extends utils.Adapter { this.getTokens(getRequest, code_verifier, reject, resolve); } else { this.log.debug(body); - this.log.debug("No Token received visiting url and accept the permissions."); + this.log.warn( + "No Token received visiting url and accept the permissions or login and accept", + ); + this.log.info(getRequest.uri.href); const form = this.extractHidden(body); getRequest = request.post( { @@ -2034,6 +2037,7 @@ class VwWeconnect extends utils.Adapter { return; } if (this.config.type === "seatcupra") { + this.log.info("Found " + body.vehicles.length + " vehicles"); body.vehicles.forEach((element) => { const vin = element.vin; if (!vin) { @@ -2158,6 +2162,7 @@ class VwWeconnect extends utils.Adapter { reject(); return; } + this.log.info(`Found ${body.data.userVehicles.length} vehicles`); body.data.userVehicles.forEach(async (element) => { const vin = element.vin; this.vinArray.push(vin); From 2f95dc27c6153789ef92647c7ac57c195881d6e8 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 1 Mar 2023 16:43:39 +0100 Subject: [PATCH 529/729] 0.0.62 --- README.md | 2 ++ io-package.json | 5 ++++- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 23aa9bc1..a5f5f3d0 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,8 @@ Door and window states: ## Changelog +### 0.0.62 +- Fix Audi etron login ### 0.0.61 - Fix ID login diff --git a/io-package.json b/io-package.json index 12173a87..6580e5e3 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.61", + "version": "0.0.62", "news": { + "0.0.62:": { + "en": "Fix Audi etron login" + }, "0.0.61:": { "en": "Fix VW id login" }, diff --git a/package-lock.json b/package-lock.json index b51ae357..08cf3184 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.61", + "version": "0.0.62", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.61", + "version": "0.0.62", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.7", diff --git a/package.json b/package.json index 05d126e3..b078dfd1 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.61" + "version": "0.0.62" } From a039c6d1b9eefd892569c9459cb3eea7a889e7ce Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 3 Mar 2023 08:19:46 +0100 Subject: [PATCH 530/729] linting --- lib/json2iob.js | 13 ++++++------- main.js | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/json2iob.js b/lib/json2iob.js index 6f3af6d5..90cc8be3 100644 --- a/lib/json2iob.js +++ b/lib/json2iob.js @@ -139,11 +139,11 @@ module.exports = class Json2iob { if (key) { element = element[key]; } - let lastTimestamp = Date.now(); + const lastTimestamp = Date.now(); let pureStringArray = true; for (let index in element) { const arrayElement = element[index]; - let indexNr = parseInt(index) + 1; + const indexNr = parseInt(index) + 1; if (indexNr < 10) { index = "0" + index; } @@ -153,7 +153,7 @@ module.exports = class Json2iob { continue; } pureStringArray = false; - if (! options.forceIndex) { + if (!options.forceIndex) { if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { arrayPath = arrayElement[Object.keys(arrayElement)[0]]; } @@ -175,7 +175,7 @@ module.exports = class Json2iob { } } } - + if (arrayElement.id) { if (arrayElement.id.replace) { arrayPath = arrayElement.id.replace(/\./g, ""); @@ -267,7 +267,7 @@ module.exports = class Json2iob { await this.parse(newPath + "." + arrayPath, arrayElement, options); } if (pureStringArray == true) { - this.cleanupOtherStatesInChannel(path + "." + key, lastTimestamp); + this.setOtherStatesInChannelNull(path + "." + key, lastTimestamp); } } catch (error) { this.adapter.log.error("Cannot extract array " + path); @@ -306,11 +306,10 @@ module.exports = class Json2iob { * Read all states of channel and empty all state with older timestamp than ts. * If only some of the state of a channel get updated (e.g. because not all values are contained * in some json reply), this make it possible than all other state are emptied. - * @param {*} vin * @param {*} channel * @param {*} ts */ - async cleanupOtherStatesInChannel(channel, ts) { + async setOtherStatesInChannelNull(channel, ts) { const states = await this.adapter.getStatesAsync(channel + ".*"); const allIds = Object.keys(states); for (const keyName of allIds) { diff --git a/main.js b/main.js index 3df87b74..58c5567b 100644 --- a/main.js +++ b/main.js @@ -5502,7 +5502,7 @@ class VwWeconnect extends utils.Adapter { }); await this.setStateAsync(vin + ".position.address." + key, body.address[key], true); } - this.json2iob.cleanupOtherStatesInChannel(vin + ".position.address", timestamp); + this.json2iob.setOtherStatesInChannelNull(vin + ".position.address", timestamp); } catch (err) { this.log.error(err); } From f25712422cda76f6c509e73653327b6125abab9a Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 9 Mar 2023 23:59:54 +0100 Subject: [PATCH 531/729] set default home region --- main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 58c5567b..a9a000f2 100644 --- a/main.js +++ b/main.js @@ -1687,9 +1687,10 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); + this.log.debug(vin + ": set default homeregion"); + this.homeRegion[vin] = "https://fal-3a.prd.eu.dp.vwg-connect.com"; + this.homeRegionSetter[vin] = "https://mal-3a.prd.eu.dp.vwg-connect.com/"; + resolve(); return; } try { @@ -2235,6 +2236,7 @@ class VwWeconnect extends utils.Adapter { return; } const vehicles = body.userVehicles.vehicle; + this.log.info(`Found ${vehicles.length} vehicles`); vehicles.forEach((vehicle) => { this.vinArray.push(vehicle); this.setObjectNotExists(vehicle, { From 77c920807a68462870794d5e3bdfa5cde72dea05 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 10 Mar 2023 09:38:57 +0100 Subject: [PATCH 532/729] 0.0.63 --- README.md | 2 ++ io-package.json | 5 ++++- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5f5f3d0..0eaae149 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,8 @@ Door and window states: ## Changelog +### 0.0.63 +- Fix VW/Skoda etron login ### 0.0.62 - Fix Audi etron login ### 0.0.61 diff --git a/io-package.json b/io-package.json index 6580e5e3..3bd02b9e 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.0.62", + "version": "0.0.63", "news": { + "0.0.63:": { + "en": "Fix VW/Skoda login" + }, "0.0.62:": { "en": "Fix Audi etron login" }, diff --git a/package.json b/package.json index b078dfd1..38abc097 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.62" + "version": "0.0.63" } From a575d9b0917f2169540828f05c073d571027dcdb Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 15 Mar 2023 23:26:55 +0100 Subject: [PATCH 533/729] adjust skoda second --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index a9a000f2..826ad6bd 100644 --- a/main.js +++ b/main.js @@ -1140,8 +1140,12 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "skodae") { const parsedParameters = qs.parse(hash); this.config.atoken = parsedParameters.access_token; + let systemId = "TECHNICAL" + if ( this.clientId === "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com") { + systemId = "CONNECT" + } method = "POST"; - url = "https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId=TECHNICAL"; + url = "https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId="+systemId; body = JSON.stringify({ authorizationCode: parsedParameters.code, }); From 4268b54febe0344fbbf31ad492c38b2008c2bf9b Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 19 Mar 2023 21:07:34 +0100 Subject: [PATCH 534/729] add rawjson --- main.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/main.js b/main.js index 826ad6bd..45aed549 100644 --- a/main.js +++ b/main.js @@ -2636,6 +2636,25 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); try { this.extractKeys(this, vin + ".charging", body.status); + if (this.config.rawJson) { + this.setObjectNotExistsAsync(vin + ".charging" + "rawJson", { + type: "state", + common: { + name: vin + ".charging" + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }) + .then(() => { + this.setState(vin + ".charging" + "rawJson", JSON.stringify(body.status), true); + }) + .catch((error) => { + this.log.error(error); + }); + } } catch (err) { this.log.error(err); } From 57e5a77f68bb5d89e555cb32f94b190f8df6fe3f Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 4 Apr 2023 07:46:24 +0200 Subject: [PATCH 535/729] fix original cupra login --- README.md | 2 + admin/index_m.html | 323 +++++++++++++++++++++++---------------------- io-package.json | 33 +---- main.js | 150 +++++++++++++++------ package-lock.json | 310 ++++++++++++++++++++----------------------- package.json | 12 +- 6 files changed, 431 insertions(+), 399 deletions(-) diff --git a/README.md b/README.md index 0eaae149..d0dc36c1 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,8 @@ Door and window states: ## Changelog +### 0.0.65 +- Fix Cupra login ### 0.0.63 - Fix VW/Skoda etron login ### 0.0.62 diff --git a/admin/index_m.html b/admin/index_m.html index 52099fff..96e42363 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -1,169 +1,178 @@ - - - - + + + + - - + + - - - + + + - - - + + + - - + // This will be called by the admin adapter when the user presses the save button + function save(callback) { + // example: select elements with class=value and build settings object + var obj = {}; + $(".value").each(function () { + var $this = $(this); + if ($this.attr("type") === "checkbox") { + obj[$this.attr("id")] = $this.prop("checked"); + } else { + obj[$this.attr("id")] = $this.val(); + } + }); + callback(obj); + } + + - -
-
-
- -
-
+ +
+
+
+ +
+
- + - -
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - - Auswahl der abzurufenden Fahrdaten (Trips) -
-
- - -
-
- - Lizenzinformationen laden -
-
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + + Auswahl der abzurufenden Fahrdaten (Trips) +
+
+ + +
+
+ + Lizenzinformationen laden +
+
-
-
- - Position in Adresse umwandeln (nur Auswählen, wenn es genutzt wird) -
-
-
-
- - Rohe JSON speichern -
-
+
+
+ + Position in Adresse umwandeln (nur Auswählen, wenn es genutzt wird) +
+
+
+
+ + Rohe JSON speichern
- +
+
+ diff --git a/io-package.json b/io-package.json index 3bd02b9e..ecc85d45 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.0.63", + "version": "0.0.66", "news": { + "0.0.65:": { + "en": "Fix Cupra login. Add Alternative Login for Cupra", + "de": "Fix Cupra login. Eine Alternative für Cupra Login hinzugefügt" + }, "0.0.63:": { "en": "Fix VW/Skoda login" }, @@ -36,33 +40,6 @@ }, "0.0.48": { "en": "fix login, fix audi update, add limit for wallbox" - }, - "0.0.47": { - "en": "add audi standheizung" - }, - "0.0.46": { - "en": "add audi dataplug" - }, - "0.0.45": { - "en": "improve refresh token" - }, - "0.0.44": { - "en": "increase refreshToken timeouts" - }, - "0.0.42": { - "en": "fix Skoda Login" - }, - "0.0.41": { - "en": "fix VWv2 refreshToken" - }, - "0.0.40": { - "en": "add climate v3 for newer cars. Add Powerpass and Seat Elli" - }, - "0.0.39": { - "en": "fix id logn" - }, - "0.0.36": { - "en": "add Skoda Enyaq support" } }, "title": "VW Connect", diff --git a/main.js b/main.js index 45aed549..9dd251be 100644 --- a/main.js +++ b/main.js @@ -185,6 +185,17 @@ class VwWeconnect extends utils.Adapter { this.xappversion = "1.1.29"; this.xappname = "SEATConnect"; } + if (this.config.type === "seatcupra2") { + this.type = "Seat"; + this.clientId = "30e33736-c537-4c72-ab60-74a7b92cfe83@apps_vw-dilab_com"; + this.scope = "openid profile address phone email birthdate nationalIdentifier cars mbb dealers badge nationality"; + this.redirect = "cupraconnect://identity-kit/login"; + this.responseType = "code id_token token"; + this.xappversion = "1.1.29"; + + this.xclientId = "9d183b70-d129-424f-9a26-c3778edf95e1"; + this.xappname = "SEATConnect"; + } if (this.config.type === "vwv2") { this.type = "VW"; this.country = "DE"; @@ -457,7 +468,8 @@ class VwWeconnect extends utils.Adapter { this.config.type === "skodapower" || this.config.type === "audidata" || this.config.type === "audietron" || - this.config.type === "seatcupra" + this.config.type === "seatcupra" || + this.config.type === "seatcupra2" ) { url += "&code_challenge=" + codeChallenge + "&code_challenge_method=S256"; } @@ -1133,19 +1145,24 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "vw" || this.config.type === "vwv2") { body += "&code_verifier=" + code_verifier; } else { - const brand = this.config.type === "skodae" ? "skoda" : this.config.type; - + let brand = this.config.type === "skodae" ? "skoda" : this.config.type; + if (this.config.type === "seatcupra2") { + brand = "cupra"; + } body += "&brand=" + brand; } + if (this.config.type === "seatcupra2") { + body += "&code_verifier=" + code_verifier; + } if (this.config.type === "skodae") { const parsedParameters = qs.parse(hash); this.config.atoken = parsedParameters.access_token; - let systemId = "TECHNICAL" - if ( this.clientId === "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com") { - systemId = "CONNECT" + let systemId = "TECHNICAL"; + if (this.clientId === "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com") { + systemId = "CONNECT"; } method = "POST"; - url = "https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId="+systemId; + url = "https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId=" + systemId; body = JSON.stringify({ authorizationCode: parsedParameters.code, }); @@ -1394,7 +1411,7 @@ class VwWeconnect extends utils.Adapter { }, form: { grant_type: "id_token", - token: jwtid_token, + token: jwtid_token || tokens.id_token, scope: "sc2:fal", }, jar: this.jar, @@ -1440,7 +1457,9 @@ class VwWeconnect extends utils.Adapter { let body = "refresh_token=" + rtoken; let form = ""; let brand = this.config.type === "skodae" ? "skoda" : this.config.type; - + if (this.config.type === "seatcupra2") { + brand = "cupra"; + } if (this.config.type === "vwv2") { brand = "vw"; } @@ -1581,7 +1600,7 @@ class VwWeconnect extends utils.Adapter { } getPersonalData() { - return new Promise((resolve, reject) => { + return new Promise(async (resolve, reject) => { if ( this.config.type === "audi" || this.config.type === "go" || @@ -1595,40 +1614,68 @@ class VwWeconnect extends utils.Adapter { return; } if (this.config.type === "seatcupra") { - request.get( - { - url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", - headers: { - "user-agent": this.userAgent, - authorization: "Bearer " + this.config.atoken, - accept: "*/*", - }, - followAllRedirects: true, - json: true, - gzip: true, + this.seatcupraUser = await axios({ + method: "get", + url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", + headers: { + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - try { - if (body.sub) { - this.seatcupraUser = body.sub; - resolve(); - } else { - this.log.error("No User ID found"); - reject(); - } - } catch (err) { - this.log.error(err); - reject(); - } + }) + .then((res) => { + return res.data.sub; + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + + resolve(); + return; + } + if (this.config.type === "seatcupra2") { + this.seatcupraUser = await axios({ + method: "get", + url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", + headers: { + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, }, - ); + }) + .then((res) => { + return res.data.sub; + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + if (!this.seatcupraUser) { + resolve(); + return; + } + this.seatcupraBi = await axios({ + method: "get", + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.seatcupraUser + "/personalData", + headers: { + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + }, + }) + .then((res) => { + return res.data.businessIdentifierValue; + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + + resolve(); return; } @@ -1874,6 +1921,18 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, }; } + if (this.config.type === "seatcupra2") { + url = + "https://mal-1a.prd.ece.vwg-connect.com/api/usermanagement/users/v2/users/" + this.seatcupraBi + "/vehicles"; + // @ts-ignore + headers = { + accept: "application/json", + "content-type": "application/json;charset=utf-8", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.vwatoken, + }; + } request( { method: method, @@ -2241,8 +2300,13 @@ class VwWeconnect extends utils.Adapter { } const vehicles = body.userVehicles.vehicle; this.log.info(`Found ${vehicles.length} vehicles`); - vehicles.forEach((vehicle) => { + vehicles.forEach((vehicleObject) => { + let vehicle = vehicleObject; + if (vehicleObject.content) { + vehicle = vehicleObject.content; + } this.vinArray.push(vehicle); + this.setObjectNotExists(vehicle, { type: "device", common: { diff --git a/package-lock.json b/package-lock.json index 08cf3184..d7b5701a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "iobroker.vw-connect", - "version": "0.0.62", + "version": "0.0.66", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.62", + "version": "0.0.66", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^2.6.7", - "@peculiar/webcrypto": "^1.4.1", + "@iobroker/adapter-core": "^2.6.8", + "@peculiar/webcrypto": "^1.4.3", "axios": "^0.27.2", "json-bigint": "^1.0.0", "ngeohash": "^0.6.3", - "qs": "^6.11.0", + "qs": "^6.11.1", "request": "^2.88.2", "traverse": "^0.6.7", "uuid": "^9.0.0" @@ -24,13 +24,13 @@ "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.14.2", + "@types/node": "^18.15.11", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.35.0", + "eslint": "^8.37.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", @@ -42,15 +42,39 @@ "node": ">=10.0.0" } }, + "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.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", - "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.1", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -66,9 +90,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", - "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz", + "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -108,9 +132,9 @@ "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.7.tgz", - "integrity": "sha512-yDTmWjnsQ+DXRQVnQK97CXXMMs01H3Pl82DSqfx7dYj7RKoUenD75a0xY4QQdHZXG9SIhjNttXVEln0lWvOamA==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.8.tgz", + "integrity": "sha512-xrqtH5RYZ6BvEcDyfuPkajd9el4R6p0VLRYKlnfMafAbxybIN+zfeHvjGI4l8OAHkyP2tcv6boX2Vu0KnMFOHw==", "dependencies": { "@types/iobroker": "^4.0.5" } @@ -167,9 +191,9 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz", - "integrity": "sha512-6GptMYDMyWBHTUKndHaDsRZUO/XMSgIns2krxcm2L7SEExRHwawFvSwNBhqNPR9HJwv3MruAiF1bhN0we6j6GQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", + "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", "dependencies": { "asn1js": "^3.0.5", "pvtsutils": "^1.3.2", @@ -188,15 +212,15 @@ } }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz", - "integrity": "sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz", + "integrity": "sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A==", "dependencies": { - "@peculiar/asn1-schema": "^2.3.0", + "@peculiar/asn1-schema": "^2.3.6", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.2", - "tslib": "^2.4.1", - "webcrypto-core": "^1.7.4" + "tslib": "^2.5.0", + "webcrypto-core": "^1.7.7" }, "engines": { "node": ">=10.12.0" @@ -276,9 +300,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.2.tgz", - "integrity": "sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==" + "version": "18.15.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -869,13 +893,15 @@ } }, "node_modules/eslint": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", - "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz", + "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^2.0.0", - "@eslint/js": "8.35.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.37.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -886,9 +912,8 @@ "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", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -910,7 +935,6 @@ "minimatch": "^3.1.2", "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" @@ -950,40 +974,16 @@ "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==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/glob-parent": { @@ -999,14 +999,14 @@ } }, "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.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2135,9 +2135,9 @@ } }, "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.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", "dependencies": { "side-channel": "^1.0.4" }, @@ -2189,18 +2189,6 @@ "node": ">=8.10.0" } }, - "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/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -2567,9 +2555,9 @@ } }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -2672,11 +2660,11 @@ } }, "node_modules/webcrypto-core": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", - "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.7.tgz", + "integrity": "sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g==", "dependencies": { - "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/asn1-schema": "^2.3.6", "@peculiar/json-schema": "^1.1.12", "asn1js": "^3.0.1", "pvtsutils": "^1.3.2", @@ -2801,15 +2789,30 @@ } }, "dependencies": { + "@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.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "dev": true + }, "@eslint/eslintrc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", - "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.1", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -2819,9 +2822,9 @@ } }, "@eslint/js": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", - "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz", + "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==", "dev": true }, "@humanwhocodes/config-array": { @@ -2848,9 +2851,9 @@ "dev": true }, "@iobroker/adapter-core": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.7.tgz", - "integrity": "sha512-yDTmWjnsQ+DXRQVnQK97CXXMMs01H3Pl82DSqfx7dYj7RKoUenD75a0xY4QQdHZXG9SIhjNttXVEln0lWvOamA==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.8.tgz", + "integrity": "sha512-xrqtH5RYZ6BvEcDyfuPkajd9el4R6p0VLRYKlnfMafAbxybIN+zfeHvjGI4l8OAHkyP2tcv6boX2Vu0KnMFOHw==", "requires": { "@types/iobroker": "^4.0.5" } @@ -2898,9 +2901,9 @@ } }, "@peculiar/asn1-schema": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz", - "integrity": "sha512-6GptMYDMyWBHTUKndHaDsRZUO/XMSgIns2krxcm2L7SEExRHwawFvSwNBhqNPR9HJwv3MruAiF1bhN0we6j6GQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", + "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", "requires": { "asn1js": "^3.0.5", "pvtsutils": "^1.3.2", @@ -2916,15 +2919,15 @@ } }, "@peculiar/webcrypto": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz", - "integrity": "sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz", + "integrity": "sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A==", "requires": { - "@peculiar/asn1-schema": "^2.3.0", + "@peculiar/asn1-schema": "^2.3.6", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.2", - "tslib": "^2.4.1", - "webcrypto-core": "^1.7.4" + "tslib": "^2.5.0", + "webcrypto-core": "^1.7.7" } }, "@sinonjs/commons": { @@ -3003,9 +3006,9 @@ "dev": true }, "@types/node": { - "version": "18.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.2.tgz", - "integrity": "sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==" + "version": "18.15.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" }, "@types/proxyquire": { "version": "1.3.28", @@ -3458,13 +3461,15 @@ "dev": true }, "eslint": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", - "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz", + "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==", "dev": true, "requires": { - "@eslint/eslintrc": "^2.0.0", - "@eslint/js": "8.35.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.37.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -3475,9 +3480,8 @@ "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", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3499,7 +3503,6 @@ "minimatch": "^3.1.2", "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" @@ -3533,38 +3536,21 @@ "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.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "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.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" } }, "esquery": { @@ -4423,9 +4409,9 @@ "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" }, "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", + "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", "requires": { "side-channel": "^1.0.4" } @@ -4454,12 +4440,6 @@ "picomatch": "^2.2.1" } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -4709,9 +4689,9 @@ "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==" }, "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, "tunnel-agent": { "version": "0.6.0", @@ -4783,11 +4763,11 @@ } }, "webcrypto-core": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.5.tgz", - "integrity": "sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.7.tgz", + "integrity": "sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g==", "requires": { - "@peculiar/asn1-schema": "^2.1.6", + "@peculiar/asn1-schema": "^2.3.6", "@peculiar/json-schema": "^1.1.12", "asn1js": "^3.0.1", "pvtsutils": "^1.3.2", diff --git a/package.json b/package.json index 38abc097..6c50e8cb 100644 --- a/package.json +++ b/package.json @@ -18,12 +18,12 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^2.6.7", - "@peculiar/webcrypto": "^1.4.1", + "@iobroker/adapter-core": "^2.6.8", + "@peculiar/webcrypto": "^1.4.3", "axios": "^0.27.2", "json-bigint": "^1.0.0", "ngeohash": "^0.6.3", - "qs": "^6.11.0", + "qs": "^6.11.1", "request": "^2.88.2", "traverse": "^0.6.7", "uuid": "^9.0.0" @@ -35,13 +35,13 @@ "@types/chai": "^4.3.4", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^9.1.1", - "@types/node": "^18.14.2", + "@types/node": "^18.15.11", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.13", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.35.0", + "eslint": "^8.37.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", @@ -78,5 +78,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.63" + "version": "0.0.66" } From e142a437d6f3bd37e567f7b844d0e3c2bb0bd000 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 8 Apr 2023 15:55:44 +0200 Subject: [PATCH 536/729] 0.0.67 --- io-package.json | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/io-package.json b/io-package.json index ecc85d45..f445aad6 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.66", + "version": "0.0.67", "news": { - "0.0.65:": { + "0.0.67:": { "en": "Fix Cupra login. Add Alternative Login for Cupra", "de": "Fix Cupra login. Eine Alternative für Cupra Login hinzugefügt" }, diff --git a/package-lock.json b/package-lock.json index d7b5701a..5812a9f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.66", + "version": "0.0.67", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.66", + "version": "0.0.67", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.8", diff --git a/package.json b/package.json index 6c50e8cb..71cd81a7 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.66" + "version": "0.0.67" } From efa4091212b05c1c4b678dc953184b642d2809bd Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 17 Jun 2023 02:01:26 +0200 Subject: [PATCH 537/729] fix audi login --- io-package.json | 6 +- main.js | 41 +-- package-lock.json | 624 ++++++++++++++++++++++++++++------------------ package.json | 21 +- 4 files changed, 428 insertions(+), 264 deletions(-) diff --git a/io-package.json b/io-package.json index f445aad6..b827330d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.0.67", + "version": "0.0.70", "news": { + "0.0.70": { + "en": "Fix Audi Login", + "de": "Fix Audi Login" + }, "0.0.67:": { "en": "Fix Cupra login. Add Alternative Login for Cupra", "de": "Fix Cupra login. Eine Alternative für Cupra Login hinzugefügt" diff --git a/main.js b/main.js index 9dd251be..93d7d6f4 100644 --- a/main.js +++ b/main.js @@ -18,7 +18,7 @@ const traverse = require("traverse"); const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); const axios = require("axios").default; -const Json2iob = require("./lib/json2iob"); +const Json2iob = require("json2iob"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -209,18 +209,19 @@ class VwWeconnect extends utils.Adapter { this.xappname = "We Connect"; } if (this.config.type === "audi") { - this.type = "Audi"; - this.country = "DE"; - this.clientId = "09b6cbec-cd19-4589-82fd-363dfa8c24da@apps_vw-dilab_com"; - this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; - this.scope = - "address profile badge birthdate birthplace nationalIdentifier nationality profession email vin phone nickname name picture mbb gallery openid"; - this.redirect = "myaudi:///"; - this.xrequest = "de.myaudi.mobile.assistant"; - this.responseType = "token%20id_token"; - // this.responseType = "code"; - this.xappversion = "3.22.0"; - this.xappname = "myAudi"; + this.config.type = "audietron"; + // this.type = "Audi"; + // this.country = "DE"; + // this.clientId = "09b6cbec-cd19-4589-82fd-363dfa8c24da@apps_vw-dilab_com"; + // this.xclientId = "77869e21-e30a-4a92-b016-48ab7d3db1d8"; + // this.scope = + // "address profile badge birthdate birthplace nationalIdentifier nationality profession email vin phone nickname name picture mbb gallery openid"; + // this.redirect = "myaudi:///"; + // this.xrequest = "de.myaudi.mobile.assistant"; + // this.responseType = "token%20id_token"; + // // this.responseType = "code"; + // this.xappversion = "3.22.0"; + // this.xappname = "myAudi"; } if (this.config.type === "audietron") { this.type = "Audi"; @@ -2576,7 +2577,11 @@ class VwWeconnect extends utils.Adapter { data[key] = res.data[key]; } else { for (const subkey in res.data[key]) { - data[subkey] = res.data[key][subkey].value || {}; + if (data[subkey]) { + data[key + "_" + subkey] = res.data[key][subkey].value || {}; + } else { + data[subkey] = res.data[key][subkey].value || {}; + } } } } @@ -2887,6 +2892,9 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, }; if (status.path === "position/vehicles") { + if (this.secondAccessToken === "blocked") { + continue; + } if (!this.secondAccessToken) { this.log.warn("Missing second auth token for parking position"); continue; @@ -2923,6 +2931,11 @@ class VwWeconnect extends utils.Adapter { } }) .catch((error) => { + if (status.path === "position/vehicles") { + this.log.warn("Parking position failed. Blocked until restart"); + this.secondAccessToken = "blocked"; + return; + } if (error.response) { if (error.response.status === 304) { this.log.debug("304 No values updated"); diff --git a/package-lock.json b/package-lock.json index 5812a9f2..ba4d79a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,42 +1,43 @@ { "name": "iobroker.vw-connect", - "version": "0.0.67", + "version": "0.0.70", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.67", + "version": "0.0.70", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.8", "@peculiar/webcrypto": "^1.4.3", - "axios": "^0.27.2", + "axios": "^1.4.0", "json-bigint": "^1.0.0", + "json2iob": "^2.4.4", "ngeohash": "^0.6.3", - "qs": "^6.11.1", + "qs": "^6.11.2", "request": "^2.88.2", "traverse": "^0.6.7", "uuid": "^9.0.0" }, "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.4", + "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", - "@types/mocha": "^9.1.1", - "@types/node": "^18.15.11", + "@types/mocha": "^10.0.1", + "@types/node": "^20.3.1", "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.13", + "@types/sinon": "^10.0.15", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.37.0", + "eslint": "^8.43.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^14.0.2", + "sinon": "^15.1.2", "sinon-chai": "^3.7.0", - "typescript": "~4.9.5" + "typescript": "~5.1.3" }, "engines": { "node": ">=10.0.0" @@ -67,14 +68,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -90,18 +91,18 @@ } }, "node_modules/@eslint/js": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz", - "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "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", @@ -155,6 +156,74 @@ "sinon-chai": "^3.7.0" } }, + "node_modules/@iobroker/testing/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@iobroker/testing/node_modules/@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@iobroker/testing/node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@iobroker/testing/node_modules/@sinonjs/samsam": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", + "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "node_modules/@iobroker/testing/node_modules/sinon": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", + "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^7.0.1", + "diff": "^5.0.0", + "nise": "^5.1.2", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/@iobroker/testing/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/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -227,36 +296,27 @@ } }, "node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.1.0.tgz", + "integrity": "sha512-w1qd368vtrwttm1PRJWPW1QHlbmHrVDGs1eBH/jZvRPUFS4MNXV9Q33EQdjOdeAxZ7O8+3wM7zxztm2nfUSyKw==", "dev": true, "dependencies": { - "type-detect": "4.0.8" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@sinonjs/samsam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", - "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", "dev": true, "dependencies": { "@sinonjs/commons": "^2.0.0", @@ -264,6 +324,15 @@ "type-detect": "^4.0.8" } }, + "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/@sinonjs/text-encoding": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", @@ -271,9 +340,9 @@ "dev": true }, "node_modules/@types/chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", + "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", "dev": true }, "node_modules/@types/chai-as-promised": { @@ -294,15 +363,15 @@ } }, "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", "dev": true }, "node_modules/@types/node": { - "version": "18.15.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", - "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", + "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -311,9 +380,9 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.13", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.13.tgz", - "integrity": "sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ==", + "version": "10.0.15", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz", + "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -336,9 +405,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -492,12 +561,13 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "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.4.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", + "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", "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/axios/node_modules/form-data": { @@ -893,16 +963,16 @@ } }, "node_modules/eslint": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz", - "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.37.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.43.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -911,9 +981,9 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -921,13 +991,12 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "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", @@ -962,9 +1031,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.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -972,12 +1041,15 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -999,14 +1071,14 @@ } }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1347,10 +1419,10 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "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/har-schema": { @@ -1602,12 +1674,6 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "node_modules/js-sdsl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", - "dev": true - }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1654,6 +1720,14 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "node_modules/json2iob": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.4.tgz", + "integrity": "sha512-GXw2dLiVv69X+soXcKjWPnK95uadrm7nQYamDlDf0IXrf76wysJD+8dl1E+n+9cMWHrSYP6PV7BP59IPETtHAQ==", + "dependencies": { + "json-bigint": "^1.0.0" + } + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -1894,31 +1968,22 @@ } }, "node_modules/nise": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.3.tgz", - "integrity": "sha512-U597iWTTBBYIV72986jyU382/MMZ70ApWcRmkoF1AZ75bpqOtI3Gugv/6+0jLgoDOabmcSwYBkSSAWIp1eA5cg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", + "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", "dev": true, "dependencies": { "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^7.0.4", + "@sinonjs/fake-timers": "^10.0.2", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" } }, - "node_modules/nise/node_modules/@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/nise/node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "node_modules/nise/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -2094,6 +2159,11 @@ "node": ">= 0.8.0" } }, + "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==" + }, "node_modules/proxyquire": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", @@ -2135,9 +2205,9 @@ } }, "node_modules/qs": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", - "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dependencies": { "side-channel": "^1.0.4" }, @@ -2388,16 +2458,16 @@ } }, "node_modules/sinon": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", - "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", + "version": "15.1.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.1.2.tgz", + "integrity": "sha512-uG1pU54Fis4EfYOPoEi13fmRHgZNg/u+3aReSEzHsN52Bpf+bMVfsBQS5MjouI+rTuG6UBIINlpuuO2Epr7SiA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^7.0.1", - "diff": "^5.0.0", - "nise": "^5.1.2", + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.1.0", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", "supports-color": "^7.2.0" }, "funding": { @@ -2415,6 +2485,15 @@ "sinon": ">=4.0.0" } }, + "node_modules/sinon/node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/sinon/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2609,16 +2688,16 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", + "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/universalify": { @@ -2805,14 +2884,14 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -2822,15 +2901,15 @@ } }, "@eslint/js": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz", - "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "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", @@ -2872,6 +2951,71 @@ "mocha": "^10.0.0", "sinon": "^14.0.0", "sinon-chai": "^3.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + } + } + }, + "@sinonjs/samsam": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", + "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^2.0.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "sinon": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", + "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", + "dev": true, + "requires": { + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@sinonjs/samsam": "^7.0.1", + "diff": "^5.0.0", + "nise": "^5.1.2", + "supports-color": "^7.2.0" + } + }, + "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" + } + } } }, "@nodelib/fs.scandir": { @@ -2931,43 +3075,43 @@ } }, "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.1.0.tgz", + "integrity": "sha512-w1qd368vtrwttm1PRJWPW1QHlbmHrVDGs1eBH/jZvRPUFS4MNXV9Q33EQdjOdeAxZ7O8+3wM7zxztm2nfUSyKw==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - } + "@sinonjs/commons": "^3.0.0" } }, "@sinonjs/samsam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", - "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", "dev": true, "requires": { "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + } } }, "@sinonjs/text-encoding": { @@ -2977,9 +3121,9 @@ "dev": true }, "@types/chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", + "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", "dev": true }, "@types/chai-as-promised": { @@ -3000,15 +3144,15 @@ } }, "@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", "dev": true }, "@types/node": { - "version": "18.15.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", - "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", + "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" }, "@types/proxyquire": { "version": "1.3.28", @@ -3017,9 +3161,9 @@ "dev": true }, "@types/sinon": { - "version": "10.0.13", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.13.tgz", - "integrity": "sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ==", + "version": "10.0.15", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz", + "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -3042,9 +3186,9 @@ "dev": true }, "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true }, "acorn-jsx": { @@ -3156,12 +3300,13 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "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.4.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", + "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", "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" }, "dependencies": { "form-data": { @@ -3461,16 +3606,16 @@ "dev": true }, "eslint": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz", - "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.37.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.43.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -3479,9 +3624,9 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3489,13 +3634,12 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "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", @@ -3527,9 +3671,9 @@ "requires": {} }, "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.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -3537,20 +3681,20 @@ } }, "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true }, "espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" } }, "esquery": { @@ -3795,10 +3939,10 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "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 }, "har-schema": { @@ -3979,12 +4123,6 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "js-sdsl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", - "dev": true - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -4028,6 +4166,14 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json2iob": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.4.tgz", + "integrity": "sha512-GXw2dLiVv69X+soXcKjWPnK95uadrm7nQYamDlDf0IXrf76wysJD+8dl1E+n+9cMWHrSYP6PV7BP59IPETtHAQ==", + "requires": { + "json-bigint": "^1.0.0" + } + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -4218,36 +4364,25 @@ "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" }, "nise": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.3.tgz", - "integrity": "sha512-U597iWTTBBYIV72986jyU382/MMZ70ApWcRmkoF1AZ75bpqOtI3Gugv/6+0jLgoDOabmcSwYBkSSAWIp1eA5cg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", + "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", "dev": true, "requires": { "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^7.0.4", + "@sinonjs/fake-timers": "^10.0.2", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" }, "dependencies": { - "@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - } + "type-detect": "4.0.8" } } } @@ -4374,6 +4509,11 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "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==" + }, "proxyquire": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", @@ -4409,9 +4549,9 @@ "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" }, "qs": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", - "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "requires": { "side-channel": "^1.0.4" } @@ -4571,19 +4711,25 @@ } }, "sinon": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", - "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", + "version": "15.1.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.1.2.tgz", + "integrity": "sha512-uG1pU54Fis4EfYOPoEi13fmRHgZNg/u+3aReSEzHsN52Bpf+bMVfsBQS5MjouI+rTuG6UBIINlpuuO2Epr7SiA==", "dev": true, "requires": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^7.0.1", - "diff": "^5.0.0", - "nise": "^5.1.2", + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.1.0", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", "supports-color": "^7.2.0" }, "dependencies": { + "diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4728,9 +4874,9 @@ "dev": true }, "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", + "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", "dev": true }, "universalify": { diff --git a/package.json b/package.json index 71cd81a7..fff619df 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,11 @@ "dependencies": { "@iobroker/adapter-core": "^2.6.8", "@peculiar/webcrypto": "^1.4.3", - "axios": "^0.27.2", + "axios": "^1.4.0", "json-bigint": "^1.0.0", + "json2iob": "^2.4.4", "ngeohash": "^0.6.3", - "qs": "^6.11.1", + "qs": "^6.11.2", "request": "^2.88.2", "traverse": "^0.6.7", "uuid": "^9.0.0" @@ -32,22 +33,22 @@ "description": "Adapter for VW Connect", "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.4", + "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", - "@types/mocha": "^9.1.1", - "@types/node": "^18.15.11", + "@types/mocha": "^10.0.1", + "@types/node": "^20.3.1", "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.13", + "@types/sinon": "^10.0.15", "@types/sinon-chai": "^3.2.9", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.37.0", + "eslint": "^8.43.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^14.0.2", + "sinon": "^15.1.2", "sinon-chai": "^3.7.0", - "typescript": "~4.9.5" + "typescript": "~5.1.3" }, "engines": { "node": ">=10.0.0" @@ -78,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.67" + "version": "0.0.70" } From 177de4d00d3cec9fdbceadcef498c7ba0868c52d Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 17 Jun 2023 02:03:13 +0200 Subject: [PATCH 538/729] fix test --- .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 3872ef90..8f45d123 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -40,7 +40,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [20.x, 16.x, 18.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: From 80c1903cd80d1752bb54492d2a1859fece958f39 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 17 Jun 2023 08:22:12 +0200 Subject: [PATCH 539/729] 0.0.71 --- io-package.json | 4 ++-- main.js | 5 +++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/io-package.json b/io-package.json index b827330d..fab22b66 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.0.70", + "version": "0.0.71", "news": { - "0.0.70": { + "0.0.71": { "en": "Fix Audi Login", "de": "Fix Audi Login" }, diff --git a/main.js b/main.js index 93d7d6f4..169e88b1 100644 --- a/main.js +++ b/main.js @@ -18,7 +18,7 @@ const traverse = require("traverse"); const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); const axios = require("axios").default; -const Json2iob = require("json2iob"); +const Json2iob = require("./lib/json2iob"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -209,6 +209,7 @@ class VwWeconnect extends utils.Adapter { this.xappname = "We Connect"; } if (this.config.type === "audi") { + this.log.info("Login in with audi as audietron"); this.config.type = "audietron"; // this.type = "Audi"; // this.country = "DE"; @@ -5609,7 +5610,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); } } else { - this.log.error(JSON.stringify(body)); + -this.log.error(JSON.stringify(body)); } }, ); diff --git a/package-lock.json b/package-lock.json index ba4d79a5..4005c7d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.70", + "version": "0.0.71", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.70", + "version": "0.0.71", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.8", diff --git a/package.json b/package.json index fff619df..8791bf5b 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.70" + "version": "0.0.71" } From 9d339f30380d99e51a2084144b7945705b68f1b9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 2 Jul 2023 23:25:51 +0200 Subject: [PATCH 540/729] 0.0.72 --- io-package.json | 6 +++++- main.js | 23 +++++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/io-package.json b/io-package.json index fab22b66..88114a8b 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.0.71", + "version": "0.0.72", "news": { + "0.0.72": { + "en": "Redirect Seat to Seat Cupra #2 Login", + "de": "Seat auf Seat Cupra #2 Login umgeleitet" + }, "0.0.71": { "en": "Fix Audi Login", "de": "Fix Audi Login" diff --git a/main.js b/main.js index 169e88b1..c4774079 100644 --- a/main.js +++ b/main.js @@ -165,16 +165,18 @@ class VwWeconnect extends utils.Adapter { this.xappname = "cz.skodaauto.connect"; } if (this.config.type === "seat") { - this.type = "Seat"; - this.country = "ES"; - this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; - this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; - this.scope = "openid profile mbb cars birthdate nickname address phone"; - this.redirect = "seatconnect://identity-kit/login"; - this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token"; - this.xappversion = "1.1.29"; - this.xappname = "SEATConnect"; + // this.type = "Seat"; + // this.country = "ES"; + // this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; + // this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; + // this.scope = "openid profile mbb cars birthdate nickname address phone"; + // this.redirect = "seatconnect://identity-kit/login"; + // this.xrequest = "cz.skodaauto.connect"; + // this.responseType = "code%20id_token"; + // this.xappversion = "1.1.29"; + // this.xappname = "SEATConnect"; + this.log.info("Login as SeatCupra #2"); + this.config.type = "seatcupra2"; } if (this.config.type === "seatcupra") { this.type = "Seat"; @@ -1285,6 +1287,7 @@ class VwWeconnect extends utils.Adapter { (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failed to get token"); + this.log.error("Please try an alternative type like Seat Cupra#2 or Etron"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); diff --git a/package-lock.json b/package-lock.json index 4005c7d0..949124df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.0.71", + "version": "0.0.72", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.71", + "version": "0.0.72", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^2.6.8", diff --git a/package.json b/package.json index 8791bf5b..57244aad 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.71" + "version": "0.0.72" } From 61ee679139535468af80ed10fb78910a2a320b61 Mon Sep 17 00:00:00 2001 From: Martijn Poppen <7694138+martijnpoppen@users.noreply.github.com> Date: Sat, 22 Jul 2023 18:42:25 +0200 Subject: [PATCH 541/729] FIX: vw to ID | FIX: seat to seatcupra VW is changing their API to 1 app. Same as for Audi :) --- main.js | 70 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/main.js b/main.js index c4774079..ae1c44aa 100644 --- a/main.js +++ b/main.js @@ -128,18 +128,6 @@ class VwWeconnect extends utils.Adapter { this.responseType = "id_token%20token%20code"; this.xappversion = "5.1.2"; this.xappname = "eRemote"; - if (this.config.type === "id") { - this.type = "Id"; - this.country = "DE"; - this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid profile badge cars dealers birthdate vin"; - this.redirect = "weconnect://authenticated"; - this.xrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - this.xappversion = ""; - this.xappname = ""; - } if (this.config.type === "skoda") { this.type = "Skoda"; this.country = "CZ"; @@ -165,18 +153,18 @@ class VwWeconnect extends utils.Adapter { this.xappname = "cz.skodaauto.connect"; } if (this.config.type === "seat") { - // this.type = "Seat"; - // this.country = "ES"; - // this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; - // this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; - // this.scope = "openid profile mbb cars birthdate nickname address phone"; - // this.redirect = "seatconnect://identity-kit/login"; - // this.xrequest = "cz.skodaauto.connect"; - // this.responseType = "code%20id_token"; - // this.xappversion = "1.1.29"; - // this.xappname = "SEATConnect"; - this.log.info("Login as SeatCupra #2"); - this.config.type = "seatcupra2"; + this.log.info("Login in with seat as seatcupra"); + this.config.type = "seatcupra"; + // this.type = "Seat"; + // this.country = "ES"; + // this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; + // this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; + // this.scope = "openid profile mbb cars birthdate nickname address phone"; + // this.redirect = "seatconnect://identity-kit/login"; + // this.xrequest = "cz.skodaauto.connect"; + // this.responseType = "code%20id_token"; + // this.xappversion = "1.1.29"; + // this.xappname = "SEATConnect"; } if (this.config.type === "seatcupra") { this.type = "Seat"; @@ -199,16 +187,30 @@ class VwWeconnect extends utils.Adapter { this.xappname = "SEATConnect"; } if (this.config.type === "vwv2") { - this.type = "VW"; - this.country = "DE"; - this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; - this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; - this.scope = "openid profile mbb cars birthdate nickname address phone"; - this.redirect = "carnet://identity-kit/login"; - this.xrequest = "de.volkswagen.car-net.eu.e-remote"; - this.responseType = "id_token%20token%20code"; - this.xappversion = "5.6.7"; - this.xappname = "We Connect"; + this.log.info("Login in with vwv2 as id"); + this.config.type = "id"; + // this.type = "VW"; + // this.country = "DE"; + // this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; + // this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; + // this.scope = "openid profile mbb cars birthdate nickname address phone"; + // this.redirect = "carnet://identity-kit/login"; + // this.xrequest = "de.volkswagen.car-net.eu.e-remote"; + // this.responseType = "id_token%20token%20code"; + // this.xappversion = "5.6.7"; + // this.xappname = "We Connect"; + } + if (this.config.type === "id") { + this.type = "Id"; + this.country = "DE"; + this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile badge cars dealers birthdate vin"; + this.redirect = "weconnect://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + this.xappversion = ""; + this.xappname = ""; } if (this.config.type === "audi") { this.log.info("Login in with audi as audietron"); From 29c0958b3753f299c4ae2655b76cd39df1710443 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Jul 2023 20:28:57 +0200 Subject: [PATCH 542/729] add consent text --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index c4774079..6d699872 100644 --- a/main.js +++ b/main.js @@ -685,7 +685,9 @@ class VwWeconnect extends utils.Adapter { form.relayState = parsedJson.templateModel.relayState; form.legalDocuments = parsedJson.templateModel.legalDocuments; } catch (error) { - this.log.error("Error in consent form"); + this.log.error( + "Error in consent form. Please accept the Data Privacy Statement in the app after relogin", + ); this.log.error(error); reject(); return; From 1af98a389b85a24762f2e6a16e1f07c32e239dab Mon Sep 17 00:00:00 2001 From: Martijn Poppen <7694138+martijnpoppen@users.noreply.github.com> Date: Mon, 24 Jul 2023 09:34:48 +0200 Subject: [PATCH 543/729] FIX: revert VW to vwv2 --- main.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/main.js b/main.js index 614c1564..284ed70c 100644 --- a/main.js +++ b/main.js @@ -187,18 +187,18 @@ class VwWeconnect extends utils.Adapter { this.xappname = "SEATConnect"; } if (this.config.type === "vwv2") { - this.log.info("Login in with vwv2 as id"); - this.config.type = "id"; - // this.type = "VW"; - // this.country = "DE"; - // this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; - // this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; - // this.scope = "openid profile mbb cars birthdate nickname address phone"; - // this.redirect = "carnet://identity-kit/login"; - // this.xrequest = "de.volkswagen.car-net.eu.e-remote"; - // this.responseType = "id_token%20token%20code"; - // this.xappversion = "5.6.7"; - // this.xappname = "We Connect"; + // this.log.info("Login in with vwv2 as id"); + // this.config.type = "id"; + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; + this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; + this.scope = "openid profile mbb cars birthdate nickname address phone"; + this.redirect = "carnet://identity-kit/login"; + this.xrequest = "de.volkswagen.car-net.eu.e-remote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.6.7"; + this.xappname = "We Connect"; } if (this.config.type === "id") { this.type = "Id"; From 20fcd64ac35d0b524691fdb85b2eb4f37a39d8d7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 5 Aug 2023 23:40:16 +0200 Subject: [PATCH 544/729] add audi climate --- main.js | 142 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 96 insertions(+), 46 deletions(-) diff --git a/main.js b/main.js index 284ed70c..428a37ca 100644 --- a/main.js +++ b/main.js @@ -18,7 +18,7 @@ const traverse = require("traverse"); const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); const axios = require("axios").default; -const Json2iob = require("./lib/json2iob"); +const Json2iob = require("json2iob"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -153,18 +153,18 @@ class VwWeconnect extends utils.Adapter { this.xappname = "cz.skodaauto.connect"; } if (this.config.type === "seat") { - this.log.info("Login in with seat as seatcupra"); - this.config.type = "seatcupra"; - // this.type = "Seat"; - // this.country = "ES"; - // this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; - // this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; - // this.scope = "openid profile mbb cars birthdate nickname address phone"; - // this.redirect = "seatconnect://identity-kit/login"; - // this.xrequest = "cz.skodaauto.connect"; - // this.responseType = "code%20id_token"; - // this.xappversion = "1.1.29"; - // this.xappname = "SEATConnect"; + this.log.info("Login in with seat as seatcupra"); + this.config.type = "seatcupra"; + // this.type = "Seat"; + // this.country = "ES"; + // this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; + // this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; + // this.scope = "openid profile mbb cars birthdate nickname address phone"; + // this.redirect = "seatconnect://identity-kit/login"; + // this.xrequest = "cz.skodaauto.connect"; + // this.responseType = "code%20id_token"; + // this.xappversion = "1.1.29"; + // this.xappname = "SEATConnect"; } if (this.config.type === "seatcupra") { this.type = "Seat"; @@ -187,30 +187,30 @@ class VwWeconnect extends utils.Adapter { this.xappname = "SEATConnect"; } if (this.config.type === "vwv2") { - // this.log.info("Login in with vwv2 as id"); - // this.config.type = "id"; - this.type = "VW"; - this.country = "DE"; - this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; - this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; - this.scope = "openid profile mbb cars birthdate nickname address phone"; - this.redirect = "carnet://identity-kit/login"; - this.xrequest = "de.volkswagen.car-net.eu.e-remote"; - this.responseType = "id_token%20token%20code"; - this.xappversion = "5.6.7"; - this.xappname = "We Connect"; + // this.log.info("Login in with vwv2 as id"); + // this.config.type = "id"; + this.type = "VW"; + this.country = "DE"; + this.clientId = "9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com"; + this.xclientId = "89312f5d-b853-4965-a471-b0859ee468af"; + this.scope = "openid profile mbb cars birthdate nickname address phone"; + this.redirect = "carnet://identity-kit/login"; + this.xrequest = "de.volkswagen.car-net.eu.e-remote"; + this.responseType = "id_token%20token%20code"; + this.xappversion = "5.6.7"; + this.xappname = "We Connect"; } if (this.config.type === "id") { - this.type = "Id"; - this.country = "DE"; - this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid profile badge cars dealers birthdate vin"; - this.redirect = "weconnect://authenticated"; - this.xrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - this.xappversion = ""; - this.xappname = ""; + this.type = "Id"; + this.country = "DE"; + this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; + this.xclientId = ""; + this.scope = "openid profile badge cars dealers birthdate vin"; + this.redirect = "weconnect://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + this.xappversion = ""; + this.xappname = ""; } if (this.config.type === "audi") { this.log.info("Login in with audi as audietron"); @@ -236,8 +236,9 @@ class VwWeconnect extends utils.Adapter { "address badge birthdate birthplace email gallery mbb name nationalIdentifier nationality nickname phone picture profession profile vin openid"; this.redirect = "myaudi:///"; this.responseType = "code"; - this.xappversion = "3.22.0"; + this.xappversion = "4.14.1"; this.xappname = "myAudi"; + this.xclientId = "59edf286-a9ca-4d34-9421-68da00f72dc8"; } if (this.config.type === "audidata") { this.type = "Audi"; @@ -318,6 +319,8 @@ class VwWeconnect extends utils.Adapter { if (this.config.type !== "go") { this.vinArray.forEach((vin) => { if (this.config.type === "id" || this.config.type === "audietron") { + this.getHomeRegion(vin); + this.getIdStatus(vin).catch(() => { this.log.error("get id status Failed"); }); @@ -1087,13 +1090,16 @@ class VwWeconnect extends utils.Adapter { reject(); return; } + if (this.config.type === "audi") { + this.getVWToken({}, jwtid_token, reject, resolve); + return; + } this.aaztoken = JSON.parse(resp.body); this.refreshTokenInterval && clearInterval(this.refreshTokenInterval); this.refreshTokenInterval = setInterval(() => { this.refreshTokenv2().catch(() => {}); }, 0.9 * 60 * 60 * 1000); // 0.9hours - - resolve(); + this.getVWToken({}, idktokens.id_token, reject, resolve); }, ); }, @@ -1311,7 +1317,7 @@ class VwWeconnect extends utils.Adapter { } getVWToken(tokens, jwtid_token, reject, resolve) { - if (this.config.type !== "audi") { + if (this.config.type !== "audi" && this.config.type !== "audietron") { if (this.config.type === "id") { if (this.type === "Wc") { this.config.wc_access_token = tokens.wc_access_token; @@ -1366,8 +1372,10 @@ class VwWeconnect extends utils.Adapter { this.secondAccessToken = this.config.atoken; this.secondRefreshToken = this.config.rtoken; } - this.config.atoken = tokens.access_token || tokens.accessToken; - this.config.rtoken = tokens.refresh_token || tokens.refreshToken; + if (Object.keys(tokens).length > 0) { + this.config.atoken = tokens.access_token || tokens.accessToken; + this.config.rtoken = tokens.refresh_token || tokens.refreshToken; + } if (this.config.type === "seatelli" || this.config.type === "skodapower") { this.config.atoken = tokens.token; } @@ -1402,7 +1410,6 @@ class VwWeconnect extends utils.Adapter { this.config.type === "seatcupra" || this.config.type === "seatelli" || this.config.type === "skodapower" || - this.config.type === "audietron" || this.config.type === "audidata" ) { resolve(); @@ -2287,6 +2294,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.refresh", { + type: "state", + common: { + name: "Refresh", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vin + ".remote.climatisation", { type: "state", @@ -2298,6 +2315,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.climatisationv3", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); }); resolve(); return; @@ -2564,7 +2591,30 @@ class VwWeconnect extends utils.Adapter { this.log.debug(error); // error.response && this.log.error(JSON.stringify(error.response.data)); }); - + if (this.config.vwatoken) { + await axios({ + method: "get", + url: "https://mal-3a.prd.eu.dp.vwg-connect.com/api/bs/climatisation/v1/vehicles/" + vin + "/climater", + headers: { + "content-type": "application/json", + Accept: "application/json", + authorization: "Bearer " + this.config.vwatoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + "X-Client-Id": this.xclientId, + "X-App-Version": this.xappversion, + "X-App-Name": this.xappname, + }, + }) + .then((res) => { + this.json2iob.parse(vin, res.data); + }) + .catch((error) => { + this.log.debug(error); + // error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } await axios({ method: "get", url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/selectivestatus?jobs=all", @@ -5024,7 +5074,7 @@ class VwWeconnect extends utils.Adapter { } } if (action === "climatisation" || action === "climatisationv2" || action === "climatisationv3") { - if (this.config.type === "id" || this.config.type === "audietron") { + if ((this.config.type === "id" || this.config.type === "audietron") && action !== "climatisationv3") { const value = state.val ? "start" : "stop"; this.setIdRemote(vin, action, value).catch(() => { this.log.error("failed set state " + action); @@ -5059,14 +5109,14 @@ class VwWeconnect extends utils.Adapter { if (action === "climatisationv3") { const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); let heaterSource = "electric"; - if (heaterSourceState.val) { + if (heaterSourceState && heaterSourceState.val) { heaterSource = heaterSourceState.val; } const isMirrorHeatingEnabledState = await this.getStateAsync( vin + ".climater.settings.climaterElementSettings.isMirrorHeatingEnabled.content", ); let isMirror = true; - if (isMirrorHeatingEnabledState.val) { + if (isMirrorHeatingEnabledState && isMirrorHeatingEnabledState.val) { isMirror = isMirrorHeatingEnabledState.val; } const tagetTempState = await this.getStateAsync(vin + ".climater.settings.targetTemperature.content"); From 67961090616c3aa306b78519fc97af08be5753fa Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 15 Aug 2023 10:23:40 +0200 Subject: [PATCH 545/729] add check --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 428a37ca..93bdd427 100644 --- a/main.js +++ b/main.js @@ -5121,7 +5121,7 @@ class VwWeconnect extends utils.Adapter { } const tagetTempState = await this.getStateAsync(vin + ".climater.settings.targetTemperature.content"); let targetTemp = 2950; - if (tagetTempState.val) { + if (tagetTempState && tagetTempState.val) { targetTemp = tagetTempState.val; } From f3e6bdbe9ac105ca7196e284dba0d43ba3deccf5 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 1 Sep 2023 15:44:57 +0200 Subject: [PATCH 546/729] fix userid retrival --- main.js | 199 +++++++++++++++++++++++++------------------------------- 1 file changed, 87 insertions(+), 112 deletions(-) diff --git a/main.js b/main.js index 93bdd427..764ee6ef 100644 --- a/main.js +++ b/main.js @@ -1615,125 +1615,100 @@ class VwWeconnect extends utils.Adapter { }); } - getPersonalData() { - return new Promise(async (resolve, reject) => { - if ( - this.config.type === "audi" || - this.config.type === "go" || - this.config.type === "audidata" || - this.config.type === "audietron" || - this.config.type === "id" || - this.config.type === "seatelli" || - this.config.type === "skodapower" - ) { - resolve(); - return; - } - if (this.config.type === "seatcupra") { - this.seatcupraUser = await axios({ - method: "get", - url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", - headers: { - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - }, + async getPersonalData() { + if ( + this.config.type === "audi" || + this.config.type === "go" || + this.config.type === "audidata" || + this.config.type === "audietron" || + this.config.type === "id" || + this.config.type === "seatelli" || + this.config.type === "skodapower" + ) { + return; + } + if (this.config.type === "seatcupra") { + this.seatcupraUser = await axios({ + method: "get", + url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", + headers: { + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + }, + }) + .then((res) => { + return res.data.sub; }) - .then((res) => { - return res.data.sub; - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); - resolve(); - return; - } - if (this.config.type === "seatcupra2") { - this.seatcupraUser = await axios({ - method: "get", - url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", - headers: { - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - }, - }) - .then((res) => { - return res.data.sub; - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); - if (!this.seatcupraUser) { - resolve(); - return; - } - this.seatcupraBi = await axios({ - method: "get", - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.seatcupraUser + "/personalData", - headers: { - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - }, + return; + } + if (this.config.type === "seatcupra2") { + this.seatcupraUser = await axios({ + method: "get", + url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", + headers: { + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + }, + }) + .then((res) => { + return res.data.sub; }) - .then((res) => { - return res.data.businessIdentifierValue; - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); - - resolve(); + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + if (!this.seatcupraUser) { return; } - - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/personalData", - headers: { - "user-agent": this.userAgent, - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io", - }, - followAllRedirects: true, + this.seatcupraBi = await axios({ + method: "get", + url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.seatcupraUser + "/personalData", + headers: { + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - const data = JSON.parse(body); - this.config.identifier = data.businessIdentifierValue; - this.json2iob.parse("personal", data, { forceIndex: true }); + }) + .then((res) => { + return res.data.businessIdentifierValue; + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - }, - ); - }); + return; + } + + this.log.debug("getData"); + await axios({ + method: "post", + url: + "https://profileintegrityservice.apps.emea.vwapps.io/iaa/pic/v1/users/" + this.config.userid + "/check-profile", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + Authorization: this.config.atoken, + }, + data: { scopeId: "commonMandatoryFields" }, + }) + .then((res) => { + this.log.info(JSON.stringify(res.data)); + this.config.identifier = res.data.mbbUserId; + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); } getHomeRegion(vin) { return new Promise((resolve, reject) => { From 2d657d3636ac1aca3076aecd8f253351c535a891 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 1 Sep 2023 16:04:03 +0200 Subject: [PATCH 547/729] fix cupra2 --- main.js | 161 ++++++++++++++++---------------------------------------- 1 file changed, 46 insertions(+), 115 deletions(-) diff --git a/main.js b/main.js index 764ee6ef..21604c16 100644 --- a/main.js +++ b/main.js @@ -1648,47 +1648,47 @@ class VwWeconnect extends utils.Adapter { return; } - if (this.config.type === "seatcupra2") { - this.seatcupraUser = await axios({ - method: "get", - url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", - headers: { - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - }, - }) - .then((res) => { - return res.data.sub; - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); - if (!this.seatcupraUser) { - return; - } - this.seatcupraBi = await axios({ - method: "get", - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.seatcupraUser + "/personalData", - headers: { - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - }, - }) - .then((res) => { - return res.data.businessIdentifierValue; - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); - - return; - } + // if (this.config.type === "seatcupra2") { + // this.seatcupraUser = await axios({ + // method: "get", + // url: "https://identity-userinfo.vwgroup.io/oidc/userinfo", + // headers: { + // accept: "*/*", + // authorization: "Bearer " + this.config.atoken, + // "accept-language": "de-DE,de;q=0.9", + // "user-agent": this.userAgent, + // }, + // }) + // .then((res) => { + // return res.data.sub; + // }) + // .catch((error) => { + // this.log.error(error); + // error.response && this.log.error(JSON.stringify(error.response.data)); + // }); + // if (!this.seatcupraUser) { + // return; + // } + // this.config.identifier = await axios({ + // method: "get", + // url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.seatcupraUser + "/personalData", + // headers: { + // accept: "*/*", + // authorization: "Bearer " + this.config.atoken, + // "accept-language": "de-DE,de;q=0.9", + // "user-agent": this.userAgent, + // }, + // }) + // .then((res) => { + // return res.data.businessIdentifierValue; + // }) + // .catch((error) => { + // this.log.error(error); + // error.response && this.log.error(JSON.stringify(error.response.data)); + // }); + + // return; + // } this.log.debug("getData"); await axios({ @@ -1758,65 +1758,6 @@ class VwWeconnect extends utils.Adapter { ); }); } - getCarData() { - return new Promise((resolve, reject) => { - this.log.debug("getData"); - request.get( - { - url: "https://customer-profile.apps.emea.vwapps.io/v1/customers/" + this.config.userid + "/realCarData", - headers: { - "user-agent": this.userAgent, - "X-App-version": this.xappversion, - "X-App-name": this.xappname, - authorization: "Bearer " + this.config.atoken, - accept: "application/json", - Host: "customer-profile.apps.emea.vwapps.io", - }, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - reject(); - return; - } - try { - if (body.error) { - this.log.error(JSON.stringify(body.error)); - reject(); - } - this.log.debug(JSON.stringify(body)); - const data = JSON.parse(body); - Object.keys(data).forEach((key) => { - this.setObjectNotExistsAsync("car." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: "mixed", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState("car." + key, data[key], true); - }) - .catch((error) => { - this.log.error(error); - }); - }); - - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - }, - ); - }); - } getVehicles() { return new Promise((resolve, reject) => { @@ -1826,9 +1767,10 @@ class VwWeconnect extends utils.Adapter { } let method = "get"; let body = {}; - let url = this.replaceVarInUrl( - "https://msg.volkswagen.de/fs-car/usermanagement/users/v1/$type/$country/vehicles", - ); + let url = + "https://mal-3a.prd.eu.dp.vwg-connect.com/api/usermanagement/users/v2/users/" + + this.config.identifier + + "/vehicles"; let headers = { "User-Agent": this.userAgent, "X-App-Version": this.xappversion, @@ -1912,18 +1854,7 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, }; } - if (this.config.type === "seatcupra2") { - url = - "https://mal-1a.prd.ece.vwg-connect.com/api/usermanagement/users/v2/users/" + this.seatcupraBi + "/vehicles"; - // @ts-ignore - headers = { - accept: "application/json", - "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.vwatoken, - }; - } + request( { method: method, From 610c38af4b66cbc2875b03154da09059554c913a Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 1 Sep 2023 19:14:46 +0200 Subject: [PATCH 548/729] 0.10 --- io-package.json | 6 +- main.js | 3 +- package-lock.json | 381 +++++++++++++++++++++++----------------------- package.json | 20 +-- 4 files changed, 205 insertions(+), 205 deletions(-) diff --git a/io-package.json b/io-package.json index 88114a8b..0a54115c 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.0.72", + "version": "0.1.0", "news": { + "0.1.0": { + "en": "Fix VW Login", + "de": "Fix VW Login" + }, "0.0.72": { "en": "Redirect Seat to Seat Cupra #2 Login", "de": "Seat auf Seat Cupra #2 Login umgeleitet" diff --git a/main.js b/main.js index 21604c16..82546aa0 100644 --- a/main.js +++ b/main.js @@ -1623,7 +1623,8 @@ class VwWeconnect extends utils.Adapter { this.config.type === "audietron" || this.config.type === "id" || this.config.type === "seatelli" || - this.config.type === "skodapower" + this.config.type === "skodapower" || + this.config.type === "skodae" ) { return; } diff --git a/package-lock.json b/package-lock.json index 949124df..5ca70a46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "iobroker.vw-connect", - "version": "0.0.72", + "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.0.72", + "version": "0.1.0", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^2.6.8", + "@iobroker/adapter-core": "^3.0.3", "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.4.0", + "axios": "^1.5.0", "json-bigint": "^1.0.0", - "json2iob": "^2.4.4", + "json2iob": "^2.4.6", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", @@ -25,24 +25,33 @@ "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^10.0.1", - "@types/node": "^20.3.1", + "@types/node": "^20.5.7", "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.15", + "@types/sinon": "^10.0.16", "@types/sinon-chai": "^3.2.9", - "chai": "^4.3.7", + "chai": "^4.3.8", "chai-as-promised": "^7.1.1", - "eslint": "^8.43.0", + "eslint": "^8.48.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^15.1.2", + "sinon": "^15.2.0", "sinon-chai": "^3.7.0", - "typescript": "~5.1.3" + "typescript": "~5.2.2" }, "engines": { "node": ">=10.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/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -59,23 +68,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", - "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", + "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "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", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -91,9 +100,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", - "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", + "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" @@ -133,11 +142,11 @@ "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.8.tgz", - "integrity": "sha512-xrqtH5RYZ6BvEcDyfuPkajd9el4R6p0VLRYKlnfMafAbxybIN+zfeHvjGI4l8OAHkyP2tcv6boX2Vu0KnMFOHw==", - "dependencies": { - "@types/iobroker": "^4.0.5" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.3.tgz", + "integrity": "sha512-SZmL69BtUXitnTbidNjlljQKB6CbkBLK9+Tqo/NMsOqHb1RmhPCNKhO4F5o8jc0dW0J6d4VArXryUkL7Ru0WpA==", + "peerDependencies": { + "@iobroker/types": "^5.0.11" } }, "node_modules/@iobroker/testing": { @@ -224,6 +233,15 @@ "node": ">=8" } }, + "node_modules/@iobroker/types": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-5.0.12.tgz", + "integrity": "sha512-zExHvDhSyjgSioJYB8BQa1LvmtiZjn0ThJfaKP+jH9tx7ddyK/irI5cqjR0Y6DUpx0x9BkaDI9utuPVbRWzYLQ==", + "peer": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -305,9 +323,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.1.0.tgz", - "integrity": "sha512-w1qd368vtrwttm1PRJWPW1QHlbmHrVDGs1eBH/jZvRPUFS4MNXV9Q33EQdjOdeAxZ7O8+3wM7zxztm2nfUSyKw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0" @@ -354,14 +372,6 @@ "@types/chai": "*" } }, - "node_modules/@types/iobroker": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.5.tgz", - "integrity": "sha512-D1tJwuDQEQQQ/cZVFjFjFUhUuMxJbfrz5U2UooiZwhgs69D/t8IowMvBI6Lk4ZR8HnCSxYwWHVRKyQnEMNgJPA==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/mocha": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", @@ -369,9 +379,10 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.3.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" + "version": "20.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", + "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", + "dev": true }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -380,9 +391,9 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.15", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz", - "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==", + "version": "10.0.16", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", + "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -405,9 +416,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", - "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", + "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" @@ -561,9 +572,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -681,9 +692,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", + "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", @@ -963,27 +974,27 @@ } }, "node_modules/eslint": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", - "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", + "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.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.43.0", + "@eslint-community/regexpp": "^4.6.1", + "@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", - "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.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -993,7 +1004,6 @@ "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", @@ -1003,9 +1013,8 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -1031,9 +1040,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "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", @@ -1047,9 +1056,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "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" @@ -1071,12 +1080,12 @@ } }, "node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "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.4.1" }, @@ -1155,7 +1164,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": { @@ -1399,9 +1408,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" @@ -1721,9 +1730,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json2iob": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.4.tgz", - "integrity": "sha512-GXw2dLiVv69X+soXcKjWPnK95uadrm7nQYamDlDf0IXrf76wysJD+8dl1E+n+9cMWHrSYP6PV7BP59IPETtHAQ==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.6.tgz", + "integrity": "sha512-39bbOEnODUBkbsMWnNNQGlGg+f7aGdQYN0g4f1Tkyf5Gkuz+N231AaGSInU0VpTlgeq+sFHwx2l8c14T6vA/SQ==", "dependencies": { "json-bigint": "^1.0.0" } @@ -2024,17 +2033,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" @@ -2458,13 +2467,13 @@ } }, "node_modules/sinon": { - "version": "15.1.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.1.2.tgz", - "integrity": "sha512-uG1pU54Fis4EfYOPoEi13fmRHgZNg/u+3aReSEzHsN52Bpf+bMVfsBQS5MjouI+rTuG6UBIINlpuuO2Epr7SiA==", + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", + "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^10.1.0", + "@sinonjs/fake-timers": "^10.3.0", "@sinonjs/samsam": "^8.0.0", "diff": "^5.1.0", "nise": "^5.1.4", @@ -2688,9 +2697,9 @@ } }, "node_modules/typescript": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", - "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2765,15 +2774,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/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -2868,6 +2868,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 + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -2878,20 +2884,20 @@ } }, "@eslint-community/regexpp": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", - "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", + "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", "dev": true }, "@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "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", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -2901,9 +2907,9 @@ } }, "@eslint/js": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", - "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", + "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": { @@ -2930,12 +2936,10 @@ "dev": true }, "@iobroker/adapter-core": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.8.tgz", - "integrity": "sha512-xrqtH5RYZ6BvEcDyfuPkajd9el4R6p0VLRYKlnfMafAbxybIN+zfeHvjGI4l8OAHkyP2tcv6boX2Vu0KnMFOHw==", - "requires": { - "@types/iobroker": "^4.0.5" - } + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.3.tgz", + "integrity": "sha512-SZmL69BtUXitnTbidNjlljQKB6CbkBLK9+Tqo/NMsOqHb1RmhPCNKhO4F5o8jc0dW0J6d4VArXryUkL7Ru0WpA==", + "requires": {} }, "@iobroker/testing": { "version": "4.1.0", @@ -3018,6 +3022,12 @@ } } }, + "@iobroker/types": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-5.0.12.tgz", + "integrity": "sha512-zExHvDhSyjgSioJYB8BQa1LvmtiZjn0ThJfaKP+jH9tx7ddyK/irI5cqjR0Y6DUpx0x9BkaDI9utuPVbRWzYLQ==", + "peer": true + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3084,9 +3094,9 @@ } }, "@sinonjs/fake-timers": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.1.0.tgz", - "integrity": "sha512-w1qd368vtrwttm1PRJWPW1QHlbmHrVDGs1eBH/jZvRPUFS4MNXV9Q33EQdjOdeAxZ7O8+3wM7zxztm2nfUSyKw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "requires": { "@sinonjs/commons": "^3.0.0" @@ -3135,14 +3145,6 @@ "@types/chai": "*" } }, - "@types/iobroker": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.5.tgz", - "integrity": "sha512-D1tJwuDQEQQQ/cZVFjFjFUhUuMxJbfrz5U2UooiZwhgs69D/t8IowMvBI6Lk4ZR8HnCSxYwWHVRKyQnEMNgJPA==", - "requires": { - "@types/node": "*" - } - }, "@types/mocha": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", @@ -3150,9 +3152,10 @@ "dev": true }, "@types/node": { - "version": "20.3.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" + "version": "20.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", + "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", + "dev": true }, "@types/proxyquire": { "version": "1.3.28", @@ -3161,9 +3164,9 @@ "dev": true }, "@types/sinon": { - "version": "10.0.15", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz", - "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==", + "version": "10.0.16", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", + "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -3186,9 +3189,9 @@ "dev": true }, "acorn": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", - "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true }, "acorn-jsx": { @@ -3300,9 +3303,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -3398,9 +3401,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", + "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -3606,27 +3609,27 @@ "dev": true }, "eslint": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", - "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", + "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.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.43.0", + "@eslint-community/regexpp": "^4.6.1", + "@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", - "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.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3636,7 +3639,6 @@ "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", @@ -3646,9 +3648,8 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "dependencies": { @@ -3671,9 +3672,9 @@ "requires": {} }, "eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "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", @@ -3681,18 +3682,18 @@ } }, "eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "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": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "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.4.1" } @@ -3750,7 +3751,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": { @@ -3925,9 +3926,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" @@ -4167,9 +4168,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json2iob": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.4.tgz", - "integrity": "sha512-GXw2dLiVv69X+soXcKjWPnK95uadrm7nQYamDlDf0IXrf76wysJD+8dl1E+n+9cMWHrSYP6PV7BP59IPETtHAQ==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.6.tgz", + "integrity": "sha512-39bbOEnODUBkbsMWnNNQGlGg+f7aGdQYN0g4f1Tkyf5Gkuz+N231AaGSInU0VpTlgeq+sFHwx2l8c14T6vA/SQ==", "requires": { "json-bigint": "^1.0.0" } @@ -4413,17 +4414,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": { @@ -4711,13 +4712,13 @@ } }, "sinon": { - "version": "15.1.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.1.2.tgz", - "integrity": "sha512-uG1pU54Fis4EfYOPoEi13fmRHgZNg/u+3aReSEzHsN52Bpf+bMVfsBQS5MjouI+rTuG6UBIINlpuuO2Epr7SiA==", + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", + "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", "dev": true, "requires": { "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^10.1.0", + "@sinonjs/fake-timers": "^10.3.0", "@sinonjs/samsam": "^8.0.0", "diff": "^5.1.0", "nise": "^5.1.4", @@ -4874,9 +4875,9 @@ "dev": true }, "typescript": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", - "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, "universalify": { @@ -4929,12 +4930,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 - }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/package.json b/package.json index 57244aad..0db95d62 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,11 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^2.6.8", + "@iobroker/adapter-core": "^3.0.3", "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.4.0", + "axios": "^1.5.0", "json-bigint": "^1.0.0", - "json2iob": "^2.4.4", + "json2iob": "^2.4.6", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", @@ -36,19 +36,19 @@ "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^10.0.1", - "@types/node": "^20.3.1", + "@types/node": "^20.5.7", "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.15", + "@types/sinon": "^10.0.16", "@types/sinon-chai": "^3.2.9", - "chai": "^4.3.7", + "chai": "^4.3.8", "chai-as-promised": "^7.1.1", - "eslint": "^8.43.0", + "eslint": "^8.48.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^15.1.2", + "sinon": "^15.2.0", "sinon-chai": "^3.7.0", - "typescript": "~5.1.3" + "typescript": "~5.2.2" }, "engines": { "node": ">=10.0.0" @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.0.72" + "version": "0.1.0" } From 6af6e63466e114067594d442c61f4fc9bc7df89b Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 2 Sep 2023 08:08:30 +0200 Subject: [PATCH 549/729] fix old skoda --- main.js | 208 +++++++++++++++++++++++++++----------------------------- 1 file changed, 102 insertions(+), 106 deletions(-) diff --git a/main.js b/main.js index 82546aa0..ad5e102b 100644 --- a/main.js +++ b/main.js @@ -312,69 +312,54 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.getPersonalData() - .then(() => { - this.getVehicles() - .then(() => { - if (this.config.type !== "go") { - this.vinArray.forEach((vin) => { - if (this.config.type === "id" || this.config.type === "audietron") { - this.getHomeRegion(vin); - - this.getIdStatus(vin).catch(() => { - this.log.error("get id status Failed"); - }); - } else if (this.config.type === "seatcupra") { - this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get cupra status Failed"); - }); - } else if (this.config.type === "audidata") { - this.getAudiDataStatus(vin).catch(() => { - this.log.error("get audi data status Failed"); + this.getPersonalData().then(() => { + this.getVehicles() + .then(() => { + if (this.config.type !== "go") { + this.vinArray.forEach((vin) => { + if (this.config.type === "id" || this.config.type === "audietron") { + this.getHomeRegion(vin); + + this.getIdStatus(vin).catch(() => { + this.log.error("get id status Failed"); + }); + } else if (this.config.type === "seatcupra") { + this.getSeatCupraStatus(vin).catch(() => { + this.log.error("get cupra status Failed"); + }); + } else if (this.config.type === "audidata") { + this.getAudiDataStatus(vin).catch(() => { + this.log.error("get audi data status Failed"); + }); + } else if (this.config.type === "skodae") { + this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; + this.scope = "openid dealers profile email cars address"; + this.redirect = "skodaconnect://oidc.login/"; + + this.login() + .then(() => { + this.getSkodaEStatus(vin); + }) + .catch(() => { + this.log.error("Failed second skoda login"); }); - } else if (this.config.type === "skodae") { - this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; - this.scope = "openid dealers profile email cars address"; - this.redirect = "skodaconnect://oidc.login/"; - - this.login() - .then(() => { - this.getSkodaEStatus(vin); - }) - .catch(() => { - this.log.error("Failed second skoda login"); + } else { + this.getHomeRegion(vin) + .catch(() => { + this.log.debug("get home region Failed " + vin); + }) + .finally(() => { + this.getVehicleData(vin).catch(() => { + this.log.error("get vehicle data Failed"); }); - } else { - this.getHomeRegion(vin) - .catch(() => { - this.log.debug("get home region Failed " + vin); - }) - .finally(() => { - this.getVehicleData(vin).catch(() => { - this.log.error("get vehicle data Failed"); - }); - this.getVehicleRights(vin).catch(() => { - this.log.error("get vehicle rights Failed"); - }); - this.requestStatusUpdate(vin) - .finally(() => { - this.statesArray.forEach((state) => { - if (state.path == "tripdata") { - this.tripTypes.forEach((tripType) => { - this.getVehicleStatus( - vin, - state.url, - state.path, - state.element, - state.element2, - state.element3, - state.element4, - tripType, - ).catch(() => { - this.log.debug("error while getting " + state.url); - }); - }); - } else { + this.getVehicleRights(vin).catch(() => { + this.log.error("get vehicle rights Failed"); + }); + this.requestStatusUpdate(vin) + .finally(() => { + this.statesArray.forEach((state) => { + if (state.path == "tripdata") { + this.tripTypes.forEach((tripType) => { this.getVehicleStatus( vin, state.url, @@ -383,56 +368,67 @@ class VwWeconnect extends utils.Adapter { state.element2, state.element3, state.element4, + tripType, ).catch(() => { this.log.debug("error while getting " + state.url); }); - } - }); - }) - .catch(() => { - this.log.error("status update Failed " + vin); + }); + } else { + this.getVehicleStatus( + vin, + state.url, + state.path, + state.element, + state.element2, + state.element3, + state.element4, + ).catch(() => { + this.log.debug("error while getting " + state.url); + }); + } }); - }) - .catch(() => { - this.log.error("Error getting home region"); - }); - } - }); - } + }) + .catch(() => { + this.log.error("status update Failed " + vin); + }); + }) + .catch(() => { + this.log.error("Error getting home region"); + }); + } + }); + } - this.updateInterval = setInterval(() => { - this.updateStatus(); - }, this.config.interval * 60 * 1000); + this.updateInterval = setInterval(() => { + this.updateStatus(); + }, this.config.interval * 60 * 1000); - if (this.config.type !== "id" && this.config.type !== "skodae" && this.config.type !== "audietron") { - if (this.config.forceinterval > 0) { - this.fupdateInterval = setInterval(() => { - if (this.config.type === "go") { - this.getVehicles(); - return; - } - this.vinArray.forEach((vin) => { - this.requestStatusUpdate(vin).catch(() => { - this.log.error("force status update Failed"); - }); + if (this.config.type !== "id" && this.config.type !== "skodae" && this.config.type !== "audietron") { + if (this.config.forceinterval > 0) { + this.fupdateInterval = setInterval(() => { + if (this.config.type === "go") { + this.getVehicles(); + return; + } + this.vinArray.forEach((vin) => { + this.requestStatusUpdate(vin).catch(() => { + this.log.error("force status update Failed"); }); - }, this.config.forceinterval * 60 * 1000); - } + }); + }, this.config.forceinterval * 60 * 1000); } + } - if (this.config.type === "seatelli" || this.config.type === "skodapower") { - this.getElliData(this.config.type).catch(() => { - this.log.error("get elli Failed"); - }); - } - }) - .catch(() => { - this.log.error("Get Vehicles Failed"); - }); - }) - .catch(() => { - this.log.error("get personal data Failed"); - }); + if (this.config.type === "seatelli" || this.config.type === "skodapower") { + this.getElliData(this.config.type).catch(() => { + this.log.error("get elli Failed"); + }); + } + }) + .catch(() => { + this.log.error("Get Vehicles Failed"); + }); + }); }) .catch(() => { this.log.error("Login Failed"); @@ -1707,8 +1703,8 @@ class VwWeconnect extends utils.Adapter { this.config.identifier = res.data.mbbUserId; }) .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); + this.log.debug(error); + error.response && this.log.debug(JSON.stringify(error.response.data)); }); } getHomeRegion(vin) { @@ -1833,7 +1829,7 @@ class VwWeconnect extends utils.Adapter { authorization: "Bearer " + this.config.atoken, }; } - if (this.config.type === "skodae") { + if (this.config.type === "skodae" || this.config.type === "skoda") { url = "https://api.connect.skoda-auto.cz/api/v3/garage"; // @ts-ignore headers = { @@ -2078,7 +2074,7 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - if (this.config.type === "skodae") { + if (this.config.type === "skodae" || this.config.type === "skoda") { this.log.info(`Found ${body.vehicles.length} vehicles`); body.vehicles.forEach(async (element) => { const vin = element.vin; From a6481465676e208b48f330afba7218b4d8a58d08 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 2 Sep 2023 08:34:56 +0200 Subject: [PATCH 550/729] adjust normal seat --- main.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index ad5e102b..33661010 100644 --- a/main.js +++ b/main.js @@ -153,18 +153,16 @@ class VwWeconnect extends utils.Adapter { this.xappname = "cz.skodaauto.connect"; } if (this.config.type === "seat") { - this.log.info("Login in with seat as seatcupra"); - this.config.type = "seatcupra"; - // this.type = "Seat"; - // this.country = "ES"; - // this.clientId = "50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com"; - // this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; - // this.scope = "openid profile mbb cars birthdate nickname address phone"; - // this.redirect = "seatconnect://identity-kit/login"; + this.type = "Seat"; + this.country = "ES"; + this.clientId = "3c8e98bc-3ae9-4277-a563-d5ee65ddebba@apps_vw-dilab_com"; + this.xclientId = "9dcc70f0-8e79-423a-a3fa-4065d99088b4"; + this.scope = "openid profile address phone email birthdate nationalIdentifier cars mbb dealers badge nationality"; + this.redirect = "seatconnect://identity-kit/login"; // this.xrequest = "cz.skodaauto.connect"; - // this.responseType = "code%20id_token"; - // this.xappversion = "1.1.29"; - // this.xappname = "SEATConnect"; + this.responseType = "code%20id_token%20token"; + this.xappversion = "1.11.2"; + this.xappname = "SEAT Connect"; } if (this.config.type === "seatcupra") { this.type = "Seat"; From 42a3dbc72e814f43020fcb639eab66e44224225c Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 2 Sep 2023 19:35:55 +0200 Subject: [PATCH 551/729] 0.1.1 --- io-package.json | 5 ++++- package-lock.json | 14 +++++++------- package.json | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/io-package.json b/io-package.json index 0a54115c..fb444854 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.1.0", + "version": "0.1.1", "news": { + "0.1.1": { + "en": "Fix Seat Login" + }, "0.1.0": { "en": "Fix VW Login", "de": "Fix VW Login" diff --git a/package-lock.json b/package-lock.json index 5ca70a46..e8f8bd30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.7", + "@types/node": "^20.5.8", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.16", "@types/sinon-chai": "^3.2.9", @@ -379,9 +379,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", - "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", + "version": "20.5.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.8.tgz", + "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw==", "dev": true }, "node_modules/@types/proxyquire": { @@ -3152,9 +3152,9 @@ "dev": true }, "@types/node": { - "version": "20.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", - "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", + "version": "20.5.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.8.tgz", + "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw==", "dev": true }, "@types/proxyquire": { diff --git a/package.json b/package.json index 0db95d62..9611ac76 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.7", + "@types/node": "^20.5.8", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.16", "@types/sinon-chai": "^3.2.9", From c39a872efc2bc56c138f46fc62e9d681cae6dadf Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 2 Sep 2023 19:36:23 +0200 Subject: [PATCH 552/729] 0.1.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8f8bd30..8dd7b3b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.3", diff --git a/package.json b/package.json index 9611ac76..59bef54c 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.0" + "version": "0.1.1" } From f4cf50cd5ec5fb324bdb583b4a1a071c2874c41f Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 3 Sep 2023 11:48:19 +0200 Subject: [PATCH 553/729] fix json2iob lib --- main.js | 4 ++-- main.test.js | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/main.js b/main.js index 33661010..6b41e82b 100644 --- a/main.js +++ b/main.js @@ -18,7 +18,7 @@ const traverse = require("traverse"); const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); const axios = require("axios").default; -const Json2iob = require("json2iob"); +const Json2iob = require("./lib/json2iob"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -5568,7 +5568,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(err); } } else { - -this.log.error(JSON.stringify(body)); + this.log.error(JSON.stringify(body)); } }, ); diff --git a/main.test.js b/main.test.js index 307b4c62..e46d0f56 100644 --- a/main.test.js +++ b/main.test.js @@ -13,18 +13,17 @@ const { expect } = require("chai"); // import { functionToTest } from "./moduleToTest"; describe("module to test => function to test", () => { - // initializing logic - const expected = 5; - - it(`should return ${expected}`, () => { - const result = 5; - // assign result a value from functionToTest - expect(result).to.equal(expected); - // or using the should() syntax - result.should.equal(expected); - }); - // ... more tests => it + // initializing logic + const expected = 5; + it(`should return ${expected}`, () => { + const result = 5; + // assign result a value from functionToTest + expect(result).to.equal(expected); + // or using the should() syntax + result.should.equal(expected); + }); + // ... more tests => it }); // ... more test suites => describe From 6572c727d75772ea79f6854288164c2f7864eec6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 3 Sep 2023 11:51:10 +0200 Subject: [PATCH 554/729] 0.1.2 --- io-package.json | 5 ++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/io-package.json b/io-package.json index fb444854..7087307e 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.1.1", + "version": "0.1.2", "news": { + "0.1.2": { + "en": "Fix Type Error" + }, "0.1.1": { "en": "Fix Seat Login" }, diff --git a/package-lock.json b/package-lock.json index 8dd7b3b8..0d3a5c82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.3", diff --git a/package.json b/package.json index 59bef54c..34fbf92d 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.1" + "version": "0.1.2" } From 1c8d9b133d893b18c53b7167133e9eeea1ee2a33 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 25 Sep 2023 17:16:27 +0200 Subject: [PATCH 555/729] remove destination --- main.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/main.js b/main.js index 6b41e82b..5de258a2 100644 --- a/main.js +++ b/main.js @@ -83,11 +83,6 @@ class VwWeconnect extends utils.Adapter { element: "StoredVehicleDataResponse", element2: "vehicleData", }, - { - url: "$homeregion/fs-car/destinationfeedservice/mydestinations/v1/$type/$country/vehicles/$vin/destinations", - path: "destinations", - element: "destinations", - }, { url: "$homeregion/fs-car/bs/batterycharge/v1/$type/$country/vehicles/$vin/charger", path: "charger", From d6af9940664239b28c563db9ca1eadf10d6b5ce5 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 26 Sep 2023 08:19:53 +0200 Subject: [PATCH 556/729] 0.1.3 --- io-package.json | 5 +- package-lock.json | 180 +++++++++++++++++++++++----------------------- package.json | 22 +++--- 3 files changed, 107 insertions(+), 100 deletions(-) diff --git a/io-package.json b/io-package.json index 7087307e..5f25969e 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.1.2", + "version": "0.1.3", "news": { + "0.1.3": { + "en": "Remove destination endpoint" + }, "0.1.2": { "en": "Fix Type Error" }, diff --git a/package-lock.json b/package-lock.json index 0d3a5c82..9a02ce46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,41 +1,41 @@ { "name": "iobroker.vw-connect", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.3", "@peculiar/webcrypto": "^1.4.3", "axios": "^1.5.0", "json-bigint": "^1.0.0", - "json2iob": "^2.4.6", + "json2iob": "^2.4.8", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", "traverse": "^0.6.7", - "uuid": "^9.0.0" + "uuid": "^9.0.1" }, "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", + "@types/chai": "^4.3.6", + "@types/chai-as-promised": "^7.1.6", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.8", - "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", + "@types/node": "^20.7.0", + "@types/proxyquire": "^1.3.29", + "@types/sinon": "^10.0.17", + "@types/sinon-chai": "^3.2.10", "chai": "^4.3.8", "chai-as-promised": "^7.1.1", - "eslint": "^8.48.0", + "eslint": "^8.50.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^15.2.0", + "sinon": "^16.0.0", "sinon-chai": "^3.7.0", "typescript": "~5.2.2" }, @@ -100,18 +100,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", @@ -358,15 +358,15 @@ "dev": true }, "node_modules/@types/chai": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", - "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", "dev": true }, "node_modules/@types/chai-as-promised": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", - "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.6.tgz", + "integrity": "sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==", "dev": true, "dependencies": { "@types/chai": "*" @@ -379,30 +379,30 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.5.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.8.tgz", - "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw==", + "version": "20.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.0.tgz", + "integrity": "sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg==", "dev": true }, "node_modules/@types/proxyquire": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", - "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", + "version": "1.3.29", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.29.tgz", + "integrity": "sha512-8/JYXN9NmE4tEGUU/JI7FcvloTu7CxYkb01h4kI+HRvABxwpleLXsvVmOF85LlgEb/xwe+H8MwM4s3ushNuffg==", "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.16", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", - "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", + "version": "10.0.17", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz", + "integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinon-chai": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.9.tgz", - "integrity": "sha512-/19t63pFYU0ikrdbXKBWj9PCdnKyTd0Qkz0X91Ta081cYsq90OxYdcWwK/dwEoDa6dtXgj2HJfmzgq+QZTHdmQ==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.10.tgz", + "integrity": "sha512-D+VFqUjMqeku/FGl4Ioo+fDeWOaIfbZ6Oj+glgFUgz5m5RJ4kgCER3FdV1uvhmEt0A+FRz+juPdybFlg5Hxfow==", "dev": true, "dependencies": { "@types/chai": "*", @@ -974,16 +974,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", @@ -1730,9 +1730,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json2iob": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.6.tgz", - "integrity": "sha512-39bbOEnODUBkbsMWnNNQGlGg+f7aGdQYN0g4f1Tkyf5Gkuz+N231AaGSInU0VpTlgeq+sFHwx2l8c14T6vA/SQ==", + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.8.tgz", + "integrity": "sha512-ldw0UnBIDdTuEiFQgR7A4yYUPjSgIt4IWh/RclSar4rD26oaBByy1cK2f/o5XsmfjkXkoZMJGPqM5SYBrJtlQA==", "dependencies": { "json-bigint": "^1.0.0" } @@ -2467,9 +2467,9 @@ } }, "node_modules/sinon": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", - "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.0.0.tgz", + "integrity": "sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", @@ -2727,9 +2727,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" } @@ -2907,15 +2911,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", @@ -3131,15 +3135,15 @@ "dev": true }, "@types/chai": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", - "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", "dev": true }, "@types/chai-as-promised": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", - "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.6.tgz", + "integrity": "sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==", "dev": true, "requires": { "@types/chai": "*" @@ -3152,30 +3156,30 @@ "dev": true }, "@types/node": { - "version": "20.5.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.8.tgz", - "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw==", + "version": "20.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.0.tgz", + "integrity": "sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg==", "dev": true }, "@types/proxyquire": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.28.tgz", - "integrity": "sha512-SQaNzWQ2YZSr7FqAyPPiA3FYpux2Lqh3HWMZQk47x3xbMCqgC/w0dY3dw9rGqlweDDkrySQBcaScXWeR+Yb11Q==", + "version": "1.3.29", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.29.tgz", + "integrity": "sha512-8/JYXN9NmE4tEGUU/JI7FcvloTu7CxYkb01h4kI+HRvABxwpleLXsvVmOF85LlgEb/xwe+H8MwM4s3ushNuffg==", "dev": true }, "@types/sinon": { - "version": "10.0.16", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", - "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", + "version": "10.0.17", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz", + "integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" } }, "@types/sinon-chai": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.9.tgz", - "integrity": "sha512-/19t63pFYU0ikrdbXKBWj9PCdnKyTd0Qkz0X91Ta081cYsq90OxYdcWwK/dwEoDa6dtXgj2HJfmzgq+QZTHdmQ==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.10.tgz", + "integrity": "sha512-D+VFqUjMqeku/FGl4Ioo+fDeWOaIfbZ6Oj+glgFUgz5m5RJ4kgCER3FdV1uvhmEt0A+FRz+juPdybFlg5Hxfow==", "dev": true, "requires": { "@types/chai": "*", @@ -3609,16 +3613,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", @@ -4168,9 +4172,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json2iob": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.6.tgz", - "integrity": "sha512-39bbOEnODUBkbsMWnNNQGlGg+f7aGdQYN0g4f1Tkyf5Gkuz+N231AaGSInU0VpTlgeq+sFHwx2l8c14T6vA/SQ==", + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.8.tgz", + "integrity": "sha512-ldw0UnBIDdTuEiFQgR7A4yYUPjSgIt4IWh/RclSar4rD26oaBByy1cK2f/o5XsmfjkXkoZMJGPqM5SYBrJtlQA==", "requires": { "json-bigint": "^1.0.0" } @@ -4712,9 +4716,9 @@ } }, "sinon": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", - "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.0.0.tgz", + "integrity": "sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==", "dev": true, "requires": { "@sinonjs/commons": "^3.0.0", @@ -4895,9 +4899,9 @@ } }, "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==" }, "verror": { "version": "1.10.0", diff --git a/package.json b/package.json index 34fbf92d..a7bd00c3 100644 --- a/package.json +++ b/package.json @@ -22,31 +22,31 @@ "@peculiar/webcrypto": "^1.4.3", "axios": "^1.5.0", "json-bigint": "^1.0.0", - "json2iob": "^2.4.6", + "json2iob": "^2.4.8", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", "traverse": "^0.6.7", - "uuid": "^9.0.0" + "uuid": "^9.0.1" }, "deprecated": false, "description": "Adapter for VW Connect", "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", + "@types/chai": "^4.3.6", + "@types/chai-as-promised": "^7.1.6", "@types/mocha": "^10.0.1", - "@types/node": "^20.5.8", - "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.16", - "@types/sinon-chai": "^3.2.9", + "@types/node": "^20.7.0", + "@types/proxyquire": "^1.3.29", + "@types/sinon": "^10.0.17", + "@types/sinon-chai": "^3.2.10", "chai": "^4.3.8", "chai-as-promised": "^7.1.1", - "eslint": "^8.48.0", + "eslint": "^8.50.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^15.2.0", + "sinon": "^16.0.0", "sinon-chai": "^3.7.0", "typescript": "~5.2.2" }, @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.2" + "version": "0.1.3" } From 1896fcfa7267c2c1ec0b6d139111a14bb2406598 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 5 Oct 2023 13:48:56 +0200 Subject: [PATCH 557/729] change wecharge url --- main.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 5de258a2..db4269a4 100644 --- a/main.js +++ b/main.js @@ -1240,7 +1240,7 @@ class VwWeconnect extends utils.Adapter { if (this.type === "Wc") { method = "GET"; url = - "https://wecharge.apps.emea.vwapps.io/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + + "https://prod.emea.cbs.charging.cariad.digital/user-identity/v1/identity/login?redirect_uri=wecharge://authenticated&code=" + jwtauth_code; redirerctUri = "wecharge://authenticated"; headers["x-api-key"] = "yabajourasW9N8sm+9F/oP=="; @@ -3147,7 +3147,7 @@ class VwWeconnect extends utils.Adapter { wc_access_token: this.config.wc_access_token, }; this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/subscriptions", + "https://prod.emea.cbs.charging.cariad.digital/charge-and-pay/v1/user/subscriptions", header, "wecharge.chargeandpay.subscriptions", [404], @@ -3156,7 +3156,7 @@ class VwWeconnect extends utils.Adapter { .then((body) => { body.forEach((subs) => { this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, + "https://prod.emea.cbs.charging.cariad.digital/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, header, "wecharge.chargeandpay.tariffs." + subs.tariff_id, [404], @@ -3181,7 +3181,7 @@ class VwWeconnect extends utils.Adapter { } }); this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", + "https://prod.emea.cbs.charging.cariad.digital/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", header, "wecharge.chargeandpay.records", [404, 500], @@ -3218,7 +3218,7 @@ class VwWeconnect extends utils.Adapter { } }); this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/stations?limit=" + limit, + "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/stations?limit=" + limit, header, "wecharge.homecharging.stations", [404], @@ -3228,7 +3228,7 @@ class VwWeconnect extends utils.Adapter { .then((body) => { body.forEach((station) => { this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions?station_id=" + + "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/sessions?station_id=" + station.id + "&limit=" + limit, @@ -3284,7 +3284,7 @@ class VwWeconnect extends utils.Adapter { }); const dt = new Date(); this.genericRequest( - "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + + "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + dt.toISOString() + "&limit=" + limit, @@ -4740,9 +4740,9 @@ class VwWeconnect extends utils.Adapter { request( { method: "POST", - url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/start", + url: "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/sessions/start", headers: { - Host: "wecharge.apps.emea.vwapps.io", + Host: "prod.emea.cbs.charging.cariad.digital", accept: "application/json", wc_access_token: this.config.wc_access_token, authorization: "Bearer " + this.config.atoken, @@ -4783,9 +4783,12 @@ class VwWeconnect extends utils.Adapter { request( { method: "POST", - url: "https://wecharge.apps.emea.vwapps.io/home-charging/v1/charging/sessions/" + sessionId + "/stop", + url: + "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/sessions/" + + sessionId + + "/stop", headers: { - Host: "wecharge.apps.emea.vwapps.io", + Host: "prod.emea.cbs.charging.cariad.digital", accept: "application/json", wc_access_token: this.config.wc_access_token, authorization: "Bearer " + this.config.atoken, From c90ba77025899db9db776e03c24301e7d88a5f02 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 6 Oct 2023 11:09:06 +0200 Subject: [PATCH 558/729] 0.1.4 --- .github/workflows/test-and-release.yml | 2 +- io-package.json | 5 ++++- package-lock.json | 4 ++-- package.json | 14 +++++++------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 8f45d123..7ce90d2d 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: ioBroker/testing-action-check@v1 with: - node-version: "16.x" + node-version: "20.x" # Uncomment the following line if your adapter cannot be installed using 'npm ci' # install-command: 'npm install' lint: true diff --git a/io-package.json b/io-package.json index 5f25969e..85dd4bdd 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.1.3", + "version": "0.1.4", "news": { + "0.1.4": { + "en": "Change wecharge endpoint" + }, "0.1.3": { "en": "Remove destination endpoint" }, diff --git a/package-lock.json b/package-lock.json index 9a02ce46..90b9edf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.1.3", + "version": "0.1.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.3", + "version": "0.1.4", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.3", diff --git a/package.json b/package.json index a7bd00c3..039ceb75 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dependencies": { "@iobroker/adapter-core": "^3.0.3", "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.5.0", + "axios": "^1.5.1", "json-bigint": "^1.0.0", "json2iob": "^2.4.8", "ngeohash": "^0.6.3", @@ -35,18 +35,18 @@ "@iobroker/testing": "^4.1.0", "@types/chai": "^4.3.6", "@types/chai-as-promised": "^7.1.6", - "@types/mocha": "^10.0.1", - "@types/node": "^20.7.0", + "@types/mocha": "^10.0.2", + "@types/node": "^20.8.2", "@types/proxyquire": "^1.3.29", - "@types/sinon": "^10.0.17", + "@types/sinon": "^10.0.18", "@types/sinon-chai": "^3.2.10", - "chai": "^4.3.8", + "chai": "^4.3.10", "chai-as-promised": "^7.1.1", "eslint": "^8.50.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^16.0.0", + "sinon": "^16.1.0", "sinon-chai": "^3.7.0", "typescript": "~5.2.2" }, @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.3" + "version": "0.1.4" } From 00b8f157cd08ef4dd0cb0d1ba859cde352c77286 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 6 Oct 2023 11:10:41 +0200 Subject: [PATCH 559/729] 0.1.5 --- io-package.json | 4 +- package-lock.json | 152 ++++++++++++++++++++++++---------------------- package.json | 2 +- 3 files changed, 82 insertions(+), 76 deletions(-) diff --git a/io-package.json b/io-package.json index 85dd4bdd..dd0b49c4 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.1.4", + "version": "0.1.5", "news": { - "0.1.4": { + "0.1.5": { "en": "Change wecharge endpoint" }, "0.1.3": { diff --git a/package-lock.json b/package-lock.json index 90b9edf0..f51ef16d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "iobroker.vw-connect", - "version": "0.1.4", + "version": "0.1.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.4", + "version": "0.1.5", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.3", "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.5.0", + "axios": "^1.5.1", "json-bigint": "^1.0.0", "json2iob": "^2.4.8", "ngeohash": "^0.6.3", @@ -24,18 +24,18 @@ "@iobroker/testing": "^4.1.0", "@types/chai": "^4.3.6", "@types/chai-as-promised": "^7.1.6", - "@types/mocha": "^10.0.1", - "@types/node": "^20.7.0", + "@types/mocha": "^10.0.2", + "@types/node": "^20.8.2", "@types/proxyquire": "^1.3.29", - "@types/sinon": "^10.0.17", + "@types/sinon": "^10.0.18", "@types/sinon-chai": "^3.2.10", - "chai": "^4.3.8", + "chai": "^4.3.10", "chai-as-promised": "^7.1.1", "eslint": "^8.50.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", - "sinon": "^16.0.0", + "sinon": "^16.1.0", "sinon-chai": "^3.7.0", "typescript": "~5.2.2" }, @@ -373,15 +373,15 @@ } }, "node_modules/@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", + "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", "dev": true }, "node_modules/@types/node": { - "version": "20.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.0.tgz", - "integrity": "sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg==", + "version": "20.8.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", + "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", "dev": true }, "node_modules/@types/proxyquire": { @@ -391,9 +391,9 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.17", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz", - "integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==", + "version": "10.0.18", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.18.tgz", + "integrity": "sha512-OpQC9ug8BcnNxue2WF5aTruMaDRFn6NyfaE4DmAKOlQMn54b7CnCvDFV3wj5fk/HbSSTYmOYs2bTb5ShANjyQg==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -572,9 +572,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", - "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -692,18 +692,18 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/chai": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", - "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" }, "engines": { "node": ">=4" @@ -750,10 +750,13 @@ } }, "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -1346,9 +1349,9 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "engines": { "node": "*" @@ -1826,9 +1829,9 @@ } }, "node_modules/loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, "dependencies": { "get-func-name": "^2.0.0" @@ -2467,9 +2470,9 @@ } }, "node_modules/sinon": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.0.0.tgz", - "integrity": "sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.1.0.tgz", + "integrity": "sha512-ZSgzF0vwmoa8pq0GEynqfdnpEDyP1PkYmEChnkjW0Vyh8IDlyFEJ+fkMhCP0il6d5cJjPl2PUsnUSAuP5sttOQ==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", @@ -3150,15 +3153,15 @@ } }, "@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", + "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", "dev": true }, "@types/node": { - "version": "20.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.0.tgz", - "integrity": "sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg==", + "version": "20.8.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", + "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", "dev": true }, "@types/proxyquire": { @@ -3168,9 +3171,9 @@ "dev": true }, "@types/sinon": { - "version": "10.0.17", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz", - "integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==", + "version": "10.0.18", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.18.tgz", + "integrity": "sha512-OpQC9ug8BcnNxue2WF5aTruMaDRFn6NyfaE4DmAKOlQMn54b7CnCvDFV3wj5fk/HbSSTYmOYs2bTb5ShANjyQg==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -3307,9 +3310,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", - "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -3405,18 +3408,18 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chai": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.8.tgz", - "integrity": "sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==", + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", "dev": true, "requires": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" } }, "chai-as-promised": { @@ -3450,10 +3453,13 @@ } }, "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "requires": { + "get-func-name": "^2.0.2" + } }, "chokidar": { "version": "3.5.3", @@ -3883,9 +3889,9 @@ "dev": true }, "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true }, "get-intrinsic": { @@ -4248,9 +4254,9 @@ } }, "loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, "requires": { "get-func-name": "^2.0.0" @@ -4716,9 +4722,9 @@ } }, "sinon": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.0.0.tgz", - "integrity": "sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.1.0.tgz", + "integrity": "sha512-ZSgzF0vwmoa8pq0GEynqfdnpEDyP1PkYmEChnkjW0Vyh8IDlyFEJ+fkMhCP0il6d5cJjPl2PUsnUSAuP5sttOQ==", "dev": true, "requires": { "@sinonjs/commons": "^3.0.0", diff --git a/package.json b/package.json index 039ceb75..67fc08e5 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.4" + "version": "0.1.5" } From 681d9ceafb6342b46186e9939d17386e503ed0ca Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 6 Oct 2023 11:35:15 +0200 Subject: [PATCH 560/729] prevent blocked refres --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index db4269a4..5ea79f5d 100644 --- a/main.js +++ b/main.js @@ -1385,7 +1385,7 @@ class VwWeconnect extends utils.Adapter { this.refreshToken().catch(() => { this.log.error("Refresh Token was not successful"); }); - if (this.secondAccessToken) { + if (this.secondAccessToken && !this.secondRefreshToken === "blocked") { this.refreshToken(null, true).catch(() => { this.log.error("Refresh Second Token was not successful"); }); From edde34c4e4905fc3309eb4a490f982276e9a7f99 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 12 Oct 2023 08:33:16 +0200 Subject: [PATCH 561/729] check clima v2 state --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 5ea79f5d..6fcd8deb 100644 --- a/main.js +++ b/main.js @@ -5317,7 +5317,9 @@ class VwWeconnect extends utils.Adapter { value = true; } this.setState(vin + ".remote.climatisation", value, true); - this.setState(vin + ".remote.climatisationv2", value, true); + if (await this.getStateAsync(vin + ".remote.climatisationv2")) { + this.setState(vin + ".remote.climatisationv2", value, true); + } } if (id.indexOf("maxChargeCurrent.content") !== -1) { this.setState(vin + ".remote.maxChargeCurrent", state.val, true); From a7ffc8ff97ebde4096509656ce982748c1d6af73 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 12 Oct 2023 09:34:06 +0200 Subject: [PATCH 562/729] add v2 --- main.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 6fcd8deb..e5af0723 100644 --- a/main.js +++ b/main.js @@ -2211,6 +2211,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.climatisationv2", { + type: "state", + common: { + name: "Start/Stop Climatisation v2", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vin + ".remote.climatisationv3", { type: "state", common: { @@ -5317,9 +5327,8 @@ class VwWeconnect extends utils.Adapter { value = true; } this.setState(vin + ".remote.climatisation", value, true); - if (await this.getStateAsync(vin + ".remote.climatisationv2")) { - this.setState(vin + ".remote.climatisationv2", value, true); - } + this.setState(vin + ".remote.climatisationv2", value, true); + } if (id.indexOf("maxChargeCurrent.content") !== -1) { this.setState(vin + ".remote.maxChargeCurrent", state.val, true); From 2dfd2f2d527e974c3cc46ac4ed06ff583bcbb5bb Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 12 Oct 2023 11:22:27 +0200 Subject: [PATCH 563/729] 0.1.6 --- io-package.json | 5 ++++- main.js | 1 - package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/io-package.json b/io-package.json index dd0b49c4..5b8ed059 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.1.5", + "version": "0.1.6", "news": { + "0.1.6": { + "en": "Fix climatisationv2 error" + }, "0.1.5": { "en": "Change wecharge endpoint" }, diff --git a/main.js b/main.js index e5af0723..af673202 100644 --- a/main.js +++ b/main.js @@ -5328,7 +5328,6 @@ class VwWeconnect extends utils.Adapter { } this.setState(vin + ".remote.climatisation", value, true); this.setState(vin + ".remote.climatisationv2", value, true); - } if (id.indexOf("maxChargeCurrent.content") !== -1) { this.setState(vin + ".remote.maxChargeCurrent", state.val, true); diff --git a/package-lock.json b/package-lock.json index f51ef16d..5e067fc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.1.5", + "version": "0.1.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.5", + "version": "0.1.6", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.3", diff --git a/package.json b/package.json index 67fc08e5..ddcb1f56 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.5" + "version": "0.1.6" } From 238bd5ae1560bbfe561a2e24a12a68fa3a46a639 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 17 Oct 2023 21:19:57 +0200 Subject: [PATCH 564/729] add climatev2 settings --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index af673202..20dbc30c 100644 --- a/main.js +++ b/main.js @@ -5005,8 +5005,14 @@ class VwWeconnect extends utils.Adapter { if (heaterSourceState.val) { heaterSource = heaterSourceState.val; } + let targetTemp = 2950; + if (tagetTempState && tagetTempState.val) { + targetTemp = tagetTempState.val; + } body = - '\n\n startClimatisation ' + + '\n\n startClimatisation ' + + targetTemp + + " true " + heaterSource + " \n"; } From 00b37b646fd934770b2a663ec9587a1111d660e0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 19 Oct 2023 11:16:56 +0200 Subject: [PATCH 565/729] 0.1.8 --- io-package.json | 9 +++- main.js | 5 +- package-lock.json | 129 +++++++++++++++++++++++++++------------------- package.json | 14 ++--- 4 files changed, 93 insertions(+), 64 deletions(-) diff --git a/io-package.json b/io-package.json index 5b8ed059..7f8c624b 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,15 @@ { "common": { "name": "vw-connect", - "version": "0.1.6", + "version": "0.1.8", "news": { + "0.1.8": { + "en": "fix skoda parking position and climatisationv2", + "de": "Fix für Skoda Parkposition und Climatisationv2" + }, + "0.1.7": { + "en": "improve climatisationv2" + }, "0.1.6": { "en": "Fix climatisationv2 error" }, diff --git a/main.js b/main.js index 20dbc30c..e7f4928e 100644 --- a/main.js +++ b/main.js @@ -46,7 +46,7 @@ class VwWeconnect extends utils.Adapter { this.homeRegion = {}; this.homeRegionSetter = {}; - this.secondAcessToken = null; + this.secondAccessToken = null; this.vinArray = []; this.etags = {}; @@ -1357,7 +1357,7 @@ class VwWeconnect extends utils.Adapter { return; } - if (this.config.atoken) { + if (this.config.atoken && this.clientId != "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com") { this.secondAccessToken = this.config.atoken; this.secondRefreshToken = this.config.rtoken; } @@ -5005,6 +5005,7 @@ class VwWeconnect extends utils.Adapter { if (heaterSourceState.val) { heaterSource = heaterSourceState.val; } + const tagetTempState = await this.getStateAsync(vin + ".climater.settings.targetTemperature.content"); let targetTemp = 2950; if (tagetTempState && tagetTempState.val) { targetTemp = tagetTempState.val; diff --git a/package-lock.json b/package-lock.json index 5e067fc8..235f6ccc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "iobroker.vw-connect", - "version": "0.1.6", + "version": "0.1.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.6", + "version": "0.1.8", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^3.0.3", + "@iobroker/adapter-core": "^3.0.4", "@peculiar/webcrypto": "^1.4.3", "axios": "^1.5.1", "json-bigint": "^1.0.0", @@ -22,16 +22,16 @@ }, "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.6", - "@types/chai-as-promised": "^7.1.6", + "@types/chai": "^4.3.9", + "@types/chai-as-promised": "^7.1.7", "@types/mocha": "^10.0.2", - "@types/node": "^20.8.2", + "@types/node": "^20.8.6", "@types/proxyquire": "^1.3.29", - "@types/sinon": "^10.0.18", + "@types/sinon": "^10.0.19", "@types/sinon-chai": "^3.2.10", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", - "eslint": "^8.50.0", + "eslint": "^8.51.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", @@ -100,9 +100,9 @@ } }, "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.51.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz", + "integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -142,9 +142,12 @@ "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.3.tgz", - "integrity": "sha512-SZmL69BtUXitnTbidNjlljQKB6CbkBLK9+Tqo/NMsOqHb1RmhPCNKhO4F5o8jc0dW0J6d4VArXryUkL7Ru0WpA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.4.tgz", + "integrity": "sha512-QsSeIkOa+zEVdIQ0kc0GcfsnQC+pTWWkixotdG4naKuaLUwMWK7xP0UyUEUiaHfPG3KqyZxwIxQR9HMENvvIYQ==", + "engines": { + "npm": ">=7.0.0" + }, "peerDependencies": { "@iobroker/types": "^5.0.11" } @@ -358,15 +361,15 @@ "dev": true }, "node_modules/@types/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.9.tgz", + "integrity": "sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==", "dev": true }, "node_modules/@types/chai-as-promised": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.6.tgz", - "integrity": "sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.7.tgz", + "integrity": "sha512-APucaP5rlmTRYKtRA6FE5QPP87x76ejw5t5guRJ4y5OgMnwtsvigw7HHhKZlx2MGXLeZd6R/GNZR/IqDHcbtQw==", "dev": true, "dependencies": { "@types/chai": "*" @@ -379,10 +382,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", - "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", - "dev": true + "version": "20.8.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", + "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.25.1" + } }, "node_modules/@types/proxyquire": { "version": "1.3.29", @@ -391,9 +397,9 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.18", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.18.tgz", - "integrity": "sha512-OpQC9ug8BcnNxue2WF5aTruMaDRFn6NyfaE4DmAKOlQMn54b7CnCvDFV3wj5fk/HbSSTYmOYs2bTb5ShANjyQg==", + "version": "10.0.19", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.19.tgz", + "integrity": "sha512-MWZNGPSchIdDfb5FL+VFi4zHsHbNOTQEgjqFQk7HazXSXwUU9PAX3z9XBqb3AJGYr9YwrtCtaSMsT3brYsN/jQ==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -977,15 +983,15 @@ } }, "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.51.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz", + "integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==", "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", + "@eslint/js": "8.51.0", "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2712,6 +2718,12 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "dev": true + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -2914,9 +2926,9 @@ } }, "@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.51.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz", + "integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==", "dev": true }, "@humanwhocodes/config-array": { @@ -2943,9 +2955,9 @@ "dev": true }, "@iobroker/adapter-core": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.3.tgz", - "integrity": "sha512-SZmL69BtUXitnTbidNjlljQKB6CbkBLK9+Tqo/NMsOqHb1RmhPCNKhO4F5o8jc0dW0J6d4VArXryUkL7Ru0WpA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.4.tgz", + "integrity": "sha512-QsSeIkOa+zEVdIQ0kc0GcfsnQC+pTWWkixotdG4naKuaLUwMWK7xP0UyUEUiaHfPG3KqyZxwIxQR9HMENvvIYQ==", "requires": {} }, "@iobroker/testing": { @@ -3138,15 +3150,15 @@ "dev": true }, "@types/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.9.tgz", + "integrity": "sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==", "dev": true }, "@types/chai-as-promised": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.6.tgz", - "integrity": "sha512-cQLhk8fFarRVZAXUQV1xEnZgMoPxqKojBvRkqPCKPQCzEhpbbSKl1Uu75kDng7k5Ln6LQLUmNBjLlFthCgm1NA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.7.tgz", + "integrity": "sha512-APucaP5rlmTRYKtRA6FE5QPP87x76ejw5t5guRJ4y5OgMnwtsvigw7HHhKZlx2MGXLeZd6R/GNZR/IqDHcbtQw==", "dev": true, "requires": { "@types/chai": "*" @@ -3159,10 +3171,13 @@ "dev": true }, "@types/node": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", - "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", - "dev": true + "version": "20.8.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", + "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", + "dev": true, + "requires": { + "undici-types": "~5.25.1" + } }, "@types/proxyquire": { "version": "1.3.29", @@ -3171,9 +3186,9 @@ "dev": true }, "@types/sinon": { - "version": "10.0.18", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.18.tgz", - "integrity": "sha512-OpQC9ug8BcnNxue2WF5aTruMaDRFn6NyfaE4DmAKOlQMn54b7CnCvDFV3wj5fk/HbSSTYmOYs2bTb5ShANjyQg==", + "version": "10.0.19", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.19.tgz", + "integrity": "sha512-MWZNGPSchIdDfb5FL+VFi4zHsHbNOTQEgjqFQk7HazXSXwUU9PAX3z9XBqb3AJGYr9YwrtCtaSMsT3brYsN/jQ==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -3619,15 +3634,15 @@ "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.51.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz", + "integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==", "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", + "@eslint/js": "8.51.0", "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4890,6 +4905,12 @@ "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, + "undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "dev": true + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", diff --git a/package.json b/package.json index ddcb1f56..0547cb96 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^3.0.3", + "@iobroker/adapter-core": "^3.0.4", "@peculiar/webcrypto": "^1.4.3", "axios": "^1.5.1", "json-bigint": "^1.0.0", @@ -33,16 +33,16 @@ "description": "Adapter for VW Connect", "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.6", - "@types/chai-as-promised": "^7.1.6", + "@types/chai": "^4.3.9", + "@types/chai-as-promised": "^7.1.7", "@types/mocha": "^10.0.2", - "@types/node": "^20.8.2", + "@types/node": "^20.8.6", "@types/proxyquire": "^1.3.29", - "@types/sinon": "^10.0.18", + "@types/sinon": "^10.0.19", "@types/sinon-chai": "^3.2.10", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", - "eslint": "^8.50.0", + "eslint": "^8.51.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.6" + "version": "0.1.8" } From b55721ae48baf9a78be6e62bfbd1622556a6533d Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 24 Oct 2023 09:42:13 +0200 Subject: [PATCH 566/729] add logs --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index e7f4928e..2a26a6ca 100644 --- a/main.js +++ b/main.js @@ -2895,6 +2895,8 @@ class VwWeconnect extends utils.Adapter { } }) .catch((error) => { + this.log.debug(error); + error.response && this.log.debug(JSON.stringify(error.response.data)); if (status.path === "position/vehicles") { this.log.warn("Parking position failed. Blocked until restart"); this.secondAccessToken = "blocked"; From 055c0d5c83f7bfd5a6650d9e300990732dfaa70c Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 24 Oct 2023 20:23:47 +0200 Subject: [PATCH 567/729] move parking position --- main.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 2a26a6ca..85d28bf9 100644 --- a/main.js +++ b/main.js @@ -2897,11 +2897,7 @@ class VwWeconnect extends utils.Adapter { .catch((error) => { this.log.debug(error); error.response && this.log.debug(JSON.stringify(error.response.data)); - if (status.path === "position/vehicles") { - this.log.warn("Parking position failed. Blocked until restart"); - this.secondAccessToken = "blocked"; - return; - } + if (error.response) { if (error.response.status === 304) { this.log.debug("304 No values updated"); @@ -2917,6 +2913,11 @@ class VwWeconnect extends utils.Adapter { } this.log.error(JSON.stringify(error.response.data)); } + if (status.path === "position/vehicles") { + this.log.warn("Parking position failed. Blocked until restart"); + this.secondAccessToken = "blocked"; + return; + } this.log.error(error); this.log.error(url); }); From 237474e263939e8ba9a61034fef26a507964909d Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 24 Oct 2023 20:43:33 +0200 Subject: [PATCH 568/729] 0.1.9 --- io-package.json | 6 +++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/io-package.json b/io-package.json index 7f8c624b..337dc997 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.1.8", + "version": "0.1.9", "news": { + "0.1.9": { + "en": "fix skoda parking position", + "de": "Fix für skoda parking position" + }, "0.1.8": { "en": "fix skoda parking position and climatisationv2", "de": "Fix für Skoda Parkposition und Climatisationv2" diff --git a/package-lock.json b/package-lock.json index 235f6ccc..52a2f2e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.1.8", + "version": "0.1.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.1.8", + "version": "0.1.9", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 0547cb96..908593bd 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.1.8" + "version": "0.1.9" } From f8445da36788879c98ee387da7bc61509cca104f Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 27 Oct 2023 23:35:08 +0200 Subject: [PATCH 569/729] add standheizungv3 --- main.js | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 85d28bf9..0c2b9105 100644 --- a/main.js +++ b/main.js @@ -2429,6 +2429,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vehicle + ".remote.standheizungv3", { + type: "state", + common: { + name: "Start/Stop Standheizung", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vehicle + ".remote.lockv2", { type: "state", common: { @@ -4380,6 +4390,7 @@ class VwWeconnect extends utils.Adapter { if (secToken) { headers["x-mbbSecToken"] = secToken; + headers["X-SecurityToken"] = secToken; } request.post( @@ -4985,7 +4996,13 @@ class VwWeconnect extends utils.Adapter { ); } } - if (action === "climatisation" || action === "climatisationv2" || action === "climatisationv3") { + if ( + action === "climatisation" || + action === "climatisationv2" || + action === "climatisationv3" || + action === "standheizungv3" + ) { + let secToken = null; if ((this.config.type === "id" || this.config.type === "audietron") && action !== "climatisationv3") { const value = state.val ? "start" : "stop"; this.setIdRemote(vin, action, value).catch(() => { @@ -5002,9 +5019,14 @@ class VwWeconnect extends utils.Adapter { } else { body = '\n\n startClimatisation\n'; - if (action === "climatisationv2") { + if (action === "climatisationv2" || action === "standheizungv3") { const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); let heaterSource = "electric"; + if (action === "standheizungv3") { + heaterSource = "automatic"; + + secToken = await this.requestSecToken(vin, "rclima_v1/operations/P_START_CLIMA_AU"); + } if (heaterSourceState.val) { heaterSource = heaterSourceState.val; } @@ -5024,7 +5046,7 @@ class VwWeconnect extends utils.Adapter { body = '\n\n stopClimatisation\n'; } - contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml"; + contentType = "application/vnd.vwg.mbb.ClimaterAction_v1_0_2+xml"; if (action === "climatisationv3") { const heaterSourceState = await this.getStateAsync(vin + ".climater.settings.heaterSource.content"); let heaterSource = "electric"; @@ -5095,12 +5117,12 @@ class VwWeconnect extends utils.Adapter { body = JSON.stringify(body); this.log.debug(body); } - this.setVehicleStatus( vin, "$homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions", body, contentType, + secToken, ).catch(() => { this.log.error("failed set state"); }); From 315ef56e98353a09bf70c65f5246379de98767fa Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 29 Oct 2023 11:42:45 +0100 Subject: [PATCH 570/729] 0.2.0 improve volkswagen app --- admin/index_m.html | 2 +- io-package.json | 6 +- main.js | 264 ++++++++++++++++++++++++++++++++++++++------- package-lock.json | 232 ++++++++++++++++++++++----------------- package.json | 18 ++-- 5 files changed, 374 insertions(+), 148 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 96e42363..3f0908b0 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -84,7 +84,7 @@ - - From 515f395110323d36ce987859b6efbd40c9674f6b Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 18 Nov 2023 20:23:50 +0100 Subject: [PATCH 581/729] 0.2.5 --- io-package.json | 6 +++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/io-package.json b/io-package.json index 210bd621..ae0ecda6 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.2.2", + "version": "0.2.5", "news": { + "0.2.5": { + "en": "removed deactivated we-connect type", + "de": "Deaktivierter We-Connect Typ entfernt" + }, "0.2.2": { "en": "hide error when no trip information are available", "de": "Fehlermeldung abgefangen wenn keine Trips Information für ID Fahrzeug verfügbar sind" diff --git a/package-lock.json b/package-lock.json index 8c485760..38e9a623 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.2.2", + "version": "0.2.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.2.2", + "version": "0.2.5", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 4926898f..ef7705cf 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.2.2" + "version": "0.2.5" } From 761ce49d33398575cb9853e262e9e9882622a14f Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 19 Nov 2023 19:49:20 +0100 Subject: [PATCH 582/729] change fetching trip --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 58afa517..e70a0a22 100644 --- a/main.js +++ b/main.js @@ -2629,7 +2629,7 @@ class VwWeconnect extends utils.Adapter { // error.response && this.log.error(JSON.stringify(error.response.data)); }); } - if (this.config.tripShortTerm == true) { + if (this.config.tripShortTerm == true && !this.blockTrip) { await axios({ method: "get", url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/shortterm", @@ -2661,7 +2661,7 @@ class VwWeconnect extends utils.Adapter { error && error.response && this.log.error(JSON.stringify(error.response.data)); }); } - if (this.config.tripLongTerm == true) { + if (this.config.tripLongTerm == true && !this.blockTrip) { await axios({ method: "get", url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/longterm", From 0fdd3e17b1f6d7b8f29be45684e3f0633b1ec628 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 24 Nov 2023 22:11:59 +0100 Subject: [PATCH 583/729] remove old readme parts --- README.md | 112 ++++++++++-------------------------------------------- 1 file changed, 21 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index d0dc36c1..d72ec2e3 100644 --- a/README.md +++ b/README.md @@ -25,109 +25,39 @@ Normale refresh is the polling interval to receive data from the VAG Cloud Force refresh is for non E-Cars to enforce a refresh this number is limited by VAG until the car is turn on again. Trip data is only available for non E-Cars. +You can set climatisaton temperature in +.climater.settings.targetTemperature.content + ## Discussion and Questions ## Status fields Explanation -Door and window states: - -- open: 1 -- locked: 2 -- closed: 3 - ### List of entries ``` -"1MAINTENANCE_INTERVAL_DISTANCE_TO_OIL_CHANGE", 0, "0x0203010001"); // 0x0203FFFFFF.0x0203010001, oilInspectionData_km -"2MAINTENANCE_INTERVAL_TIME_TO_OIL_CHANGE", 1, "0x0203010002"); // 0x0203FFFFFF.0x0203010002, oilInspectionData_days -"3MAINTENANCE_INTERVAL_DISTANCE_TO_INSPECTION", 2, "0x0203010003"); // 0x0203FFFFFF.0x0203010003, serviceInspectionData_km -"4MAINTENANCE_INTERVAL_TIME_TO_INSPECTION", 3, "0x0203010004"); // 0x0203FFFFFF.0x0203010004, serviceInspectionData_days -"5WARNING_OIL_CHANGE", 4, "0x0203010005"); -"6MAINTENANCE_INTERVAL_ALARM_INSPECTION", 5, "0x0203010006"); -"7MAINTENANCE_INTERVAL_MONTHLY_MILEAGE", 6, "0x0203010007"); -"8MAINTENANCE_INTERVAL_AD_BLUE_RANGE", 7, "0x02040C0001"); // 0x0204FFFFFF.0x02040C0001, adBlueInspectionData_km -"9OIL_LEVEL_AMOUNT_IN_LITERS", 8, "0x0204040001"); -"10OIL_LEVEL_MINIMUM_WARNING", 9, "0x0204040002"); -"11OIL_LEVEL_DIPSTICK_PERCENTAGE", 10, "0x0204040003"); -"12LIGHT_STATUS", 11, "0x0301010001"); // 0x030101FFFF.0x0301010001, status_parking_light_off -"13TOTAL_RANGE", 12, "0x0301030005"); // 0x030103FFFF.0x0301030005, hybrid_range - erst ab Modelljahr 2018 -"14FUEL_LEVEL_IN_PERCENTAGE", 13, "0x030103000A"); // 0x030103FFFF.0x030103000A, fuel level -"15CNG_LEVEL_IN_PERCENTAGE", 14, "0x030103000D"); -"16LOCK_STATE_LEFT_FRONT_DOOR", 15, "0x0301040001"); // 0x030104FFFF.0x0301040001, door1 - front/left -"17OPEN_STATE_LEFT_FRONT_DOOR", 16, "0x0301040002"); -"18SAFETY_STATE_LEFT_FRONT_DOOR", 17, "0x0301040003"); -"19LOCK_STATE_LEFT_REAR_DOOR", 18, "0x0301040004"); // 0x030104FFFF.0x0301040004, door2 - rear/left -"20OPEN_STATE_LEFT_REAR_DOOR", 19, "0x0301040005"); -"21SAFETY_STATE_LEFT_REAR_DOOR", 20, "0x0301040006"); -"22LOCK_STATE_RIGHT_FRONT_DOOR", 21, "0x0301040007"); // 0x030104FFFF.0x0301040007, door3 - front/right -"23OPEN_STATE_RIGHT_FRONT_DOOR", 22, "0x0301040008"); -"24SAFETY_STATE_RIGHT_FRONT_DOOR", 23, "0x0301040009"); -"25LOCK_STATE_RIGHT_REAR_DOOR", 24, "0x030104000A"); // 0x030104FFFF.0x030104000A, door4 - rear/right -"26OPEN_STATE_RIGHT_REAR_DOOR", 25, "0x030104000B"); -"27SAFETY_STATE_RIGHT_REAR_DOOR", 26, "0x030104000C"); -"28LOCK_STATE_TRUNK_LID", 27, "0x030104000D"); // 0x030104FFFF.0x030104000D, door5 - rear -"29OPEN_STATE_TRUNK_LID", 28, "0x030104000E"); -"30SAFETY_STATE_TRUNK_LID", 29, "0x030104000F"); -"31LOCK_STATE_HOOD", 30, "0x0301040010"); // 0x030104FFFF.0x0301040010, door6 - hood -"32OPEN_STATE_HOOD", 31, "0x0301040011"); -"33SAFETY_STATE_HOOD", 32, "0x0301040012"); -"34STATE_LEFT_FRONT_WINDOW", 33, "0x0301050001"); // 0x030105FFFF.0x0301050001, window1 - front/left -"35POSITION_LEFT_FRONT_WINDOW", 34, "0x0301050002"); -"36STATE_LEFT_REAR_WINDOW", 35, "0x0301050003"); // 0x030105FFFF.0x0301050003, window2 - rear/left -"37POSITION_LEFT_REAR_WINDOW", 36, "0x0301050004"); -"38STATE_RIGHT_FRONT_WINDOW", 37, "0x0301050005"); // 0x030105FFFF.0x0301050005, window3 - front/right -"39POSITION_RIGHT_FRONT_WINDOW", 38, "0x0301050006"); -"40STATE_RIGHT_REAR_WINDOW", 39, "0x0301050007"); // 0x030105FFFF.0x0301050007, window4 - rear/right -"41POSITION_RIGHT_REAR_WINDOW", 40, "0x0301050008"); -"42STATE_CONVERTIBLE_TOP", 41, "0x0301050009"); -"43POSITION_CONVERTIBLE_TOP", 42, "0x030105000A"); -"44STATE_SUN_ROOF_MOTOR_COVER", 43, "0x030105000B"); //0x030105FFFF.0x030105000B, window4 - roof window -"45POSITION_SUN_ROOF_MOTOR_COVER", 44, "0x030105000C"); -"46STATE_SUN_ROOF_REAR_MOTOR_COVER_3", 45, "0x030105000D"); -"47POSITION_SUN_ROOF_REAR_MOTOR_COVER_3", 46, "0x030105000E"); -"48STATE_SERVICE_FLAP", 47, "0x030105000F"); -"49POSITION_SERVICE_FLAP", 48, "0x0301050010"); -"50STATE_SPOILER", 49, "0x0301050011"); -"51POSITION_SPOILER", 50, "0x0301050012"); -"52UTC_TIME_STATUS", 51, "0x0101010001"); -"53KILOMETER_STATUS", 52, "0x0101010002"); // 0x0101010002.0x0101010002, distanceCovered -"54PRIMARY_RANGE", 53, "0x0301030006"); // 0x030103FFFF.0x0301030006, fuel range -"55PRIMARY_DRIVE", 54, "0x0301030007"); // 0x030103FFFF.0x0301030007, fuel type -"56SECONDARY_RANGE", 55, "0x0301030008"); // 0x030103FFFF.0x0301030008, secondary_range - erst ab Modelljahr 2018 -"57SECONDARY_DRIVE", 56, "0x0301030009"); // 0x030103FFFF.0x0301030009, secondary_typ - erst ab Modelljahr 2018 -"58STATE_OF_CHARGE", 57, "0x0301030002"); // 0x030103FFFF.0x0301030002, soc_ok -"59TEMPERATURE_OUTSIDE", 58, "0x0301020001"); -"60PARKING_BRAKE", 59, "0x0301030001"); // 0x030103FFFF.0x0301030001, parking brake -"61TYRE_PRESSURE_LEFT_FRONT_CURRENT_VALUE", 60, "0x0301060001"); -"62TYRE_PRESSURE_LEFT_FRONT_DESIRED_VALUE", 61, "0x0301060002"); -"63TYRE_PRESSURE_LEFT_REAR_CURRENT_VALUE", 62, "0x0301060003"); -"64TYRE_PRESSURE_LEFT_REAR_DESIRED_VALUE", 63, "0x0301060004"); -"65TYRE_PRESSURE_RIGHT_FRONT_CURRENT_VALUE", 64, "0x0301060005"); -"66TYRE_PRESSURE_RIGHT_FRONT_DESIRED_VALUE", 65, "0x0301060006"); -"67TYRE_PRESSURE_RIGHT_REAR_CURRENT_VALUE", 66, "0x0301060007"); -"68TYRE_PRESSURE_RIGHT_REAR_DESIRED_VALUE", 67, "0x0301060008"); -"69TYRE_PRESSURE_SPARE_TYRE_CURRENT_VALUE", 68, "0x0301060009"); -"70TYRE_PRESSURE_SPARE_TYRE_DESIRED_VALUE", 69, "0x030106000A"); -"71TYRE_PRESSURE_LEFT_FRONT_TYRE_DIFFERENCE", 70, "0x030106000B"); -"72TYRE_PRESSURE_LEFT_REAR_TYRE_DIFFERENCE", 71, "0x030106000C"); -"73TYRE_PRESSURE_RIGHT_FRONT_TYRE_DIFFERENCE", 72, "0x030106000D"); -"74TYRE_PRESSURE_RIGHT_REAR_TYRE_DIFFERENCE", 73, "0x030106000E"); -"75TYRE_PRESSURE_SPARE_TYRE_DIFFERENCE", 74, "0x030106000F"); + ``` ## Changelog ### 0.0.65 + - Fix Cupra login + ### 0.0.63 + - Fix VW/Skoda etron login + ### 0.0.62 + - Fix Audi etron login + ### 0.0.61 + - Fix ID login - + ### 0.0.60 - Minor improvements. WeCharge Minimum interval is now 15 minutes @@ -135,19 +65,19 @@ Door and window states: ### 0.0.55 - fix id status update + ### 0.0.51 - fix audi etron login - + ### 0.0.48 - fix login, fix audi update, add limit for wallbox - ### 0.0.43 - increase refresh token timeouts - + ### 0.0.42 - fix skoda login @@ -163,15 +93,15 @@ Door and window states: ### 0.0.36 - add Skoda Enyaq support - + ### 0.0.35 - add nodeJS v10 compatibility - + ### 0.0.34 - add auto accept of new privacy consent - + ### 0.0.32 - correct selection of last recent trips @@ -179,15 +109,15 @@ Door and window states: ### 0.0.31 - enable multiple selection of trip types - + ### 0.0.30 - fix mutiple car problem, add VWv2 mode at the moment there is no different between VW and VWv2 - + ### 0.0.29 - fix skoda refreshToken, smaller improvements - + ### 0.0.26 - bugfixes From 74d1eecdec945e169a844d95faf082c819e8b88d Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 29 Nov 2023 15:24:13 +0100 Subject: [PATCH 584/729] add windowheating --- main.js | 60 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/main.js b/main.js index e70a0a22..4abc8a49 100644 --- a/main.js +++ b/main.js @@ -18,7 +18,7 @@ const traverse = require("traverse"); const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); const axios = require("axios").default; -const Json2iob = require("./lib/json2iob"); +const Json2iob = require("json2iob"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -397,6 +397,7 @@ class VwWeconnect extends utils.Adapter { }); } + this.updateStatus(); this.updateInterval = setInterval(() => { this.updateStatus(); }, this.config.interval * 60 * 1000); @@ -1868,7 +1869,7 @@ class VwWeconnect extends utils.Adapter { json: true, ...(Object.keys(body).length && { body }), }, - (err, resp, body) => { + async (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { if (resp && resp.statusCode === 429) { this.log.error( @@ -1890,8 +1891,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(body)); if (this.config.type === "id") { this.log.info("Found " + body.data.length + " vehicles"); - - body.data.forEach(async (element) => { + for (const element of body.data) { const vin = element.vin; await this.cleanObjects(vin); this.log.info(`Create vehicle ${vin}`); @@ -1913,7 +1913,7 @@ class VwWeconnect extends utils.Adapter { }); this.extractKeys(this, vin + ".general", element); - this.setObjectNotExists(vin + ".remote", { + this.extendObject(vin + ".remote", { type: "state", common: { name: "Remote controls", @@ -1921,48 +1921,63 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.charging", { + this.extendObject(vin + ".remote.charging", { type: "state", common: { name: "Start/Stop Battery Charge", type: "boolean", role: "boolean", + def: false, write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.climatisation", { + this.extendObject(vin + ".remote.climatisation", { type: "state", common: { - name: "Start/Stop Climatisation", + name: "Start/Stop Climatisation Target Temp => status.climatisationSettings", type: "boolean", role: "boolean", + def: false, write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.access", { + this.extendObject(vin + ".remote.access", { type: "state", common: { name: "Lock or Unlock Car", type: "boolean", role: "boolean", + def: false, write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.auxiliaryheating", { + this.extendObject(vin + ".remote.auxiliaryheating", { type: "state", common: { name: "Standheizung Aux Heating", type: "boolean", role: "boolean", + def: false, write: true, }, native: {}, }); - }); + this.extendObject(vin + ".remote.windowheating", { + type: "state", + common: { + name: "Scheibenheizung Window Heating", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); + } resolve(); return; } @@ -2551,7 +2566,7 @@ class VwWeconnect extends utils.Adapter { ); } // this.extractKeys(this, vin + ".status", data); - this.json2iob.parse(vin + ".status", data, { forceIndex: false }); + this.json2iob.parse(vin + ".status", data, { forceIndex: false, makeStateWritableWithEnding: ["settings"] }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", @@ -5170,6 +5185,27 @@ class VwWeconnect extends utils.Adapter { return; } } + if (action === "windowheating") { + if (this.config.type === "id" || this.config.type === "audietron") { + const value = state.val ? "start" : "stop"; + this.setIdRemote(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } else if (this.config.type === "seatcupra") { + const value = state.val ? "start" : "stop"; + this.setSeatCupraStatus(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } else if (this.config.type === "skodae") { + const value = state.val ? "Start" : "Stop"; + this.setSkodaESettings(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } if (action === "access") { if (this.config.type === "id" || this.config.type === "audietron") { const value = state.val ? "lock" : "unlock"; From 2a79cf8c1c8eb69142604cf505e1a9a8f2f71a0b Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 29 Nov 2023 15:26:13 +0100 Subject: [PATCH 585/729] update dep --- package-lock.json | 170 +++++++++++++++++++++++----------------------- package.json | 22 +++--- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38e9a623..ec49186c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,9 @@ "dependencies": { "@iobroker/adapter-core": "^3.0.4", "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.6.0", + "axios": "^1.6.2", "json-bigint": "^1.0.0", - "json2iob": "^2.4.8", + "json2iob": "^2.4.10", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", @@ -22,22 +22,22 @@ }, "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.9", - "@types/chai-as-promised": "^7.1.7", - "@types/mocha": "^10.0.3", - "@types/node": "^20.8.10", - "@types/proxyquire": "^1.3.30", - "@types/sinon": "^17.0.0", - "@types/sinon-chai": "^3.2.11", + "@types/chai": "^4.3.11", + "@types/chai-as-promised": "^7.1.8", + "@types/mocha": "^10.0.6", + "@types/node": "^20.10.0", + "@types/proxyquire": "^1.3.31", + "@types/sinon": "^17.0.2", + "@types/sinon-chai": "^3.2.12", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^17.0.1", "sinon-chai": "^3.7.0", - "typescript": "~5.2.2" + "typescript": "~5.3.2" }, "engines": { "node": ">=10.0.0" @@ -100,9 +100,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "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" @@ -361,54 +361,54 @@ "dev": true }, "node_modules/@types/chai": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.9.tgz", - "integrity": "sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==", + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", + "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", "dev": true }, "node_modules/@types/chai-as-promised": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.7.tgz", - "integrity": "sha512-APucaP5rlmTRYKtRA6FE5QPP87x76ejw5t5guRJ4y5OgMnwtsvigw7HHhKZlx2MGXLeZd6R/GNZR/IqDHcbtQw==", + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", "dev": true, "dependencies": { "@types/chai": "*" } }, "node_modules/@types/mocha": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.3.tgz", - "integrity": "sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true }, "node_modules/@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "version": "20.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", + "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/proxyquire": { - "version": "1.3.30", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.30.tgz", - "integrity": "sha512-erD15isFDzHMfeQC09DMjGeI0G6pJm7r5R7X/CxnEEe6tEp7N4r6xLYhTptdzne8zMz+2+5wJzrefCMvbmV/Fg==", + "version": "1.3.31", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.31.tgz", + "integrity": "sha512-uALowNG2TSM1HNPMMOR0AJwv4aPYPhqB0xlEhkeRTMuto5hjoSPZkvgu1nbPUkz3gEPAHv4sy4DmKsurZiEfRQ==", "dev": true }, "node_modules/@types/sinon": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.0.tgz", - "integrity": "sha512-oN4AeDMFCeNZrAffCjhLcwwVymRZL2c9mljUmhPnd0eiM06d4ELDg0Q0TSvnZXrCIFlSA859qIdcfu1HapswPQ==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.2.tgz", + "integrity": "sha512-Zt6heIGsdqERkxctIpvN5Pv3edgBrhoeb3yHyxffd4InN0AX2SVNKSrhdDZKGQICVOxWP/q4DyhpfPNMSrpIiA==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinon-chai": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.11.tgz", - "integrity": "sha512-1C5SBFzwn9hjiMr1xfqbULcSI9qXVpkGZT/LYbbd3jWiTo2MSvA+iFfwODlSoAXGeCgBw6S509dxy8zSIacr3Q==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", + "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", "dev": true, "dependencies": { "@types/chai": "*", @@ -584,9 +584,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -989,15 +989,15 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "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.3", - "@eslint/js": "8.53.0", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1746,9 +1746,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json2iob": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.8.tgz", - "integrity": "sha512-ldw0UnBIDdTuEiFQgR7A4yYUPjSgIt4IWh/RclSar4rD26oaBByy1cK2f/o5XsmfjkXkoZMJGPqM5SYBrJtlQA==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.10.tgz", + "integrity": "sha512-HJPBXPhe6Sm0hiZYqdDpehBaPHlP0nfHikTeaCVE0GXahnMu4iS49ljZWw4jTZjZzsub1m2pt2HO2S8ZXeScTg==", "dependencies": { "json-bigint": "^1.0.0" } @@ -2722,9 +2722,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2942,9 +2942,9 @@ } }, "@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "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": { @@ -3166,54 +3166,54 @@ "dev": true }, "@types/chai": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.9.tgz", - "integrity": "sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==", + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", + "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", "dev": true }, "@types/chai-as-promised": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.7.tgz", - "integrity": "sha512-APucaP5rlmTRYKtRA6FE5QPP87x76ejw5t5guRJ4y5OgMnwtsvigw7HHhKZlx2MGXLeZd6R/GNZR/IqDHcbtQw==", + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", "dev": true, "requires": { "@types/chai": "*" } }, "@types/mocha": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.3.tgz", - "integrity": "sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true }, "@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "version": "20.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", + "integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", "dev": true, "requires": { "undici-types": "~5.26.4" } }, "@types/proxyquire": { - "version": "1.3.30", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.30.tgz", - "integrity": "sha512-erD15isFDzHMfeQC09DMjGeI0G6pJm7r5R7X/CxnEEe6tEp7N4r6xLYhTptdzne8zMz+2+5wJzrefCMvbmV/Fg==", + "version": "1.3.31", + "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.31.tgz", + "integrity": "sha512-uALowNG2TSM1HNPMMOR0AJwv4aPYPhqB0xlEhkeRTMuto5hjoSPZkvgu1nbPUkz3gEPAHv4sy4DmKsurZiEfRQ==", "dev": true }, "@types/sinon": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.0.tgz", - "integrity": "sha512-oN4AeDMFCeNZrAffCjhLcwwVymRZL2c9mljUmhPnd0eiM06d4ELDg0Q0TSvnZXrCIFlSA859qIdcfu1HapswPQ==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.2.tgz", + "integrity": "sha512-Zt6heIGsdqERkxctIpvN5Pv3edgBrhoeb3yHyxffd4InN0AX2SVNKSrhdDZKGQICVOxWP/q4DyhpfPNMSrpIiA==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" } }, "@types/sinon-chai": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.11.tgz", - "integrity": "sha512-1C5SBFzwn9hjiMr1xfqbULcSI9qXVpkGZT/LYbbd3jWiTo2MSvA+iFfwODlSoAXGeCgBw6S509dxy8zSIacr3Q==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", + "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", "dev": true, "requires": { "@types/chai": "*", @@ -3347,9 +3347,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -3656,15 +3656,15 @@ "dev": true }, "eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "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.3", - "@eslint/js": "8.53.0", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4216,9 +4216,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json2iob": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.8.tgz", - "integrity": "sha512-ldw0UnBIDdTuEiFQgR7A4yYUPjSgIt4IWh/RclSar4rD26oaBByy1cK2f/o5XsmfjkXkoZMJGPqM5SYBrJtlQA==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.10.tgz", + "integrity": "sha512-HJPBXPhe6Sm0hiZYqdDpehBaPHlP0nfHikTeaCVE0GXahnMu4iS49ljZWw4jTZjZzsub1m2pt2HO2S8ZXeScTg==", "requires": { "json-bigint": "^1.0.0" } @@ -4932,9 +4932,9 @@ "dev": true }, "typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true }, "undici-types": { diff --git a/package.json b/package.json index ef7705cf..8223526d 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ "dependencies": { "@iobroker/adapter-core": "^3.0.4", "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.6.0", + "axios": "^1.6.2", "json-bigint": "^1.0.0", - "json2iob": "^2.4.8", + "json2iob": "^2.4.10", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", @@ -33,22 +33,22 @@ "description": "Adapter for VW Connect", "devDependencies": { "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.9", - "@types/chai-as-promised": "^7.1.7", - "@types/mocha": "^10.0.3", - "@types/node": "^20.8.10", - "@types/proxyquire": "^1.3.30", - "@types/sinon": "^17.0.0", - "@types/sinon-chai": "^3.2.11", + "@types/chai": "^4.3.11", + "@types/chai-as-promised": "^7.1.8", + "@types/mocha": "^10.0.6", + "@types/node": "^20.10.0", + "@types/proxyquire": "^1.3.31", + "@types/sinon": "^17.0.2", + "@types/sinon-chai": "^3.2.12", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^17.0.1", "sinon-chai": "^3.7.0", - "typescript": "~5.2.2" + "typescript": "~5.3.2" }, "engines": { "node": ">=10.0.0" From af8cf7ccd0b8ba3f50512f083bdd39e9aacd2fd5 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 29 Nov 2023 15:52:17 +0100 Subject: [PATCH 586/729] add honk flash --- main.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 4abc8a49..6b9b97bd 100644 --- a/main.js +++ b/main.js @@ -1977,6 +1977,28 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".remote.honkandflash", { + type: "state", + common: { + name: "Hupen und Licht Honk and Flash", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); + this.extendObject(vin + ".remote.flash", { + type: "state", + common: { + name: "Licht Flash", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); } resolve(); return; @@ -3632,16 +3654,38 @@ class VwWeconnect extends utils.Adapter { // body = JSON.stringify(body); } + if (action === "honkandflash" || action === "flash") { + const latState = await this.getStateAsync(vin + ".parkingposition.lat"); + const longState = await this.getStateAsync(vin + ".parkingposition.lon"); + if (!latState || !longState) { + this.log.error("No parking position found"); + reject(); + return; + } + body = { + duration_s: 15, + mode: action, + userPosition: { + latitude: latState.val, + longitude: longState.val, + }, + }; + action = "honkandflash"; + } let method = "POST"; if (value === "settings") { method = "PUT"; } - this.log.debug("https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/" + action + "/" + value); + let url = "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/" + action; + if (value) { + url += "/" + value; + } + this.log.debug(url); this.log.debug(JSON.stringify(body)); request( { method: method, - url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/" + action + "/" + value, + url: url, headers: { "content-type": "application/json", @@ -5486,6 +5530,15 @@ class VwWeconnect extends utils.Adapter { this.log.error("failed set state"); }); } + + if (action === "honkandflash" || action === "flash") { + if (this.config.type === "id" || this.config.type === "audietron") { + this.setIdRemote(vin, action).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } if (action === "flash") { //HONK_AND_FLASH const idArray = id.split("."); From 1280ee8ede6613e68252112b3c45f19b3291f1f8 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 30 Nov 2023 19:21:52 +0100 Subject: [PATCH 587/729] extract method --- main.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 6b9b97bd..6c8a7d94 100644 --- a/main.js +++ b/main.js @@ -4481,6 +4481,15 @@ class VwWeconnect extends utils.Adapter { ); }); } + async setOtherStatesInChannelNull(channel, ts) { + const states = await this.getStatesAsync(channel + ".*"); + const allIds = Object.keys(states); + for (const keyName of allIds) { + if (states[keyName] && states[keyName].ts < ts) { + await this.setStateAsync(keyName, null, true); + } + } + } async setIsCarMoving(vin, isMoving) { await this.setObjectNotExistsAsync(vin + ".position.isMoving", { @@ -5914,7 +5923,7 @@ class VwWeconnect extends utils.Adapter { }); await this.setStateAsync(vin + ".position.address." + key, body.address[key], true); } - this.json2iob.setOtherStatesInChannelNull(vin + ".position.address", timestamp); + this.setOtherStatesInChannelNull(vin + ".position.address", timestamp); } catch (err) { this.log.error(err); } From 543517ea327ebe28421081d0167ed3dfa0c74180 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 2 Dec 2023 13:52:37 +0100 Subject: [PATCH 588/729] add wakeup and window heating feedback --- main.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/main.js b/main.js index 6c8a7d94..0d099c6e 100644 --- a/main.js +++ b/main.js @@ -1977,6 +1977,28 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".remote.refresh", { + type: "state", + common: { + name: "Refresh Data", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); + this.extendObject(vin + ".remote.vehiclewakeuptrigger", { + type: "state", + common: { + name: "Wake up car and refresh data only every 15min allowed", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); this.extendObject(vin + ".remote.honkandflash", { type: "state", common: { @@ -4991,6 +5013,10 @@ class VwWeconnect extends utils.Adapter { this.updateStatus(); return; } + if (id.indexOf("remote.refresh") !== -1) { + this.updateStatus(); + return; + } if (id.indexOf("remote.forceRefresh") !== -1) { this.requestStatusUpdate(vin); return; @@ -5548,6 +5574,14 @@ class VwWeconnect extends utils.Adapter { return; } } + if (action === "vehiclewakeuptrigger") { + if (this.config.type === "id" || this.config.type === "audietron") { + this.setIdRemote(vin, action).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } if (action === "flash") { //HONK_AND_FLASH const idArray = id.split("."); @@ -5740,6 +5774,9 @@ class VwWeconnect extends utils.Adapter { if (id.endsWith(".parkingposition.lon")) { this.setLongitude(vin, state.val); } + if (id.indexOf(".windowHeatingStatus") !== -1) { + this.setState(vin + ".remote.windowheating", state.val.toLocaleLowerCase() === "off" ? false : true, true); + } } } else { // The state was deleted From a73e62838766e57397dc37c8ef15b670ac0adf92 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 3 Dec 2023 00:20:05 +0100 Subject: [PATCH 589/729] add correct f temp --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 0d099c6e..1477126a 100644 --- a/main.js +++ b/main.js @@ -3673,7 +3673,9 @@ class VwWeconnect extends utils.Adapter { body[key] = climateStates[keyName].val; } }); - + if (body.targetTemperature_C && body.targetTemperature_F) { + body.targetTemperature_F = Math.round((body.targetTemperature_C * 9) / 5 + 32); + } // body = JSON.stringify(body); } if (action === "honkandflash" || action === "flash") { From 6458a067815a4f78733c7d21454b1f0c9c4ab45b Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 3 Dec 2023 00:39:11 +0100 Subject: [PATCH 590/729] adjust climatastion submit --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 1477126a..7aa01409 100644 --- a/main.js +++ b/main.js @@ -3673,8 +3673,9 @@ class VwWeconnect extends utils.Adapter { body[key] = climateStates[keyName].val; } }); - if (body.targetTemperature_C && body.targetTemperature_F) { - body.targetTemperature_F = Math.round((body.targetTemperature_C * 9) / 5 + 32); + if (body.targetTemperature_C) { + body.targetTemperature = body.targetTemperature_C; + body.targetTemperatureUnit = "celcius"; } // body = JSON.stringify(body); } From 13d2cee007c79eee5f929cb36877797d96788b7a Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 3 Dec 2023 21:00:49 +0100 Subject: [PATCH 591/729] add check for lats trips --- .gitignore | 3 +- admin/index_m.html | 4 ++ io-package.json | 7 +- main.js | 156 ++++++++++++++++++++++++--------------------- 4 files changed, 96 insertions(+), 74 deletions(-) diff --git a/.gitignore b/.gitignore index 000d0acb..dc5f07f9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ Thumbs.db # i18n intermediate files admin/i18n/flat.txt -admin/i18n/*/flat.txt \ No newline at end of file +admin/i18n/*/flat.txt +.DS_Store diff --git a/admin/index_m.html b/admin/index_m.html index a48b763d..1b5ddfdb 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -126,6 +126,10 @@
+
+ + Letzten Trip laden +
{ - this.log.debug(JSON.stringify(res.data)); - if (res.data && res.data.data) { - this.json2iob.parse(vin + ".shorttermlast", res.data.data, { - forceIndex: false, - channelName: "last shortterm trip", - }); - } + //check if last trip was less than 15min ago + if (Date.now() - this.config.lastTripCheck > 1000 * 60 * 15) { + if (!this.blockTrip && this.config.lastTrips) { + this.config.lastTripCheck = Date.now(); + await axios({ + method: "get", + url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/shortterm/last", + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, }) - .catch((error) => { - if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; - } - if (error.response && error.response.status === 404) { - this.log.info("No last shorterm trips found. Please check if your car supports shortterm trips."); - this.blockTrip = true; - return; - } - this.log.error(error); - this.log.error("No last shortterm trips found"); - error && error.response && this.log.error(JSON.stringify(error.response.data)); - }); - } - if (!this.blockTrip) { - await axios({ - method: "get", - url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/longterm/last", - headers: { - "content-type": "application/json", - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - "content-version": "1", - }, - }) - .then(async (res) => { - this.log.debug(JSON.stringify(res.data)); - if (res.data && res.data.data) { - this.json2iob.parse(vin + ".longtermlast", res.data.data, { - forceIndex: false, - channelName: "last longterm trip", - }); - } + .then(async (res) => { + this.log.debug(JSON.stringify(res.data)); + if (res.data && res.data.data) { + this.json2iob.parse(vin + ".shorttermlast", res.data.data, { + forceIndex: false, + channelName: "last shortterm trip", + }); + } + }) + .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } + if (error.response && error.response.status === 404) { + this.log.info("No last shorterm trips found. Please check if your car supports shortterm trips."); + this.blockTrip = true; + return; + } + + this.log.error(error); + this.log.error("No last shortterm trips found"); + error && error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } + if (!this.blockTrip && this.config.lastTrips) { + await axios({ + method: "get", + url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/longterm/last", + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, }) - .catch((error) => { - if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; - } - if (error.response && error.response.status === 404) { - this.log.info("No last longterm trips found. Please check if your car supports longterm trips."); - this.blockTrip = true; - return; - } - this.log.error(error); - this.log.error("No last longterm trips found"); - error && error.response && this.log.error(JSON.stringify(error.response.data)); - }); + .then(async (res) => { + this.log.debug(JSON.stringify(res.data)); + if (res.data && res.data.data) { + this.json2iob.parse(vin + ".longtermlast", res.data.data, { + forceIndex: false, + channelName: "last longterm trip", + }); + } + }) + .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } + if (error.response && error.response.status === 404) { + this.log.info("No last longterm trips found. Please check if your car supports longterm trips."); + this.blockTrip = true; + return; + } + this.log.error(error); + this.log.error("No last longterm trips found"); + error && error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } + } else { + this.log.debug("Skip last trip check because of last check was less than 15min ago"); } }); } @@ -3675,7 +3683,7 @@ class VwWeconnect extends utils.Adapter { }); if (body.targetTemperature_C) { body.targetTemperature = body.targetTemperature_C; - body.targetTemperatureUnit = "celcius"; + body.targetTemperatureUnit = "celsius"; } // body = JSON.stringify(body); } @@ -5126,6 +5134,10 @@ class VwWeconnect extends utils.Adapter { } }); body[action] = state.val; + if (action === "targetTemperature_C") { + body["targetTemperature"] = state.val; + body["targetTemperatureUnit"] = "celsius"; + } const firstPart = settingsPath.split("Settings")[0]; this.setIdRemote(vin, firstPart, "settings", body).catch(() => { this.log.error("failed set state " + action); From 3733904bead4d068381ddb05080f4e80b652b1fd Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 3 Dec 2023 21:04:28 +0100 Subject: [PATCH 592/729] adjust settings --- admin/index_m.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 1b5ddfdb..e2b38606 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -128,8 +128,10 @@
- Letzten Trip laden + Nur den letzten Trip laden
+
+
- Auswahl der abzurufenden Fahrdaten (Trips) + Auswahl der kompletten abzurufenden Fahrdaten (Trips)
+ +
+
+
Lizenzinformationen laden
-
diff --git a/io-package.json b/io-package.json index ebb1e9bc..cf3ed3a6 100644 --- a/io-package.json +++ b/io-package.json @@ -138,7 +138,8 @@ "rights": false, "tripType": "none", "numberOfTrips": 1, - "lastTrips": true + "lastTrips": true, + "lastTripDays": 30 }, "objects": [], "instanceObjects": [ diff --git a/main.js b/main.js index d4a64c26..073fbbe4 100644 --- a/main.js +++ b/main.js @@ -2689,10 +2689,19 @@ class VwWeconnect extends utils.Adapter { // error.response && this.log.error(JSON.stringify(error.response.data)); }); } + const currentDate = new Date().toISOString(); + const minusXDays = new Date(new Date().setDate(new Date().getDate() - this.config.lastTripDays)).toISOString(); + if (this.config.tripShortTerm == true && !this.blockTrip) { await axios({ method: "get", - url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/shortterm", + url: + "https://emea.bff.cariad.digital/vehicle/v1/trips/" + + vin + + "/shortterm?from=" + + minusXDays + + "&to=" + + currentDate, headers: { "content-type": "application/json", accept: "*/*", @@ -2727,7 +2736,13 @@ class VwWeconnect extends utils.Adapter { if (this.config.tripLongTerm == true && !this.blockTrip) { await axios({ method: "get", - url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/longterm", + url: + "https://emea.bff.cariad.digital/vehicle/v1/trips/" + + vin + + "/longterm?from=" + + minusXDays + + "&to=" + + currentDate, headers: { "content-type": "application/json", accept: "*/*", From 1aecb8be4c4a6a239da2c974cd894de97eb55645 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 6 Dec 2023 21:20:45 +0100 Subject: [PATCH 598/729] fix last trip --- admin/index_m.html | 2 +- main.js | 177 ++++++++++++++++++++++++--------------------- 2 files changed, 95 insertions(+), 84 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index c322496d..5d8645e8 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -162,7 +162,7 @@
Letzen X Tage der Fahrdaten (Trips) abrufen. Mehr als 30 Tage ist dauerhaft nicht empfohlen.
diff --git a/main.js b/main.js index 073fbbe4..ccca3645 100644 --- a/main.js +++ b/main.js @@ -2157,6 +2157,17 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".remote.windowheating", { + type: "state", + common: { + name: "Scheibenheizung Window Heating", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); }); resolve(); return; @@ -2691,93 +2702,93 @@ class VwWeconnect extends utils.Adapter { } const currentDate = new Date().toISOString(); const minusXDays = new Date(new Date().setDate(new Date().getDate() - this.config.lastTripDays)).toISOString(); - - if (this.config.tripShortTerm == true && !this.blockTrip) { - await axios({ - method: "get", - url: - "https://emea.bff.cariad.digital/vehicle/v1/trips/" + - vin + - "/shortterm?from=" + - minusXDays + - "&to=" + - currentDate, - headers: { - "content-type": "application/json", - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - "content-version": "1", - }, - }) - .then(async (res) => { - this.log.debug(JSON.stringify(res.data)); - if (res.data && res.data.data) { - if (this.config.numberOfTrips > 0) { - res.data.data = res.data.data.slice(0, this.config.numberOfTrips); - } - this.json2iob.parse(vin + ".shortterm", res.data.data, { - forceIndex: true, - channelName: "shortterm trips", - }); - } + if (Date.now() - this.lastTripCheck > 1000 * 60 * 15) { + this.lastTripCheck = Date.now(); + if (this.config.tripShortTerm == true && !this.blockTrip) { + await axios({ + method: "get", + url: + "https://emea.bff.cariad.digital/vehicle/v1/trips/" + + vin + + "/shortterm?from=" + + minusXDays + + "&to=" + + currentDate, + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, }) - .catch((error) => { - if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; - } - this.log.error(error); - this.log.error("No shortterm trips found please disable in your settings"); - error && error.response && this.log.error(JSON.stringify(error.response.data)); - }); - } - if (this.config.tripLongTerm == true && !this.blockTrip) { - await axios({ - method: "get", - url: - "https://emea.bff.cariad.digital/vehicle/v1/trips/" + - vin + - "/longterm?from=" + - minusXDays + - "&to=" + - currentDate, - headers: { - "content-type": "application/json", - accept: "*/*", - authorization: "Bearer " + this.config.atoken, - "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, - "content-version": "1", - }, - }) - .then(async (res) => { - this.log.debug(JSON.stringify(res.data)); - if (res.data && res.data.data) { - if (this.config.numberOfTrips > 0) { - res.data.data = res.data.data.slice(0, this.config.numberOfTrips); + .then(async (res) => { + this.log.debug(JSON.stringify(res.data)); + if (res.data && res.data.data) { + if (this.config.numberOfTrips > 0) { + res.data.data = res.data.data.slice(0, this.config.numberOfTrips); + } + this.json2iob.parse(vin + ".shortterm", res.data.data, { + forceIndex: true, + channelName: "shortterm trips", + }); } - this.json2iob.parse(vin + ".longterm", res.data.data, { - forceIndex: true, - channelName: "logterm trips", - }); - } + }) + .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } + this.log.error(error); + this.log.error("No shortterm trips found please disable in your settings"); + error && error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } + if (this.config.tripLongTerm == true && !this.blockTrip) { + await axios({ + method: "get", + url: + "https://emea.bff.cariad.digital/vehicle/v1/trips/" + + vin + + "/longterm?from=" + + minusXDays + + "&to=" + + currentDate, + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, }) - .catch((error) => { - if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; - } - this.log.error(error); - this.log.error("No longterm trips found please disable in your settings"); - error && error.response && this.log.error(JSON.stringify(error.response.data)); - }); - } - //check if last trip was less than 15min ago - if (Date.now() - this.config.lastTripCheck > 1000 * 60 * 15) { + .then(async (res) => { + this.log.debug(JSON.stringify(res.data)); + if (res.data && res.data.data) { + if (this.config.numberOfTrips > 0) { + res.data.data = res.data.data.slice(0, this.config.numberOfTrips); + } + this.json2iob.parse(vin + ".longterm", res.data.data, { + forceIndex: true, + channelName: "logterm trips", + }); + } + }) + .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } + this.log.error(error); + this.log.error("No longterm trips found please disable in your settings"); + error && error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } + //check if last trip was less than 15min ago + if (!this.blockTrip && this.config.lastTrips) { - this.config.lastTripCheck = Date.now(); await axios({ method: "get", url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/shortterm/last", From 8fa578ca0c0bab80b2c01c0f7d6b357cc95eb990 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 6 Dec 2023 21:22:39 +0100 Subject: [PATCH 599/729] 0.3.5 --- io-package.json | 6 +++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/io-package.json b/io-package.json index cf3ed3a6..b3d1c469 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.3.2", + "version": "0.3.5", "news": { + "0.3.5": { + "en": "Improve trip loading and fix windowheating warning", + "de": "Verbesserung der Trip Abfrage und Fix für windowheating Warnung" + }, "0.3.2": { "en": "Improve Volkswagen App remotes (window heatings,settings)", "de": "Verbesserung der Volkswagen App Remotes (Fensterheizungen, Einstellungen)" diff --git a/package-lock.json b/package-lock.json index 6dee14cf..f07f60ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.3.2", + "version": "0.3.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.3.2", + "version": "0.3.5", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index d9dfee9c..80b587af 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.3.2" + "version": "0.3.5" } From a834e5c35400eed15d623eee28703c0636ac1a6d Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 6 Dec 2023 22:49:02 +0100 Subject: [PATCH 600/729] 0.3.6 --- io-package.json | 4 +-- main.js | 92 ++++++++++++++++++++++++++++++++++++++++++++++- package-lock.json | 4 +-- package.json | 2 +- 4 files changed, 96 insertions(+), 6 deletions(-) diff --git a/io-package.json b/io-package.json index b3d1c469..dfd49b44 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.3.5", + "version": "0.3.6", "news": { - "0.3.5": { + "0.3.6": { "en": "Improve trip loading and fix windowheating warning", "de": "Verbesserung der Trip Abfrage und Fix für windowheating Warnung" }, diff --git a/main.js b/main.js index ccca3645..15935076 100644 --- a/main.js +++ b/main.js @@ -2726,6 +2726,10 @@ class VwWeconnect extends utils.Adapter { .then(async (res) => { this.log.debug(JSON.stringify(res.data)); if (res.data && res.data.data) { + //sort by id + res.data.data.sort((a, b) => { + return b.id - a.id; + }); if (this.config.numberOfTrips > 0) { res.data.data = res.data.data.slice(0, this.config.numberOfTrips); } @@ -2767,6 +2771,10 @@ class VwWeconnect extends utils.Adapter { .then(async (res) => { this.log.debug(JSON.stringify(res.data)); if (res.data && res.data.data) { + //sort by id + res.data.data.sort((a, b) => { + return a.id - b.id; + }); if (this.config.numberOfTrips > 0) { res.data.data = res.data.data.slice(0, this.config.numberOfTrips); } @@ -2786,7 +2794,52 @@ class VwWeconnect extends utils.Adapter { error && error.response && this.log.error(JSON.stringify(error.response.data)); }); } - //check if last trip was less than 15min ago + + if (this.config.tripCyclic == true && !this.blockTrip) { + await axios({ + method: "get", + url: + "https://emea.bff.cariad.digital/vehicle/v1/trips/" + + vin + + "/cyclic?from=" + + minusXDays + + "&to=" + + currentDate, + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, + }) + .then(async (res) => { + this.log.debug(JSON.stringify(res.data)); + if (res.data && res.data.data) { + //sort by id + res.data.data.sort((a, b) => { + return b.id - a.id; + }); + if (this.config.numberOfTrips > 0) { + res.data.data = res.data.data.slice(0, this.config.numberOfTrips); + } + this.json2iob.parse(vin + ".cyclic", res.data.data, { + forceIndex: true, + channelName: "cyclic trips", + }); + } + }) + .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } + this.log.error(error); + this.log.error("No shortterm trips found please disable in your settings"); + error && error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } if (!this.blockTrip && this.config.lastTrips) { await axios({ @@ -2863,6 +2916,43 @@ class VwWeconnect extends utils.Adapter { error && error.response && this.log.error(JSON.stringify(error.response.data)); }); } + if (!this.blockTrip && this.config.lastTrips) { + await axios({ + method: "get", + url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/cyclic/last", + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, + }) + .then(async (res) => { + this.log.debug(JSON.stringify(res.data)); + if (res.data && res.data.data) { + this.json2iob.parse(vin + ".cycliclast", res.data.data, { + forceIndex: false, + channelName: "last cyclic trip", + }); + } + }) + .catch((error) => { + if (error.response && error.response.status >= 500) { + this.log.info("Server not available:" + JSON.stringify(error.response.data)); + return; + } + if (error.response && error.response.status === 404) { + this.log.info("No last cyclic trips found. Please check if your car supports cyclic trips."); + this.blockTrip = true; + return; + } + this.log.error(error); + this.log.error("No last cyclic trips found"); + error && error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } } else { this.log.debug("Skip last trip check because of last check was less than 15min ago"); } diff --git a/package-lock.json b/package-lock.json index f07f60ce..79a0d665 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.3.5", + "version": "0.3.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.3.5", + "version": "0.3.6", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 80b587af..0051854b 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.3.5" + "version": "0.3.6" } From bcc30d976ffc608a1c0ee96042047e55446a2176 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 13 Dec 2023 10:04:36 +0100 Subject: [PATCH 601/729] add missing remotes for skoda --- main.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/main.js b/main.js index 15935076..8e21c277 100644 --- a/main.js +++ b/main.js @@ -2232,6 +2232,46 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.maxChargeCurrent", { + type: "state", + common: { + name: "Set maxChargeCurrent", + type: "number", + role: "number", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.chargeMinLimit", { + type: "state", + common: { + name: "Set chargeMinLimit", + type: "number", + role: "number", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.climatisation", { + type: "state", + common: { + name: "Start/Stop Climatisation", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.climatisationv2", { + type: "state", + common: { + name: "Start/Stop Climatisation v2", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); }); resolve(); return; From a336d6b81048cf5cbdb5233d0a03862ce510a94b Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 13 Dec 2023 19:13:40 +0100 Subject: [PATCH 602/729] fix audi states --- main.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/main.js b/main.js index 8e21c277..2cecca9d 100644 --- a/main.js +++ b/main.js @@ -2376,6 +2376,36 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.maxChargeCurrent", { + type: "state", + common: { + name: "Set maxChargeCurrent", + type: "number", + role: "number", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.chargeMinLimit", { + type: "state", + common: { + name: "Set chargeMinLimit", + type: "number", + role: "number", + write: true, + }, + native: {}, + }); + this.setObjectNotExists(vin + ".remote.windowheating", { + type: "state", + common: { + name: "Start Windowheating", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); }); resolve(); return; From 803ed8650d7a0d694e7d13c561420f6ef73418b9 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 19 Dec 2023 08:35:13 +0100 Subject: [PATCH 603/729] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d72ec2e3..03eae6c7 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ You can set climatisaton temperature in ## Changelog +### 0.3.6 + +- Fix VW Status Update + ### 0.0.65 - Fix Cupra login From daa1019c6840f1c189289b3a2dbaa15a3482e6bf Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 19 Dec 2023 11:14:02 +0100 Subject: [PATCH 604/729] change statue update --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 2cecca9d..cf8f8602 100644 --- a/main.js +++ b/main.js @@ -2659,7 +2659,10 @@ class VwWeconnect extends utils.Adapter { return new Promise(async (resolve, reject) => { await axios({ method: "get", - url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + "/selectivestatus?jobs=all", + url: + "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + + vin + + "/selectivestatus?jobs=access,activeVentilation,auxiliaryHeating,batteryChargingCare,batterySupport,charging,chargingProfiles,climatisation,climatisationTimers,departureProfiles,fuelStatus,honkAndFlash,hybridCarAuxiliaryHeating,userCapabilities,vehicleHealthWarnings,vehicleHealthInspection,vehicleLights,measurements,departureTimers", headers: { "content-type": "application/json", accept: "*/*", From e023bb9ed5865c6cf19bb9c004bed9b7cf83825d Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 19 Dec 2023 11:28:49 +0100 Subject: [PATCH 605/729] 0.4.0 --- io-package.json | 6 +++- package-lock.json | 76 +++++++++++++++++++++++------------------------ package.json | 10 +++---- 3 files changed, 48 insertions(+), 44 deletions(-) diff --git a/io-package.json b/io-package.json index dfd49b44..f55b799b 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.3.6", + "version": "0.4.0", "news": { + "0.4.0": { + "en": "Fix Volkswagen App status update", + "de": "Fix für Volkswagen App Status Update" + }, "0.3.6": { "en": "Improve trip loading and fix windowheating warning", "de": "Verbesserung der Trip Abfrage und Fix für windowheating Warnung" diff --git a/package-lock.json b/package-lock.json index 79a0d665..a206e84b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "iobroker.vw-connect", - "version": "0.3.6", + "version": "0.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.3.6", + "version": "0.4.0", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", "@peculiar/webcrypto": "^1.4.3", "axios": "^1.6.2", "json-bigint": "^1.0.0", - "json2iob": "^2.4.11", + "json2iob": "^2.5.1", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", @@ -25,19 +25,19 @@ "@types/chai": "^4.3.11", "@types/chai-as-promised": "^7.1.8", "@types/mocha": "^10.0.6", - "@types/node": "^20.10.3", + "@types/node": "^20.10.5", "@types/proxyquire": "^1.3.31", "@types/sinon": "^17.0.2", "@types/sinon-chai": "^3.2.12", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", - "eslint": "^8.55.0", + "eslint": "^8.56.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^17.0.1", "sinon-chai": "^3.7.0", - "typescript": "~5.3.2" + "typescript": "~5.3.3" }, "engines": { "node": ">=10.0.0" @@ -100,9 +100,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "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" @@ -382,9 +382,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -989,15 +989,15 @@ } }, "node_modules/eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "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.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1746,9 +1746,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json2iob": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.11.tgz", - "integrity": "sha512-P/LvlDD4vApnihWr9UVwRyukL9+1Dt5w5sszsnqn8nMUgRa0nMHtrpYCb+Rq4D33Muzv5Vq8v45kwjJMCJu2iA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.5.1.tgz", + "integrity": "sha512-Mbpgwsl1oKbECUXcIS6Z6V+QcDBsPKuqDIddrOmViZiWGZoLeu8fvjmjVpKB7ftAPa6MK+mfohgnlCve+fagtw==", "dependencies": { "json-bigint": "^1.0.0" } @@ -2722,9 +2722,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2942,9 +2942,9 @@ } }, "@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "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": { @@ -3187,9 +3187,9 @@ "dev": true }, "@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -3656,15 +3656,15 @@ "dev": true }, "eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "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.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4216,9 +4216,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json2iob": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.4.11.tgz", - "integrity": "sha512-P/LvlDD4vApnihWr9UVwRyukL9+1Dt5w5sszsnqn8nMUgRa0nMHtrpYCb+Rq4D33Muzv5Vq8v45kwjJMCJu2iA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.5.1.tgz", + "integrity": "sha512-Mbpgwsl1oKbECUXcIS6Z6V+QcDBsPKuqDIddrOmViZiWGZoLeu8fvjmjVpKB7ftAPa6MK+mfohgnlCve+fagtw==", "requires": { "json-bigint": "^1.0.0" } @@ -4932,9 +4932,9 @@ "dev": true }, "typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true }, "undici-types": { diff --git a/package.json b/package.json index 0051854b..27fd47ff 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@peculiar/webcrypto": "^1.4.3", "axios": "^1.6.2", "json-bigint": "^1.0.0", - "json2iob": "^2.4.11", + "json2iob": "^2.5.1", "ngeohash": "^0.6.3", "qs": "^6.11.2", "request": "^2.88.2", @@ -36,19 +36,19 @@ "@types/chai": "^4.3.11", "@types/chai-as-promised": "^7.1.8", "@types/mocha": "^10.0.6", - "@types/node": "^20.10.3", + "@types/node": "^20.10.5", "@types/proxyquire": "^1.3.31", "@types/sinon": "^17.0.2", "@types/sinon-chai": "^3.2.12", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", - "eslint": "^8.55.0", + "eslint": "^8.56.0", "eslint-plugin-promise": "^6.1.1", "mocha": "^10.2.0", "proxyquire": "^2.1.3", "sinon": "^17.0.1", "sinon-chai": "^3.7.0", - "typescript": "~5.3.2" + "typescript": "~5.3.3" }, "engines": { "node": ">=10.0.0" @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.3.6" + "version": "0.4.0" } From 4b39b8d4b7a7fdb99f947065cae5e6035cd1bd97 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 19 Dec 2023 20:22:16 +0100 Subject: [PATCH 606/729] v0.4.1 --- README.md | 4 ++-- io-package.json | 4 ++-- main.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 03eae6c7..54bf070e 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,10 @@ You can set climatisaton temperature in ## Changelog -### 0.3.6 +### 0.4.1 - Fix VW Status Update - + ### 0.0.65 - Fix Cupra login diff --git a/io-package.json b/io-package.json index f55b799b..c3516796 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.4.0", + "version": "0.4.1", "news": { - "0.4.0": { + "0.4.1": { "en": "Fix Volkswagen App status update", "de": "Fix für Volkswagen App Status Update" }, diff --git a/main.js b/main.js index cf8f8602..500bb439 100644 --- a/main.js +++ b/main.js @@ -2662,7 +2662,7 @@ class VwWeconnect extends utils.Adapter { url: "https://emea.bff.cariad.digital/vehicle/v1/vehicles/" + vin + - "/selectivestatus?jobs=access,activeVentilation,auxiliaryHeating,batteryChargingCare,batterySupport,charging,chargingProfiles,climatisation,climatisationTimers,departureProfiles,fuelStatus,honkAndFlash,hybridCarAuxiliaryHeating,userCapabilities,vehicleHealthWarnings,vehicleHealthInspection,vehicleLights,measurements,departureTimers", + "/selectivestatus?jobs=access,activeVentilation,auxiliaryHeating,batteryChargingCare,batterySupport,charging,chargingProfiles,climatisation,climatisationTimers,departureProfiles,fuelStatus,honkAndFlash,hybridCarAuxiliaryHeating,vehicleHealthWarnings,vehicleHealthInspection,vehicleLights,measurements,departureTimers", headers: { "content-type": "application/json", accept: "*/*", diff --git a/package-lock.json b/package-lock.json index a206e84b..67b836ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.4.0", + "version": "0.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.4.0", + "version": "0.4.1", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 27fd47ff..563f4c73 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.4.0" + "version": "0.4.1" } From 3bdf7271f809464125ed2ea67d46d1025d366f57 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 20 Dec 2023 10:27:09 +0100 Subject: [PATCH 607/729] 0.4.2 --- io-package.json | 8 ++++---- main.js | 26 ++++++++++++++------------ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/io-package.json b/io-package.json index c3516796..ceeee114 100644 --- a/io-package.json +++ b/io-package.json @@ -1,11 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.4.1", + "version": "0.4.2", "news": { - "0.4.1": { - "en": "Fix Volkswagen App status update", - "de": "Fix für Volkswagen App Status Update" + "0.4.2": { + "en": "Fix Volkswagen App status update and improve logging", + "de": "Fix für Volkswagen App Status Update und Verbesserung der Logging Ausgabe" }, "0.3.6": { "en": "Improve trip loading and fix windowheating warning", diff --git a/main.js b/main.js index 500bb439..03296158 100644 --- a/main.js +++ b/main.js @@ -53,6 +53,7 @@ class VwWeconnect extends utils.Adapter { this.hasRemoteLock = false; this.isFirstLocation = true; this.lastTripCheck = 0; + this.firstStart = true; this.statesArray = [ { @@ -2814,8 +2815,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; + this.log.info("Server not available:"); } this.log.error(error); this.log.error("No shortterm trips found please disable in your settings"); @@ -2859,8 +2859,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; + this.log.info("Server not available:"); } this.log.error(error); this.log.error("No longterm trips found please disable in your settings"); @@ -2905,8 +2904,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; + this.log.info("Server not available"); } this.log.error(error); this.log.error("No shortterm trips found please disable in your settings"); @@ -2938,8 +2936,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; + this.log.info("Server not available:"); } if (error.response && error.response.status === 404) { this.log.info("No last shorterm trips found. Please check if your car supports shortterm trips."); @@ -2976,8 +2973,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; + this.log.info("Server not available:"); } if (error.response && error.response.status === 404) { this.log.info("No last longterm trips found. Please check if your car supports longterm trips."); @@ -3013,8 +3009,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); - return; + this.log.info("Server not available:"); } if (error.response && error.response.status === 404) { this.log.info("No last cyclic trips found. Please check if your car supports cyclic trips."); @@ -3351,6 +3346,13 @@ class VwWeconnect extends utils.Adapter { this.log.debug("304 No values updated"); return; } + if (error.response.status === 403) { + if (this.firstStart) { + this.log.debug(JSON.stringify(error.response.data)); + this.firstStart = false; + return; + } + } if (error.response.status === 412) { this.log.debug(JSON.stringify(error.response.data)); return; diff --git a/package-lock.json b/package-lock.json index 67b836ee..5ef4d91a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.4.1", + "version": "0.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.4.1", + "version": "0.4.2", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 563f4c73..7c74d236 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.4.1" + "version": "0.4.2" } From 655f5db05f992cb10aa5924721a7aeb9d58e1b26 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 22 Dec 2023 22:36:12 +0100 Subject: [PATCH 608/729] fix skodae --- io-package.json | 6 +++++- main.js | 14 +++++++++++--- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/io-package.json b/io-package.json index ceeee114..42c93833 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.4.2", + "version": "0.5.0", "news": { + "0.5.0": { + "en": "Fix for SkodaE. Temporary disabled parking position and set min interval to 10min", + "de": "Fix für SkodaE. Parking Position und ein Update Interval unter 10min ist zur Zeit deaktiviert für SkodaE" + }, "0.4.2": { "en": "Fix Volkswagen App status update and improve logging", "de": "Fix für Volkswagen App Status Update und Verbesserung der Logging Ausgabe" diff --git a/main.js b/main.js index 03296158..2a30b865 100644 --- a/main.js +++ b/main.js @@ -37,7 +37,7 @@ class VwWeconnect extends utils.Adapter { this.json2iob = new Json2iob(this); this.jar = request.jar(); - this.userAgent = "ioBroker v"; + this.userAgent = "iobroker v"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -287,6 +287,14 @@ class VwWeconnect extends utils.Adapter { this.log.info("Interval of 0 is not allowed reset to 1"); this.config.interval = 1; } + if (this.config.type === "skodae") { + this.log.info("Parking Postion is temporary disabled for Skoda E"); + if (this.config.interval < 10) { + this.log.info("Interval under 10min is temporary not allowed for Skoda E reset to 10min"); + this.config.interval = 10; + } + } + this.tripTypes = []; if (this.config.tripShortTerm == true) { this.tripTypes.push("shortTerm"); @@ -3278,11 +3286,11 @@ class VwWeconnect extends utils.Adapter { const statusArray = [ { path: "air-conditioning", version: "v1", postfix: "/status" }, { path: "air-conditioning", version: "v1", postfix: "/settings" }, - { path: "air-conditioning", version: "v1", postfix: "/timers" }, + // { path: "air-conditioning", version: "v1", postfix: "/timers" }, { path: "charging", version: "v1", postfix: "/status" }, { path: "charging", version: "v1", postfix: "/settings" }, { path: "vehicle-status", version: "v2", postfix: "" }, - { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth + // { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth ]; for (const status of statusArray) { diff --git a/package-lock.json b/package-lock.json index 5ef4d91a..526bd726 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.4.2", + "version": "0.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.4.2", + "version": "0.5.0", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 7c74d236..3fd88bb7 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.4.2" + "version": "0.5.0" } From b18184cbbd227c18421da9d23b183bcf7a85d77b Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 22 Dec 2023 22:51:45 +0100 Subject: [PATCH 609/729] 0.5.1 --- io-package.json | 4 ++-- main.js | 9 ++++++--- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/io-package.json b/io-package.json index 42c93833..7290d81d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.5.0", + "version": "0.5.1", "news": { - "0.5.0": { + "0.5.1": { "en": "Fix for SkodaE. Temporary disabled parking position and set min interval to 10min", "de": "Fix für SkodaE. Parking Position und ein Update Interval unter 10min ist zur Zeit deaktiviert für SkodaE" }, diff --git a/main.js b/main.js index 2a30b865..2aadc04c 100644 --- a/main.js +++ b/main.js @@ -406,8 +406,10 @@ class VwWeconnect extends utils.Adapter { } }); } - - this.updateStatus(); + if (this.config.type !== "skodae") { + this.updateStatus(); + } + this.updateInterval && clearInterval(this.updateInterval); this.updateInterval = setInterval(() => { this.updateStatus(); }, this.config.interval * 60 * 1000); @@ -3357,7 +3359,7 @@ class VwWeconnect extends utils.Adapter { if (error.response.status === 403) { if (this.firstStart) { this.log.debug(JSON.stringify(error.response.data)); - this.firstStart = false; + return; } } @@ -3376,6 +3378,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(url); }); } + this.firstStart = false; } setSkodaESettings(vin, action, value, bodyContent) { diff --git a/package-lock.json b/package-lock.json index 526bd726..3baed152 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.5.0", + "version": "0.5.1", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 3fd88bb7..c7d4a4b2 100644 --- a/package.json +++ b/package.json @@ -79,5 +79,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.5.0" + "version": "0.5.1" } From 29ef72ba0568014661f431d5fc0908619fff89c2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 28 Dec 2023 22:18:07 +0100 Subject: [PATCH 610/729] ad block per vin --- main.js | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/main.js b/main.js index 2aadc04c..cd5e9d8a 100644 --- a/main.js +++ b/main.js @@ -54,6 +54,7 @@ class VwWeconnect extends utils.Adapter { this.isFirstLocation = true; this.lastTripCheck = 0; this.firstStart = true; + this.blockTrip = {}; this.statesArray = [ { @@ -2788,7 +2789,7 @@ class VwWeconnect extends utils.Adapter { const minusXDays = new Date(new Date().setDate(new Date().getDate() - this.config.lastTripDays)).toISOString(); if (Date.now() - this.lastTripCheck > 1000 * 60 * 15) { this.lastTripCheck = Date.now(); - if (this.config.tripShortTerm == true && !this.blockTrip) { + if (this.config.tripShortTerm == true && !this.blockTrip[vin]) { await axios({ method: "get", url: @@ -2832,7 +2833,7 @@ class VwWeconnect extends utils.Adapter { error && error.response && this.log.error(JSON.stringify(error.response.data)); }); } - if (this.config.tripLongTerm == true && !this.blockTrip) { + if (this.config.tripLongTerm == true && !this.blockTrip[vin]) { await axios({ method: "get", url: @@ -2877,7 +2878,7 @@ class VwWeconnect extends utils.Adapter { }); } - if (this.config.tripCyclic == true && !this.blockTrip) { + if (this.config.tripCyclic == true && !this.blockTrip[vin]) { await axios({ method: "get", url: @@ -2922,7 +2923,7 @@ class VwWeconnect extends utils.Adapter { }); } - if (!this.blockTrip && this.config.lastTrips) { + if (!this.blockTrip[vin] && this.config.lastTrips) { await axios({ method: "get", url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/shortterm/last", @@ -2949,17 +2950,21 @@ class VwWeconnect extends utils.Adapter { this.log.info("Server not available:"); } if (error.response && error.response.status === 404) { - this.log.info("No last shorterm trips found. Please check if your car supports shortterm trips."); - this.blockTrip = true; + this.log.info( + "No last shorterm trips found. Please check if your car supports shortterm trips. Block fetching for:" + + vin, + ); + this.blockTrip[vin] = true; return; } this.log.error(error); - this.log.error("No last shortterm trips found"); + this.log.error("No last shortterm trips found. Block trip fetching for " + vin); + this.blockTrip[vin] = true; error && error.response && this.log.error(JSON.stringify(error.response.data)); }); } - if (!this.blockTrip && this.config.lastTrips) { + if (!this.blockTrip[vin] && this.config.lastTrips) { await axios({ method: "get", url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/longterm/last", @@ -2986,16 +2991,20 @@ class VwWeconnect extends utils.Adapter { this.log.info("Server not available:"); } if (error.response && error.response.status === 404) { - this.log.info("No last longterm trips found. Please check if your car supports longterm trips."); - this.blockTrip = true; + this.log.info( + "No last longterm trips found. Please check if your car supports longterm trips. Block fetching for " + + vin, + ); + this.blockTrip[vin] = true; return; } this.log.error(error); - this.log.error("No last longterm trips found"); + this.log.error("No last longterm trips found. Block fetching for " + vin); + this.blockTrip[vin] = true; error && error.response && this.log.error(JSON.stringify(error.response.data)); }); } - if (!this.blockTrip && this.config.lastTrips) { + if (!this.blockTrip[vin] && this.config.lastTrips) { await axios({ method: "get", url: "https://emea.bff.cariad.digital/vehicle/v1/trips/" + vin + "/cyclic/last", @@ -3022,12 +3031,16 @@ class VwWeconnect extends utils.Adapter { this.log.info("Server not available:"); } if (error.response && error.response.status === 404) { - this.log.info("No last cyclic trips found. Please check if your car supports cyclic trips."); - this.blockTrip = true; + this.log.info( + "No last cyclic trips found. Please check if your car supports cyclic trips. Block fetching for " + + vin, + ); + this.blockTrip[vin] = true; return; } this.log.error(error); - this.log.error("No last cyclic trips found"); + this.log.error("No last cyclic trips found. block fetching for " + vin); + this.blockTrip[vin] = true; error && error.response && this.log.error(JSON.stringify(error.response.data)); }); } From b264f3003555f7cfdb90563b973b66d8357fbf61 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 11 Jan 2024 07:39:54 +0100 Subject: [PATCH 611/729] enable parking position --- main.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.js b/main.js index cd5e9d8a..99df840b 100644 --- a/main.js +++ b/main.js @@ -2726,7 +2726,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); + this.log.info("Server not available. Please try again later:" + JSON.stringify(error.response.data)); return; } this.log.error("Fetching status failed"); @@ -2826,7 +2826,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:"); + this.log.info("Server not available. Please try again later:"); } this.log.error(error); this.log.error("No shortterm trips found please disable in your settings"); @@ -2870,7 +2870,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:"); + this.log.info("Server not available. Please try again later:"); } this.log.error(error); this.log.error("No longterm trips found please disable in your settings"); @@ -2915,7 +2915,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available"); + this.log.info("Server not available. Please try again later"); } this.log.error(error); this.log.error("No shortterm trips found please disable in your settings"); @@ -2947,7 +2947,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:"); + this.log.info("Server not available. Please try again later:"); } if (error.response && error.response.status === 404) { this.log.info( @@ -2988,7 +2988,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:"); + this.log.info("Server not available. Please try again later:"); } if (error.response && error.response.status === 404) { this.log.info( @@ -3028,7 +3028,7 @@ class VwWeconnect extends utils.Adapter { }) .catch((error) => { if (error.response && error.response.status >= 500) { - this.log.info("Server not available:"); + this.log.info("Server not available. Please try again later:"); } if (error.response && error.response.status === 404) { this.log.info( @@ -3305,7 +3305,7 @@ class VwWeconnect extends utils.Adapter { { path: "charging", version: "v1", postfix: "/status" }, { path: "charging", version: "v1", postfix: "/settings" }, { path: "vehicle-status", version: "v2", postfix: "" }, - // { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth + { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth ]; for (const status of statusArray) { @@ -3381,7 +3381,7 @@ class VwWeconnect extends utils.Adapter { return; } if (error.response.status >= 500) { - this.log.info("Server not available:" + JSON.stringify(error.response.data)); + this.log.info("Server not available. Please try again later:" + JSON.stringify(error.response.data)); return; } this.log.error(JSON.stringify(error.response.data)); From b5dee7e5d6cd3be35248b272c7b97b7a2d9a7e98 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 13 Jan 2024 09:46:22 +0100 Subject: [PATCH 612/729] add test lock --- main.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/main.js b/main.js index 99df840b..e7482dc2 100644 --- a/main.js +++ b/main.js @@ -2285,6 +2285,28 @@ class VwWeconnect extends utils.Adapter { native: {}, }); }); + + this.setObjectNotExists(vin + ".remote.lock", { + type: "state", + common: { + name: "Lock test", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + + this.setObjectNotExists(vin + ".remote.lockv2", { + type: "state", + common: { + name: "Lock test 2", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); resolve(); return; } From 179f0528bb4ebdee1a241b07f2658407b88d92e0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 13 Jan 2024 14:34:07 +0100 Subject: [PATCH 613/729] fix order --- main.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/main.js b/main.js index e7482dc2..4c8fccf4 100644 --- a/main.js +++ b/main.js @@ -2284,29 +2284,29 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - }); + this.setObjectNotExists(vin + ".remote.lock", { + type: "state", + common: { + name: "Lock test", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); - this.setObjectNotExists(vin + ".remote.lock", { - type: "state", - common: { - name: "Lock test", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, + this.setObjectNotExists(vin + ".remote.lockv2", { + type: "state", + common: { + name: "Lock test", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); }); - this.setObjectNotExists(vin + ".remote.lockv2", { - type: "state", - common: { - name: "Lock test 2", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); resolve(); return; } From f86b5950c6d6aad00d51eb15dfc84437429f92e0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 13 Jan 2024 18:11:00 +0100 Subject: [PATCH 614/729] add lock to id --- main.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 4c8fccf4..63515164 100644 --- a/main.js +++ b/main.js @@ -2034,6 +2034,27 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.lock", { + type: "state", + common: { + name: "Lock ", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); + + this.setObjectNotExists(vin + ".remote.lockv2", { + type: "state", + common: { + name: "Lock v2", + type: "boolean", + role: "switch", + write: true, + }, + native: {}, + }); } resolve(); return; @@ -2287,7 +2308,7 @@ class VwWeconnect extends utils.Adapter { this.setObjectNotExists(vin + ".remote.lock", { type: "state", common: { - name: "Lock test", + name: "Lock ", type: "boolean", role: "switch", write: true, @@ -2298,7 +2319,7 @@ class VwWeconnect extends utils.Adapter { this.setObjectNotExists(vin + ".remote.lockv2", { type: "state", common: { - name: "Lock test", + name: "Lock v2", type: "boolean", role: "switch", write: true, From ede0a45e1adcb1aa368ce1b4e11740e433761f0f Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 14 Jan 2024 18:42:06 +0100 Subject: [PATCH 615/729] test force index --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 63515164..8428c6c4 100644 --- a/main.js +++ b/main.js @@ -2750,7 +2750,7 @@ class VwWeconnect extends utils.Adapter { ); } // this.extractKeys(this, vin + ".status", data); - this.json2iob.parse(vin + ".status", data, { forceIndex: false, makeStateWritableWithEnding: ["settings"] }); + this.json2iob.parse(vin + ".status", data, { forceIndex: true, makeStateWritableWithEnding: ["settings"] }); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", From 04aa2e8dd2cbe20c3f75e9422fbf78d41c0f4f81 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 26 Jan 2024 09:29:10 +0100 Subject: [PATCH 616/729] add debug log --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 8428c6c4..65eb8493 100644 --- a/main.js +++ b/main.js @@ -3517,6 +3517,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.historyLimit === -1) { return; } + this.log.debug("Get Elli Data with history limit: " + this.config.historyLimit); let name = "Seat Elli Data"; let path = "seatelli"; if (type === "skodapower") { From 8ffd799334e507cad4c50dcaa3972cd7c9e035d4 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 26 Jan 2024 10:34:34 +0100 Subject: [PATCH 617/729] update check --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 65eb8493..070417f6 100644 --- a/main.js +++ b/main.js @@ -3514,7 +3514,8 @@ class VwWeconnect extends utils.Adapter { }); } async getElliData(type) { - if (this.config.historyLimit === -1) { + if (this.config.historyLimit == -1) { + this.log.debug("Elli disabled in config"); return; } this.log.debug("Get Elli Data with history limit: " + this.config.historyLimit); @@ -3638,6 +3639,11 @@ class VwWeconnect extends utils.Adapter { } getWcData(limit) { + if (this.config.historyLimit == -1) { + this.log.debug("WC disabled in config"); + return; + } + this.log.debug("Get WC Data with history limit: " + this.config.historyLimit); //check if latest fetching is minimum 15 minutes ago if (this.lastWcFetch && this.lastWcFetch + 15 * 60 * 1000 > Date.now()) { this.log.debug("We Charge data already fetched in last 15 minutes"); From 7bcfcdf934bd31db15b36a2b2e007d4e1691a855 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 8 Feb 2024 09:38:21 +0100 Subject: [PATCH 618/729] fix longterm order --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 070417f6..524419c5 100644 --- a/main.js +++ b/main.js @@ -2900,7 +2900,7 @@ class VwWeconnect extends utils.Adapter { if (res.data && res.data.data) { //sort by id res.data.data.sort((a, b) => { - return a.id - b.id; + return b.id - a.id; }); if (this.config.numberOfTrips > 0) { res.data.data = res.data.data.slice(0, this.config.numberOfTrips); From 9fe8deea64433aaeb268f9de3326d53f560a7151 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 10 Mar 2024 01:12:06 +0100 Subject: [PATCH 619/729] update skoda user agent --- main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 524419c5..dadc4ef7 100644 --- a/main.js +++ b/main.js @@ -38,6 +38,7 @@ class VwWeconnect extends utils.Adapter { this.json2iob = new Json2iob(this); this.jar = request.jar(); this.userAgent = "iobroker v"; + this.skodaUserAgent = "OneConnect/000000164 CFNetwork/1494.0.7 Darwin/23.4.0"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -1162,6 +1163,7 @@ class VwWeconnect extends utils.Adapter { // const jwtauth_code = hashArray[1].substring(hashArray[1].indexOf("=") + 1); // const jwtaccess_token = hashArray[2].substring(hashArray[2].indexOf("=") + 1); // const jwtid_token = hashArray[5].substring(hashArray[5].indexOf("=") + 1); + let method = "POST"; let body = "auth_code=" + jwtauth_code + "&id_token=" + jwtid_token; let url = "https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode"; @@ -1200,7 +1202,7 @@ class VwWeconnect extends utils.Adapter { accept: "*/*", // authorization: "Bearer " + parsedParameters.id_token, "content-type": "application/json", - "user-agent": this.useragent, + "user-agent": this.skodaUserAgent, "accept-language": "de-de", }; } @@ -1855,7 +1857,7 @@ class VwWeconnect extends utils.Adapter { headers = { accept: "application/json", "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, + "user-agent": this.skodaUserAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }; @@ -3358,7 +3360,7 @@ class VwWeconnect extends utils.Adapter { "api-key": "ok", accept: "application/json", "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, + "user-agent": this.skodaUserAgent, "accept-language": "de-de", "If-None-Match": this.etags[url] || "", authorization: "Bearer " + this.config.atoken, @@ -3476,7 +3478,7 @@ class VwWeconnect extends utils.Adapter { "api-key": "ok", accept: "application/json", "content-type": "application/json;charset=utf-8", - "user-agent": this.userAgent, + "user-agent": this.skodaUserAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }, From a9c2b7455d0e597dc0dda051abdd4dd10e8773fc Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 10 Mar 2024 12:52:24 +0100 Subject: [PATCH 620/729] v0.5.2 --- io-package.json | 6 +- package-lock.json | 1018 +++++++++++++++++++-------------------------- package.json | 32 +- 3 files changed, 449 insertions(+), 607 deletions(-) diff --git a/io-package.json b/io-package.json index 7290d81d..7f521548 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "vw-connect", - "version": "0.5.1", + "version": "0.5.2", "news": { + "0.5.2": { + "en": "Fix for SkodaE update", + "de": "Fix für SkodaE Update" + }, "0.5.1": { "en": "Fix for SkodaE. Temporary disabled parking position and set min interval to 10min", "de": "Fix für SkodaE. Parking Position und ein Update Interval unter 10min ist zur Zeit deaktiviert für SkodaE" diff --git a/package-lock.json b/package-lock.json index 3baed152..e82fbb36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,43 +1,31 @@ { "name": "iobroker.vw-connect", - "version": "0.5.1", + "version": "0.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.5.1", + "version": "0.5.2", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", - "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.6.2", + "@peculiar/webcrypto": "^1.4.5", + "axios": "^1.6.7", "json-bigint": "^1.0.0", - "json2iob": "^2.5.1", + "json2iob": "^2.6.8", "ngeohash": "^0.6.3", - "qs": "^6.11.2", + "qs": "^6.12.0", "request": "^2.88.2", - "traverse": "^0.6.7", + "traverse": "^0.6.8", "uuid": "^9.0.1" }, "devDependencies": { - "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.11", - "@types/chai-as-promised": "^7.1.8", - "@types/mocha": "^10.0.6", - "@types/node": "^20.10.5", - "@types/proxyquire": "^1.3.31", - "@types/sinon": "^17.0.2", - "@types/sinon-chai": "^3.2.12", - "chai": "^4.3.10", - "chai-as-promised": "^7.1.1", - "eslint": "^8.56.0", + "@iobroker/testing": "^4.1.1", + "@types/node": "^20.11.25", + "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", - "mocha": "^10.2.0", - "proxyquire": "^2.1.3", - "sinon": "^17.0.1", - "sinon-chai": "^3.7.0", - "typescript": "~5.3.3" + "typescript": "~5.4.2" }, "engines": { "node": ">=10.0.0" @@ -100,22 +88,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": { @@ -136,9 +124,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.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@iobroker/adapter-core": { @@ -153,70 +141,42 @@ } }, "node_modules/@iobroker/testing": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.0.tgz", - "integrity": "sha512-fzCfR5xF9VToixMqSZQKjNZiGvwDCZ5cUX+bfdll7ZyVhPXcMt6LB5UXkAYLF4QN/wA0TYa9o71iElKOQp4b4A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.1.tgz", + "integrity": "sha512-TGl0o+ejiSUuJiyv6bYgOCkv3w/bOo0eEThAgl3sG3nyiWDBLuXCbtE18UlRLbFyYLOWZ1KETp1f0x7kHMKLxA==", "dev": true, "dependencies": { "alcalzone-shared": "~4.0.3", - "chai": "^4.3.6", + "chai": "^4.3.7", "chai-as-promised": "^7.1.1", "debug": "^4.3.4", "fs-extra": "^10.1.0", - "mocha": "^10.0.0", - "sinon": "^14.0.0", + "mocha": "^10.2.0", + "sinon": "^15.0.1", "sinon-chai": "^3.7.0" } }, - "node_modules/@iobroker/testing/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@iobroker/testing/node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@iobroker/testing/node_modules/@sinonjs/fake-timers/node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@iobroker/testing/node_modules/@sinonjs/samsam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", - "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", + "node_modules/@iobroker/testing/node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, - "dependencies": { - "@sinonjs/commons": "^2.0.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" + "engines": { + "node": ">=0.3.1" } }, "node_modules/@iobroker/testing/node_modules/sinon": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", - "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", + "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", + "deprecated": "16.1.1", "dev": true, "dependencies": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^7.0.1", - "diff": "^5.0.0", - "nise": "^5.1.2", + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.3.0", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", "supports-color": "^7.2.0" }, "funding": { @@ -281,13 +241,13 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", - "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", + "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", "dependencies": { "asn1js": "^3.0.5", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" } }, "node_modules/@peculiar/json-schema": { @@ -302,15 +262,15 @@ } }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz", - "integrity": "sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", + "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", "dependencies": { - "@peculiar/asn1-schema": "^2.3.6", + "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.2", - "tslib": "^2.5.0", - "webcrypto-core": "^1.7.7" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2", + "webcrypto-core": "^1.7.8" }, "engines": { "node": ">=10.12.0" @@ -360,67 +320,20 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, - "node_modules/@types/chai": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", - "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", - "dev": true - }, - "node_modules/@types/chai-as-promised": { - "version": "7.1.8", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", - "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", - "dev": true, - "dependencies": { - "@types/chai": "*" - } - }, - "node_modules/@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", - "dev": true + "node_modules/@types/json-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "node_modules/@types/node": { - "version": "20.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", - "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "version": "20.11.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", + "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" } }, - "node_modules/@types/proxyquire": { - "version": "1.3.31", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.31.tgz", - "integrity": "sha512-uALowNG2TSM1HNPMMOR0AJwv4aPYPhqB0xlEhkeRTMuto5hjoSPZkvgu1nbPUkz3gEPAHv4sy4DmKsurZiEfRQ==", - "dev": true - }, - "node_modules/@types/sinon": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.2.tgz", - "integrity": "sha512-Zt6heIGsdqERkxctIpvN5Pv3edgBrhoeb3yHyxffd4InN0AX2SVNKSrhdDZKGQICVOxWP/q4DyhpfPNMSrpIiA==", - "dev": true, - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinon-chai": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", - "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", - "dev": true, - "dependencies": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -584,11 +497,11 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -666,12 +579,18 @@ "dev": true }, "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==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -923,6 +842,22 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -967,6 +902,25 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "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==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -989,16 +943,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", @@ -1204,19 +1158,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/fill-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "dependencies": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1274,9 +1215,9 @@ "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.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -1348,9 +1289,12 @@ } }, "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==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/get-caller-file": { "version": "2.0.5", @@ -1371,13 +1315,18 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1438,6 +1387,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -1471,17 +1431,6 @@ "node": ">=6" } }, - "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", @@ -1491,6 +1440,28 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "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", @@ -1502,6 +1473,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -1587,18 +1569,6 @@ "node": ">=8" } }, - "node_modules/is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1638,15 +1608,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -1746,11 +1707,15 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json2iob": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.5.1.tgz", - "integrity": "sha512-Mbpgwsl1oKbECUXcIS6Z6V+QcDBsPKuqDIddrOmViZiWGZoLeu8fvjmjVpKB7ftAPa6MK+mfohgnlCve+fagtw==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.8.tgz", + "integrity": "sha512-hNHS6hCelDJzgP8PVkgF2JxW8g+zbTQacZPSJoZJcXoxUJ69RENjZniX58YYZuAcPaKlB1MV7Oczq+vYRErrjQ==", "dependencies": { + "@types/json-bigint": "^1.0.4", "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=16" } }, "node_modules/jsonfile": { @@ -1850,12 +1815,6 @@ "get-func-name": "^2.0.0" } }, - "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=", - "dev": true - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1954,12 +1913,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2032,9 +1985,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2134,12 +2087,6 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/path-to-regexp": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", @@ -2189,17 +2136,6 @@ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, - "node_modules/proxyquire": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", - "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", - "dev": true, - "dependencies": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.1", - "resolve": "^1.11.1" - } - }, "node_modules/psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -2214,11 +2150,11 @@ } }, "node_modules/pvtsutils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", - "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.6.1" } }, "node_modules/pvutils": { @@ -2230,11 +2166,11 @@ } }, "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", + "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -2341,23 +2277,6 @@ "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2448,6 +2367,22 @@ "randombytes": "^2.1.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2470,13 +2405,17 @@ } }, "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.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2487,6 +2426,7 @@ "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", "dev": true, + "peer": true, "dependencies": { "@sinonjs/commons": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", @@ -2515,6 +2455,7 @@ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, + "peer": true, "dependencies": { "@sinonjs/commons": "^3.0.0" } @@ -2524,6 +2465,7 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "dev": true, + "peer": true, "engines": { "node": ">=0.3.1" } @@ -2533,6 +2475,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -2617,18 +2560,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -2660,17 +2591,20 @@ } }, "node_modules/traverse": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", - "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", + "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -2722,9 +2656,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2783,15 +2717,15 @@ } }, "node_modules/webcrypto-core": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.7.tgz", - "integrity": "sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", + "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", "dependencies": { - "@peculiar/asn1-schema": "^2.3.6", + "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", "asn1js": "^3.0.1", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" } }, "node_modules/which": { @@ -2942,19 +2876,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" } }, @@ -2965,9 +2899,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.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "@iobroker/adapter-core": { @@ -2977,72 +2911,38 @@ "requires": {} }, "@iobroker/testing": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.0.tgz", - "integrity": "sha512-fzCfR5xF9VToixMqSZQKjNZiGvwDCZ5cUX+bfdll7ZyVhPXcMt6LB5UXkAYLF4QN/wA0TYa9o71iElKOQp4b4A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.1.tgz", + "integrity": "sha512-TGl0o+ejiSUuJiyv6bYgOCkv3w/bOo0eEThAgl3sG3nyiWDBLuXCbtE18UlRLbFyYLOWZ1KETp1f0x7kHMKLxA==", "dev": true, "requires": { "alcalzone-shared": "~4.0.3", - "chai": "^4.3.6", + "chai": "^4.3.7", "chai-as-promised": "^7.1.1", "debug": "^4.3.4", "fs-extra": "^10.1.0", - "mocha": "^10.0.0", - "sinon": "^14.0.0", + "mocha": "^10.2.0", + "sinon": "^15.0.1", "sinon-chai": "^3.7.0" }, "dependencies": { - "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - } - } - }, - "@sinonjs/samsam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", - "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^2.0.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } + "diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true }, "sinon": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.2.tgz", - "integrity": "sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==", + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", + "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", "dev": true, "requires": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^7.0.1", - "diff": "^5.0.0", - "nise": "^5.1.2", + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.3.0", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", "supports-color": "^7.2.0" } }, @@ -3090,13 +2990,13 @@ } }, "@peculiar/asn1-schema": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", - "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", + "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", "requires": { "asn1js": "^3.0.5", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" } }, "@peculiar/json-schema": { @@ -3108,15 +3008,15 @@ } }, "@peculiar/webcrypto": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz", - "integrity": "sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", + "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", "requires": { - "@peculiar/asn1-schema": "^2.3.6", + "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.2", - "tslib": "^2.5.0", - "webcrypto-core": "^1.7.7" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2", + "webcrypto-core": "^1.7.8" } }, "@sinonjs/commons": { @@ -3165,67 +3065,20 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, - "@types/chai": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", - "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", - "dev": true - }, - "@types/chai-as-promised": { - "version": "7.1.8", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", - "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", - "dev": true, - "requires": { - "@types/chai": "*" - } - }, - "@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", - "dev": true + "@types/json-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "@types/node": { - "version": "20.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", - "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "version": "20.11.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", + "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", "dev": true, "requires": { "undici-types": "~5.26.4" } }, - "@types/proxyquire": { - "version": "1.3.31", - "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.31.tgz", - "integrity": "sha512-uALowNG2TSM1HNPMMOR0AJwv4aPYPhqB0xlEhkeRTMuto5hjoSPZkvgu1nbPUkz3gEPAHv4sy4DmKsurZiEfRQ==", - "dev": true - }, - "@types/sinon": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.2.tgz", - "integrity": "sha512-Zt6heIGsdqERkxctIpvN5Pv3edgBrhoeb3yHyxffd4InN0AX2SVNKSrhdDZKGQICVOxWP/q4DyhpfPNMSrpIiA==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinon-chai": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", - "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", - "dev": true, - "requires": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, "@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -3347,11 +3200,11 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" }, @@ -3419,12 +3272,15 @@ "dev": true }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, "callsites": { @@ -3608,6 +3464,16 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3643,6 +3509,19 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3656,16 +3535,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", @@ -3820,16 +3699,6 @@ "flat-cache": "^3.0.4" } }, - "fill-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "dev": true, - "requires": { - "is-object": "~1.0.1", - "merge-descriptors": "~1.0.0" - } - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3872,9 +3741,9 @@ "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.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" }, "forever-agent": { "version": "0.6.1", @@ -3916,9 +3785,9 @@ "optional": 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", @@ -3933,13 +3802,15 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" } }, "getpass": { @@ -3982,6 +3853,14 @@ "type-fest": "^0.20.2" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -4008,25 +3887,38 @@ "har-schema": "^2.0.0" } }, - "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-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "requires": { + "es-define-property": "^1.0.0" + } + }, + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, + "hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "requires": { + "function-bind": "^1.1.2" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -4090,15 +3982,6 @@ "binary-extensions": "^2.0.0" } }, - "is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4126,12 +4009,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true - }, "is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -4216,10 +4093,11 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json2iob": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.5.1.tgz", - "integrity": "sha512-Mbpgwsl1oKbECUXcIS6Z6V+QcDBsPKuqDIddrOmViZiWGZoLeu8fvjmjVpKB7ftAPa6MK+mfohgnlCve+fagtw==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.8.tgz", + "integrity": "sha512-hNHS6hCelDJzgP8PVkgF2JxW8g+zbTQacZPSJoZJcXoxUJ69RENjZniX58YYZuAcPaKlB1MV7Oczq+vYRErrjQ==", "requires": { + "@types/json-bigint": "^1.0.4", "json-bigint": "^1.0.0" } }, @@ -4300,12 +4178,6 @@ "get-func-name": "^2.0.0" } }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -4383,12 +4255,6 @@ } } }, - "module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4448,9 +4314,9 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, "object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" }, "once": { "version": "1.4.0", @@ -4520,12 +4386,6 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "path-to-regexp": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", @@ -4563,17 +4423,6 @@ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, - "proxyquire": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", - "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", - "dev": true, - "requires": { - "fill-keys": "^1.0.2", - "module-not-found-error": "^1.0.1", - "resolve": "^1.11.1" - } - }, "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -4585,11 +4434,11 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "pvtsutils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", - "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", "requires": { - "tslib": "^2.4.0" + "tslib": "^2.6.1" } }, "pvutils": { @@ -4598,11 +4447,11 @@ "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" }, "qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", + "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", "requires": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" } }, "queue-microtask": { @@ -4674,17 +4523,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -4734,6 +4572,19 @@ "randombytes": "^2.1.0" } }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4750,13 +4601,14 @@ "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.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" } }, "sinon": { @@ -4764,6 +4616,7 @@ "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", "dev": true, + "peer": true, "requires": { "@sinonjs/commons": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", @@ -4778,6 +4631,7 @@ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, + "peer": true, "requires": { "@sinonjs/commons": "^3.0.0" } @@ -4786,13 +4640,15 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true + "dev": true, + "peer": 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, + "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -4857,12 +4713,6 @@ "has-flag": "^4.0.0" } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4888,14 +4738,14 @@ } }, "traverse": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", - "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==" + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", + "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==" }, "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "tunnel-agent": { "version": "0.6.0", @@ -4932,9 +4782,9 @@ "dev": true }, "typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true }, "undici-types": { @@ -4973,15 +4823,15 @@ } }, "webcrypto-core": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.7.tgz", - "integrity": "sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", + "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", "requires": { - "@peculiar/asn1-schema": "^2.3.6", + "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", "asn1js": "^3.0.1", - "pvtsutils": "^1.3.2", - "tslib": "^2.4.0" + "pvtsutils": "^1.3.5", + "tslib": "^2.6.2" } }, "which": { diff --git a/package.json b/package.json index c7d4a4b2..7346c63a 100644 --- a/package.json +++ b/package.json @@ -19,36 +19,24 @@ "bundleDependencies": [], "dependencies": { "@iobroker/adapter-core": "^3.0.4", - "@peculiar/webcrypto": "^1.4.3", - "axios": "^1.6.2", + "@peculiar/webcrypto": "^1.4.5", + "axios": "^1.6.7", "json-bigint": "^1.0.0", - "json2iob": "^2.5.1", + "json2iob": "^2.6.8", "ngeohash": "^0.6.3", - "qs": "^6.11.2", + "qs": "^6.12.0", "request": "^2.88.2", - "traverse": "^0.6.7", + "traverse": "^0.6.8", "uuid": "^9.0.1" }, "deprecated": false, "description": "Adapter for VW Connect", "devDependencies": { - "@iobroker/testing": "^4.1.0", - "@types/chai": "^4.3.11", - "@types/chai-as-promised": "^7.1.8", - "@types/mocha": "^10.0.6", - "@types/node": "^20.10.5", - "@types/proxyquire": "^1.3.31", - "@types/sinon": "^17.0.2", - "@types/sinon-chai": "^3.2.12", - "chai": "^4.3.10", - "chai-as-promised": "^7.1.1", - "eslint": "^8.56.0", + "@iobroker/testing": "^4.1.1", + "@types/node": "^20.11.25", + "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", - "mocha": "^10.2.0", - "proxyquire": "^2.1.3", - "sinon": "^17.0.1", - "sinon-chai": "^3.7.0", - "typescript": "~5.3.3" + "typescript": "~5.4.2" }, "engines": { "node": ">=10.0.0" @@ -79,5 +67,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.5.1" + "version": "0.5.2" } From b5fbfb41f65b8a1efb646e9efb68f1cbd1627d27 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 10 Mar 2024 12:54:53 +0100 Subject: [PATCH 621/729] remove message skoda e message --- io-package.json | 4 ++-- main.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/io-package.json b/io-package.json index 7f521548..38552b78 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.5.2", + "version": "0.5.3", "news": { - "0.5.2": { + "0.5.3": { "en": "Fix for SkodaE update", "de": "Fix für SkodaE Update" }, diff --git a/main.js b/main.js index dadc4ef7..4fdeac48 100644 --- a/main.js +++ b/main.js @@ -290,7 +290,7 @@ class VwWeconnect extends utils.Adapter { this.config.interval = 1; } if (this.config.type === "skodae") { - this.log.info("Parking Postion is temporary disabled for Skoda E"); + // this.log.info("Parking Postion is temporary disabled for Skoda E"); if (this.config.interval < 10) { this.log.info("Interval under 10min is temporary not allowed for Skoda E reset to 10min"); this.config.interval = 10; diff --git a/package-lock.json b/package-lock.json index e82fbb36..a20553e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.5.2", + "version": "0.5.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.5.2", + "version": "0.5.3", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index 7346c63a..d8c2e644 100644 --- a/package.json +++ b/package.json @@ -67,5 +67,5 @@ "test:package": "mocha test/package --exit", "test:unit": "mocha test/unit --exit" }, - "version": "0.5.2" + "version": "0.5.3" } From 2d344b7848c6d97ccc8a09bb6c593deacae1a46a Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 16 Mar 2024 22:21:07 +0100 Subject: [PATCH 622/729] add null status --- main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 4fdeac48..78ed6880 100644 --- a/main.js +++ b/main.js @@ -2752,7 +2752,12 @@ class VwWeconnect extends utils.Adapter { ); } // this.extractKeys(this, vin + ".status", data); - this.json2iob.parse(vin + ".status", data, { forceIndex: true, makeStateWritableWithEnding: ["settings"] }); + await this.json2iob.parse(vin + ".status", data, { + forceIndex: true, + makeStateWritableWithEnding: ["settings"], + }); + this.setOtherStatesInChannelNull(vin + ".status.accessStatus", Date.now()); + if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { type: "state", From 10741bc390833f73ced32359e6dbdb5f1f52c222 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 00:33:30 +0100 Subject: [PATCH 623/729] correct timestampe --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 78ed6880..018bbdfd 100644 --- a/main.js +++ b/main.js @@ -2730,6 +2730,7 @@ class VwWeconnect extends utils.Adapter { }, }) .then(async (res) => { + const timestamp = Date.now(); this.log.debug(JSON.stringify(res.data)); const data = {}; for (const key in res.data) { @@ -2756,7 +2757,7 @@ class VwWeconnect extends utils.Adapter { forceIndex: true, makeStateWritableWithEnding: ["settings"], }); - this.setOtherStatesInChannelNull(vin + ".status.accessStatus", Date.now()); + this.setOtherStatesInChannelNull(vin + ".status.accessStatus", timestamp - 1000); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { From 6bee3d51239177948d6d5fd5f7502f0e4cf8c22a Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 09:27:28 +0100 Subject: [PATCH 624/729] add release script --- package-lock.json | 839 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 13 +- 2 files changed, 827 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index a20553e6..79d8d218 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@iobroker/adapter-core": "^3.0.4", "@peculiar/webcrypto": "^1.4.5", - "axios": "^1.6.7", + "axios": "^1.6.8", "json-bigint": "^1.0.0", "json2iob": "^2.6.8", "ngeohash": "^0.6.3", @@ -21,8 +21,12 @@ "uuid": "^9.0.1" }, "devDependencies": { + "@alcalzone/release-script": "^3.7.0", + "@alcalzone/release-script-plugin-iobroker": "^3.7.0", + "@alcalzone/release-script-plugin-license": "^3.7.0", + "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.1", - "@types/node": "^20.11.25", + "@types/node": "^20.11.28", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", "typescript": "~5.4.2" @@ -40,6 +44,237 @@ "node": ">=0.10.0" } }, + "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==", + "dev": true, + "dependencies": { + "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/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": { + "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.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.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": "^1.6.2", + "enquirer": "^2.3.6", + "fs-extra": "^10.1.0", + "picocolors": "1.0.0", + "semver": "^7.5.2", + "source-map-support": "^0.5.21", + "yargs": "^17.4.1" + }, + "bin": { + "release-script": "bin/release.js" + }, + "engines": { + "node": ">=12.20" + } + }, + "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==", + "dev": true, + "dependencies": { + "execa": "^5.1.1" + }, + "engines": { + "node": ">=12.20" + } + }, + "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==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.7.0", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.1.0" + }, + "engines": { + "node": ">=12.20" + } + }, + "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==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.7.0", + "alcalzone-shared": "^4.0.1" + }, + "engines": { + "node": ">=12.20" + } + }, + "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==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.7.0", + "fs-extra": "^10.1.0" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-iobroker": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.0.tgz", + "integrity": "sha512-6nkLIDZ4qvZ21f3ozjPJ//x+hqkaiTfkDcYnyw6SWOIUbCa5v7Xj0cAZY7INguSfjv18UOTlU1J8xdzqHxtREg==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.7.0", + "alcalzone-shared": "^4.0.1", + "axios": "^1.6.2", + "fs-extra": "^10.1.0", + "semver": "^7.5.2" + }, + "engines": { + "node": ">=12.20" + } + }, + "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==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.7.0", + "fs-extra": "^10.1.0", + "tiny-glob": "^0.2.9" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script-plugin-manual-review": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-manual-review/-/release-script-plugin-manual-review-3.7.0.tgz", + "integrity": "sha512-lU/KJHQpYhdDcYPxiR3X5BsP9O+bNYfyP8VPE5dF9fwLgTFklbGMOhF9VjdQMiZ8Cyr7fCH7ptw+oHw+UuQutQ==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.7.0" + }, + "engines": { + "node": ">=12.20" + } + }, + "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==", + "dev": true, + "dependencies": { + "@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" + }, + "engines": { + "node": ">=12.20" + } + }, + "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==", + "dev": true, + "dependencies": { + "@alcalzone/release-script-core": "3.7.0", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.1.0", + "semver": "^7.5.2", + "tiny-glob": "^0.2.9" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@alcalzone/release-script/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@alcalzone/release-script/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "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.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@alcalzone/release-script/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "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", @@ -326,9 +561,9 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -497,11 +732,11 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -578,6 +813,12 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -902,6 +1143,19 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -1108,6 +1362,29 @@ "node": ">=0.10.0" } }, + "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/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -1215,9 +1492,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -1332,6 +1609,18 @@ "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", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1387,6 +1676,18 @@ "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/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -1507,6 +1808,15 @@ "npm": ">=1.3.7" } }, + "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/ignore": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", @@ -1626,6 +1936,18 @@ "node": ">=8" } }, + "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/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1815,6 +2137,24 @@ "get-func-name": "^2.0.0" } }, + "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/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/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1834,6 +2174,15 @@ "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.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1976,6 +2325,18 @@ "node": ">=0.10.0" } }, + "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/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -2001,6 +2362,21 @@ "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.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -2110,6 +2486,12 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "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.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -2358,6 +2740,21 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -2421,6 +2818,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "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/sinon": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", @@ -2483,6 +2886,25 @@ "node": ">=8" } }, + "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/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -2533,6 +2955,15 @@ "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", @@ -2566,6 +2997,16 @@ "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", @@ -2781,6 +3222,12 @@ "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": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -2843,6 +3290,193 @@ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "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==", + "dev": true, + "requires": { + "axios": "^1.6.2", + "execa": "~5.0.1", + "fs-extra": "^10.1.0", + "semver": "^7.3.7", + "tiny-glob": "^0.2.9" + }, + "dependencies": { + "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": { + "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.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.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": "^1.6.2", + "enquirer": "^2.3.6", + "fs-extra": "^10.1.0", + "picocolors": "1.0.0", + "semver": "^7.5.2", + "source-map-support": "^0.5.21", + "yargs": "^17.4.1" + }, + "dependencies": { + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "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.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, + "@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==", + "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==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.7.0", + "alcalzone-shared": "^4.0.1", + "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==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.7.0", + "alcalzone-shared": "^4.0.1" + } + }, + "@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==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.7.0", + "fs-extra": "^10.1.0" + } + }, + "@alcalzone/release-script-plugin-iobroker": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.0.tgz", + "integrity": "sha512-6nkLIDZ4qvZ21f3ozjPJ//x+hqkaiTfkDcYnyw6SWOIUbCa5v7Xj0cAZY7INguSfjv18UOTlU1J8xdzqHxtREg==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.7.0", + "alcalzone-shared": "^4.0.1", + "axios": "^1.6.2", + "fs-extra": "^10.1.0", + "semver": "^7.5.2" + } + }, + "@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==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.7.0", + "fs-extra": "^10.1.0", + "tiny-glob": "^0.2.9" + } + }, + "@alcalzone/release-script-plugin-manual-review": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-manual-review/-/release-script-plugin-manual-review-3.7.0.tgz", + "integrity": "sha512-lU/KJHQpYhdDcYPxiR3X5BsP9O+bNYfyP8VPE5dF9fwLgTFklbGMOhF9VjdQMiZ8Cyr7fCH7ptw+oHw+UuQutQ==", + "dev": true, + "requires": { + "@alcalzone/release-script-core": "3.7.0" + } + }, + "@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==", + "dev": true, + "requires": { + "@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.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.7.0", + "alcalzone-shared": "^4.0.1", + "fs-extra": "^10.1.0", + "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", @@ -3071,9 +3705,9 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -3200,11 +3834,11 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "requires": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" }, @@ -3271,6 +3905,12 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, "call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -3509,6 +4149,16 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + } + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -3655,6 +4305,23 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "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" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3741,9 +4408,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "forever-agent": { "version": "0.6.1", @@ -3813,6 +4480,12 @@ "hasown": "^2.0.0" } }, + "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 + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -3853,6 +4526,18 @@ "type-fest": "^0.20.2" } }, + "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 + }, "gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -3935,6 +4620,12 @@ "sshpk": "^1.7.0" } }, + "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 + }, "ignore": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", @@ -4021,6 +4712,12 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, + "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 + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4178,6 +4875,21 @@ "get-func-name": "^2.0.0" } }, + "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" + } + }, + "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 + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -4191,6 +4903,12 @@ "mime-db": "1.52.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 + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4308,6 +5026,15 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "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" + } + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -4327,6 +5054,15 @@ "wrappy": "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" + } + }, "optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -4406,6 +5142,12 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "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.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -4563,6 +5305,15 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, "serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -4611,6 +5362,12 @@ "object-inspect": "^1.13.1" } }, + "signal-exit": { + "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 + }, "sinon": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", @@ -4662,6 +5419,22 @@ "dev": true, "requires": {} }, + "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.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", + "source-map": "^0.6.0" + } + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -4698,6 +5471,12 @@ "ansi-regex": "^5.0.1" } }, + "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 + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4719,6 +5498,16 @@ "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", + "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", @@ -4872,6 +5661,12 @@ "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": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index d8c2e644..c79be0f2 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dependencies": { "@iobroker/adapter-core": "^3.0.4", "@peculiar/webcrypto": "^1.4.5", - "axios": "^1.6.7", + "axios": "^1.6.8", "json-bigint": "^1.0.0", "json2iob": "^2.6.8", "ngeohash": "^0.6.3", @@ -32,8 +32,12 @@ "deprecated": false, "description": "Adapter for VW Connect", "devDependencies": { + "@alcalzone/release-script": "^3.7.0", + "@alcalzone/release-script-plugin-iobroker": "^3.7.0", + "@alcalzone/release-script-plugin-license": "^3.7.0", + "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.1", - "@types/node": "^20.11.25", + "@types/node": "^20.11.28", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", "typescript": "~5.4.2" @@ -65,7 +69,10 @@ "test:integration": "mocha test/integration --exit", "test:js": "mocha --opts test/mocha.custom.opts", "test:package": "mocha test/package --exit", - "test:unit": "mocha test/unit --exit" + "test:unit": "mocha test/unit --exit", + "check": "tsc --noEmit -p tsconfig.check.json", + "translate": "translate-adapter", + "release": "release-script" }, "version": "0.5.3" } From 910188387d60e511ab3ddfc330130b21b3fabf24 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 09:27:40 +0100 Subject: [PATCH 625/729] add releaseconfig --- .releaseconfig.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .releaseconfig.json diff --git a/.releaseconfig.json b/.releaseconfig.json new file mode 100644 index 00000000..e7d09e24 --- /dev/null +++ b/.releaseconfig.json @@ -0,0 +1,3 @@ +{ + "plugins": ["iobroker", "license", "manual-review"] +} From 25d8f2356ec905253377d9894fc1a8365a0c68c7 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 09:28:13 +0100 Subject: [PATCH 626/729] add readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 54bf070e..dff6c10a 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ You can set climatisaton temperature in ## Changelog +### **WORK IN PROGRESS** + +- fix door window states + ### 0.4.1 - Fix VW Status Update From b102d8ec71befa8dcc30306dbbdaec6fa1042c61 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 09:29:04 +0100 Subject: [PATCH 627/729] add year --- LICENSE | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 9b2e53f0..82a2fe0f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 ta2k +Copyright (c) 2024 ta2k 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 dff6c10a..28c4c2bb 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ You can set climatisaton temperature in MIT License -Copyright (c) 2019 ta2k +Copyright (c) 2019-2030 ta2k 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 4fed4e7b5790bce3c284731e491cc9c230d3021e Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 09:29:43 +0100 Subject: [PATCH 628/729] chore: release v0.5.4 - fix door window states --- LICENSE | 2 +- README.md | 3 +-- io-package.json | 57 ++++++++++++----------------------------------- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 19 insertions(+), 49 deletions(-) diff --git a/LICENSE b/LICENSE index 82a2fe0f..8abc33fe 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 ta2k +Copyright (c) 2019-2030 ta2k 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 28c4c2bb..5570f4b6 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,7 @@ You can set climatisaton temperature in ``` ## Changelog - -### **WORK IN PROGRESS** +### 0.5.4 (2024-03-17) - fix door window states diff --git a/io-package.json b/io-package.json index 38552b78..cf76e70c 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.5.3", + "version": "0.5.4", "news": { + "0.5.4": { + "en": "fix door window states", + "de": "Fix für door und window States", + "ru": "положение окна двери", + "pt": "corrigir os estados da janela da porta", + "nl": "fix deur venster statussen", + "fr": "fixer les états de la fenêtre de porte", + "it": "fissare gli stati della finestra della porta", + "es": "fijar puerta ventana estados", + "pl": "stan okna drzwi", + "uk": "виправити дверні стани", + "zh-cn": "修复门窗状态" + }, "0.5.3": { "en": "Fix for SkodaE update", "de": "Fix für SkodaE Update" @@ -26,48 +39,6 @@ "0.2.5": { "en": "removed deactivated we-connect type", "de": "Deaktivierter We-Connect Typ entfernt" - }, - "0.2.2": { - "en": "hide error when no trip information are available", - "de": "Fehlermeldung abgefangen wenn keine Trips Information für ID Fahrzeug verfügbar sind" - }, - "0.2.1": { - "en": "fix skoda parking position", - "de": "Fix für skoda parking position" - }, - "0.2.0": { - "en": "Improve Volkswagen App support (aux heating, lock and trips)", - "de": "Verbesserung der Volkswagen App Unterstützung (Standheizung, Verriegelung und Trips)" - }, - "0.1.9": { - "en": "fix skoda parking position", - "de": "Fix für skoda parking position" - }, - "0.1.8": { - "en": "fix skoda parking position and climatisationv2", - "de": "Fix für Skoda Parkposition und Climatisationv2" - }, - "0.1.7": { - "en": "improve climatisationv2" - }, - "0.1.6": { - "en": "Fix climatisationv2 error" - }, - "0.1.5": { - "en": "Change wecharge endpoint" - }, - "0.1.3": { - "en": "Remove destination endpoint" - }, - "0.1.2": { - "en": "Fix Type Error" - }, - "0.1.1": { - "en": "Fix Seat Login" - }, - "0.1.0": { - "en": "Fix VW Login", - "de": "Fix VW Login" } }, "title": "VW Connect", diff --git a/package-lock.json b/package-lock.json index 79d8d218..37a88b61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.5.3", + "version": "0.5.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.5.3", + "version": "0.5.4", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.4", diff --git a/package.json b/package.json index c79be0f2..1f867bcc 100644 --- a/package.json +++ b/package.json @@ -74,5 +74,5 @@ "translate": "translate-adapter", "release": "release-script" }, - "version": "0.5.3" + "version": "0.5.4" } From b33623f8ef80b5e37056013911d05292adb505e4 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 09:30:37 +0100 Subject: [PATCH 629/729] add workflow --- .github/workflows/test-and-release.yml | 69 +++++++++++++------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 7ce90d2d..417312b4 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -53,39 +53,38 @@ jobs: # TODO: To enable automatic npm releases, create a token on npmjs.org # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options # Then uncomment the following block: +# Deploys the final package to NPM +deploy: + needs: [check-and-lint, adapter-tests] -# # Deploys the final package to NPM -# deploy: -# needs: [check-and-lint, adapter-tests] -# -# # Trigger this step only when a commit on any branch is tagged with a version number -# if: | -# contains(github.event.head_commit.message, '[skip ci]') == false && -# github.event_name == 'push' && -# startsWith(github.ref, 'refs/tags/v') -# -# runs-on: ubuntu-latest -# -# # Write permissions are required to create Github releases -# permissions: -# contents: write -# -# steps: -# - uses: ioBroker/testing-action-deploy@v1 -# with: -# node-version: '16.x' -# # Uncomment the following line if your adapter cannot be installed using 'npm ci' -# # install-command: 'npm install' -# npm-token: ${{ secrets.NPM_TOKEN }} -# github-token: ${{ secrets.GITHUB_TOKEN }} -# -# # When using Sentry for error reporting, Sentry can be informed about new releases -# # To enable create a API-Token in Sentry (User settings, API keys) -# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options -# # Then uncomment and customize the following block: -# sentry: true -# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }} -# sentry-project: "iobroker-vw-connect" -# sentry-version-prefix: "iobroker.vw-connect" -# # If your sentry project is linked to a GitHub repository, you can enable the following option -# # sentry-github-integration: true + # Trigger this step only when a commit on any branch is tagged with a version number + if: | + contains(github.event.head_commit.message, '[skip ci]') == false && + github.event_name == 'push' && + startsWith(github.ref, 'refs/tags/v') + + runs-on: ubuntu-latest + + # Write permissions are required to create Github releases + permissions: + contents: write + + steps: + - uses: ioBroker/testing-action-deploy@v1 + with: + node-version: "18.x" + # Uncomment the following line if your adapter cannot be installed using 'npm ci' + # install-command: 'npm install' + npm-token: ${{ secrets.NPM_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + # When using Sentry for error reporting, Sentry can be informed about new releases + # To enable create a API-Token in Sentry (User settings, API keys) + # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options + # Then uncomment and customize the following block: + sentry: true + sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }} + sentry-project: "iobroker-vw-connect" + sentry-version-prefix: "iobroker.vw-connect" + # If your sentry project is linked to a GitHub repository, you can enable the following option + # sentry-github-integration: true From 85f79d2a7282c7dacb8899fe2d0822971e549018 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 17 Mar 2024 09:31:28 +0100 Subject: [PATCH 630/729] fix intent --- .github/workflows/test-and-release.yml | 66 +++++++++++++------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 417312b4..8fe17902 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -50,41 +50,41 @@ jobs: os: ${{ matrix.os }} # Uncomment the following line if your adapter cannot be installed using 'npm ci' # install-command: 'npm install' -# TODO: To enable automatic npm releases, create a token on npmjs.org -# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options -# Then uncomment the following block: -# Deploys the final package to NPM -deploy: - needs: [check-and-lint, adapter-tests] + # TODO: To enable automatic npm releases, create a token on npmjs.org + # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options + # Then uncomment the following block: + # Deploys the final package to NPM + deploy: + needs: [check-and-lint, adapter-tests] - # Trigger this step only when a commit on any branch is tagged with a version number - if: | - contains(github.event.head_commit.message, '[skip ci]') == false && - github.event_name == 'push' && - startsWith(github.ref, 'refs/tags/v') + # Trigger this step only when a commit on any branch is tagged with a version number + if: | + contains(github.event.head_commit.message, '[skip ci]') == false && + github.event_name == 'push' && + startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest + runs-on: ubuntu-latest - # Write permissions are required to create Github releases - permissions: - contents: write + # Write permissions are required to create Github releases + permissions: + contents: write - steps: - - uses: ioBroker/testing-action-deploy@v1 - with: - node-version: "18.x" - # Uncomment the following line if your adapter cannot be installed using 'npm ci' - # install-command: 'npm install' - npm-token: ${{ secrets.NPM_TOKEN }} - github-token: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: ioBroker/testing-action-deploy@v1 + with: + node-version: "18.x" + # Uncomment the following line if your adapter cannot be installed using 'npm ci' + # install-command: 'npm install' + npm-token: ${{ secrets.NPM_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} - # When using Sentry for error reporting, Sentry can be informed about new releases - # To enable create a API-Token in Sentry (User settings, API keys) - # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options - # Then uncomment and customize the following block: - sentry: true - sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }} - sentry-project: "iobroker-vw-connect" - sentry-version-prefix: "iobroker.vw-connect" - # If your sentry project is linked to a GitHub repository, you can enable the following option - # sentry-github-integration: true + # When using Sentry for error reporting, Sentry can be informed about new releases + # To enable create a API-Token in Sentry (User settings, API keys) + # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options + # Then uncomment and customize the following block: + sentry: true + sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }} + sentry-project: "iobroker-vw-connect" + sentry-version-prefix: "iobroker.vw-connect" + # If your sentry project is linked to a GitHub repository, you can enable the following option + # sentry-github-integration: true From b52c8ba2fb23767cf61d1cddd94b2c6b51a63d76 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 9 Apr 2024 22:10:40 +0200 Subject: [PATCH 631/729] add missing cupra status --- .github/workflows/test-and-release.yml | 2 +- main.js | 29 +- package-lock.json | 1414 +++++++++++++++++++++++- package.json | 10 +- 4 files changed, 1395 insertions(+), 60 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 8fe17902..c82ca580 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -40,7 +40,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [20.x, 16.x, 18.x] + node-version: [20.x, 21.x, 18.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: diff --git a/main.js b/main.js index 018bbdfd..af7d114b 100644 --- a/main.js +++ b/main.js @@ -1863,7 +1863,7 @@ class VwWeconnect extends utils.Adapter { }; } if (this.config.type === "seatcupra") { - url = "https://ola.prod.code.seat.cloud.vwgroup.com/v1/users/" + this.seatcupraUser + "/garage/vehicles"; + url = "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + this.seatcupraUser + "/garage/vehicles"; // @ts-ignore headers = { accept: "application/json", @@ -3100,12 +3100,12 @@ class VwWeconnect extends utils.Adapter { } }); } - getSeatCupraStatus(vin) { - return new Promise((resolve, reject) => { + async getSeatCupraStatus(vin) { + return new Promise(async (resolve, reject) => { request.get( { url: - "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + + "https://ola.prod.code.seat.cloud.vwgroup.com/v5/users/" + this.seatcupraUser + "/vehicles/" + vin + @@ -3113,7 +3113,6 @@ class VwWeconnect extends utils.Adapter { headers: { accept: "*/*", - "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, @@ -3238,6 +3237,26 @@ class VwWeconnect extends utils.Adapter { } }, ); + + await axios({ + method: "get", + maxBodyLength: Infinity, + url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/" + vin + "/status", + headers: { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + this.json2iob.parse(vin + ".statusv2", res.data); + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); }); } setSeatCupraStatus(vin, action, state) { diff --git a/package-lock.json b/package-lock.json index 37a88b61..496dbad1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,15 +9,15 @@ "version": "0.5.4", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^3.0.4", - "@peculiar/webcrypto": "^1.4.5", + "@iobroker/adapter-core": "^3.0.6", + "@peculiar/webcrypto": "^1.4.6", "axios": "^1.6.8", "json-bigint": "^1.0.0", "json2iob": "^2.6.8", "ngeohash": "^0.6.3", "qs": "^6.12.0", "request": "^2.88.2", - "traverse": "^0.6.8", + "traverse": "^0.6.9", "uuid": "^9.0.1" }, "devDependencies": { @@ -26,10 +26,10 @@ "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.1", - "@types/node": "^20.11.28", + "@types/node": "^20.12.6", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", - "typescript": "~5.4.2" + "typescript": "~5.4.4" }, "engines": { "node": ">=10.0.0" @@ -365,9 +365,9 @@ "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.4.tgz", - "integrity": "sha512-QsSeIkOa+zEVdIQ0kc0GcfsnQC+pTWWkixotdG4naKuaLUwMWK7xP0UyUEUiaHfPG3KqyZxwIxQR9HMENvvIYQ==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.6.tgz", + "integrity": "sha512-uoCDbd5gEPqUYAb2qY6L+ovpycK2JS9dqB85a53WNZ5sGjcm5ChA7kKcsZD7NpMM9pBFb7tJSviosPPalbXQTA==", "engines": { "npm": ">=7.0.0" }, @@ -497,15 +497,15 @@ } }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", - "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.6.tgz", + "integrity": "sha512-YBcMfqNSwn3SujUJvAaySy5tlYbYm6tVt9SKoXu8BaTdKGROiJDgPR3TXpZdAKUfklzm3lRapJEAltiMQtBgZg==", "dependencies": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.5", "tslib": "^2.6.2", - "webcrypto-core": "^1.7.8" + "webcrypto-core": "^1.7.9" }, "engines": { "node": ">=10.12.0" @@ -561,9 +561,9 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "node_modules/@types/node": { - "version": "20.11.28", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", - "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", + "version": "20.12.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz", + "integrity": "sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -675,6 +675,42 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -718,6 +754,20 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1036,6 +1086,54 @@ "node": ">=0.10" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1099,6 +1197,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1156,6 +1270,65 @@ "node": ">=8.6" } }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -1175,6 +1348,46 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1510,6 +1723,14 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1573,6 +1794,31 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1621,6 +1867,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1676,6 +1938,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -1732,6 +2008,14 @@ "node": ">=6" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1774,10 +2058,24 @@ "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==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -1867,6 +2165,45 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1879,6 +2216,60 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1909,6 +2300,17 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1918,6 +2320,20 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -1936,6 +2352,35 @@ "node": ">=8" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -1948,6 +2393,48 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1965,6 +2452,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -2353,6 +2851,31 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2504,6 +3027,14 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2602,6 +3133,23 @@ "node": ">=8.10.0" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -2716,6 +3264,28 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -2735,6 +3305,22 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2780,6 +3366,20 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2943,6 +3543,52 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -3032,9 +3678,14 @@ } }, "node_modules/traverse": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", - "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==", + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.9.tgz", + "integrity": "sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg==", + "dependencies": { + "gopd": "^1.0.1", + "typedarray.prototype.slice": "^1.0.3", + "which-typed-array": "^1.1.15" + }, "engines": { "node": ">= 0.4" }, @@ -3096,10 +3747,98 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedarray.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.3.tgz", + "integrity": "sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-errors": "^1.3.0", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-offset": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -3109,6 +3848,20 @@ "node": ">=14.17" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -3158,9 +3911,9 @@ } }, "node_modules/webcrypto-core": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", - "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.9.tgz", + "integrity": "sha512-FE+a4PPkOmBbgNDIyRmcHhgXn+2ClRl3JzJdDu/P4+B8y81LqKe6RAsI9b3lAOHe1T1BMkSjsRHTYRikImZnVA==", "dependencies": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", @@ -3184,6 +3937,39 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -3539,9 +4325,9 @@ "dev": true }, "@iobroker/adapter-core": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.4.tgz", - "integrity": "sha512-QsSeIkOa+zEVdIQ0kc0GcfsnQC+pTWWkixotdG4naKuaLUwMWK7xP0UyUEUiaHfPG3KqyZxwIxQR9HMENvvIYQ==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.6.tgz", + "integrity": "sha512-uoCDbd5gEPqUYAb2qY6L+ovpycK2JS9dqB85a53WNZ5sGjcm5ChA7kKcsZD7NpMM9pBFb7tJSviosPPalbXQTA==", "requires": {} }, "@iobroker/testing": { @@ -3642,15 +4428,15 @@ } }, "@peculiar/webcrypto": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", - "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.6.tgz", + "integrity": "sha512-YBcMfqNSwn3SujUJvAaySy5tlYbYm6tVt9SKoXu8BaTdKGROiJDgPR3TXpZdAKUfklzm3lRapJEAltiMQtBgZg==", "requires": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.5", "tslib": "^2.6.2", - "webcrypto-core": "^1.7.8" + "webcrypto-core": "^1.7.9" } }, "@sinonjs/commons": { @@ -3705,9 +4491,9 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "@types/node": { - "version": "20.11.28", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", - "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", + "version": "20.12.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz", + "integrity": "sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -3789,6 +4575,30 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "requires": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + } + }, + "arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "requires": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + } + }, "asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -3823,6 +4633,14 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "requires": { + "possible-typed-array-names": "^1.0.0" + } + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -4074,6 +4892,36 @@ "assert-plus": "^1.0.0" } }, + "data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, + "data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, + "data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -4114,6 +4962,16 @@ "gopd": "^1.0.1" } }, + "define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "requires": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4159,6 +5017,59 @@ "strip-ansi": "^6.0.1" } }, + "es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "requires": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + } + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -4172,6 +5083,34 @@ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" }, + "es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "requires": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -4412,6 +5351,14 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -4456,6 +5403,22 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, + "function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4486,6 +5449,16 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, + "get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "requires": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -4526,6 +5499,14 @@ "type-fest": "^0.20.2" } }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "requires": { + "define-properties": "^1.1.3" + } + }, "globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -4572,6 +5553,11 @@ "har-schema": "^2.0.0" } }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4596,10 +5582,18 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "requires": { + "has-symbols": "^1.0.3" + } + }, "hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "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" } @@ -4664,6 +5658,33 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "requires": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + } + }, + "is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -4673,6 +5694,36 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" + }, + "is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "requires": { + "is-typed-array": "^1.1.13" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4694,12 +5745,25 @@ "is-extglob": "^2.1.1" } }, + "is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==" + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -4712,12 +5776,53 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "requires": { + "call-bind": "^1.0.7" + } + }, "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 }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "requires": { + "which-typed-array": "^1.1.14" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4729,6 +5834,14 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "requires": { + "call-bind": "^1.0.2" + } + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -5045,6 +6158,22 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "requires": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5154,6 +6283,11 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==" + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5220,6 +6354,17 @@ "picomatch": "^2.2.1" } }, + "regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "requires": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + } + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -5295,11 +6440,39 @@ "queue-microtask": "^1.2.2" } }, + "safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "requires": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + } + } + }, "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==" }, + "safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -5336,6 +6509,17 @@ "has-property-descriptors": "^1.0.2" } }, + "set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5462,6 +6646,37 @@ "strip-ansi": "^6.0.1" } }, + "string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5527,9 +6742,14 @@ } }, "traverse": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", - "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==" + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.9.tgz", + "integrity": "sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg==", + "requires": { + "gopd": "^1.0.1", + "typedarray.prototype.slice": "^1.0.3", + "which-typed-array": "^1.1.15" + } }, "tslib": { "version": "2.6.2", @@ -5570,12 +6790,84 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "requires": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "requires": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "requires": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + } + }, + "typedarray.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.3.tgz", + "integrity": "sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-errors": "^1.3.0", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-offset": "^1.0.2" + } + }, "typescript": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "dev": true }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, "undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -5612,9 +6904,9 @@ } }, "webcrypto-core": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", - "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.9.tgz", + "integrity": "sha512-FE+a4PPkOmBbgNDIyRmcHhgXn+2ClRl3JzJdDu/P4+B8y81LqKe6RAsI9b3lAOHe1T1BMkSjsRHTYRikImZnVA==", "requires": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", @@ -5632,6 +6924,30 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "requires": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + } + }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/package.json b/package.json index 1f867bcc..5804ddcf 100644 --- a/package.json +++ b/package.json @@ -18,15 +18,15 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^3.0.4", - "@peculiar/webcrypto": "^1.4.5", + "@iobroker/adapter-core": "^3.0.6", + "@peculiar/webcrypto": "^1.4.6", "axios": "^1.6.8", "json-bigint": "^1.0.0", "json2iob": "^2.6.8", "ngeohash": "^0.6.3", "qs": "^6.12.0", "request": "^2.88.2", - "traverse": "^0.6.8", + "traverse": "^0.6.9", "uuid": "^9.0.1" }, "deprecated": false, @@ -37,10 +37,10 @@ "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.1", - "@types/node": "^20.11.28", + "@types/node": "^20.12.6", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", - "typescript": "~5.4.2" + "typescript": "~5.4.4" }, "engines": { "node": ">=10.0.0" From 3688460bd35a70efd69369af70f7f8652b456aa8 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 10 Apr 2024 20:59:51 +0200 Subject: [PATCH 632/729] add cupra pos, mileage and climate settings --- main.js | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/main.js b/main.js index af7d114b..c477e846 100644 --- a/main.js +++ b/main.js @@ -3257,6 +3257,64 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); error.response && this.log.error(JSON.stringify(error.response.data)); }); + + await axios({ + method: "get", + maxBodyLength: Infinity, + url: "https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/" + vin + "/parkingposition", + headers: { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + this.json2iob.parse(vin + ".parkingposition", res.data); + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + await axios({ + method: "get", + maxBodyLength: Infinity, + url: "https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/" + vin + "/mileage", + headers: { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + this.json2iob.parse(vin + ".mileage", res.data); + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + await axios({ + method: "get", + maxBodyLength: Infinity, + url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/" + vin + "/climatisation/settings", + headers: { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + this.json2iob.parse(vin + ".climatisation.settings", res.data); + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); }); } setSeatCupraStatus(vin, action, state) { From be2791c1dfe1467e21e081ac1a6de1d36eac0e41 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 11 Apr 2024 10:25:07 +0200 Subject: [PATCH 633/729] chore: release v0.6.0 - add additonal cupra states --- README.md | 4 ++++ io-package.json | 19 ++++++++++++++----- package-lock.json | 32 ++++++++++++++++---------------- package.json | 8 ++++---- 4 files changed, 38 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 5570f4b6..e46f6ec9 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.6.0 (2024-04-11) + +- add additonal cupra states + ### 0.5.4 (2024-03-17) - fix door window states diff --git a/io-package.json b/io-package.json index cf76e70c..a0befdf0 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.5.4", + "version": "0.6.0", "news": { + "0.6.0": { + "en": "add additonal cupra states", + "de": "Zusätzliche Cupra States hinzugefügt", + "ru": "добавочные состояния", + "pt": "additonal cupra estados", + "nl": "additunal cupra states toevoegen", + "fr": "ajouter les états cupra additonal", + "it": "aggiungere stati cupra additonali", + "es": "añadir estados de cúpula", + "pl": "additonal cupra states", + "uk": "additonal cupra стани", + "zh-cn": "添加额外 cupra 状态" + }, "0.5.4": { "en": "fix door window states", "de": "Fix für door und window States", @@ -35,10 +48,6 @@ "0.3.2": { "en": "Improve Volkswagen App remotes (window heatings,settings)", "de": "Verbesserung der Volkswagen App Remotes (Fensterheizungen, Einstellungen)" - }, - "0.2.5": { - "en": "removed deactivated we-connect type", - "de": "Deaktivierter We-Connect Typ entfernt" } }, "title": "VW Connect", diff --git a/package-lock.json b/package-lock.json index 496dbad1..b6866f81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.5.4", + "version": "0.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.5.4", + "version": "0.6.0", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.0.6", @@ -26,10 +26,10 @@ "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.1", - "@types/node": "^20.12.6", + "@types/node": "^20.12.7", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", - "typescript": "~5.4.4" + "typescript": "~5.4.5" }, "engines": { "node": ">=10.0.0" @@ -561,9 +561,9 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "node_modules/@types/node": { - "version": "20.12.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz", - "integrity": "sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3836,9 +3836,9 @@ } }, "node_modules/typescript": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", - "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4491,9 +4491,9 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "@types/node": { - "version": "20.12.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz", - "integrity": "sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -6852,9 +6852,9 @@ } }, "typescript": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", - "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true }, "unbox-primitive": { diff --git a/package.json b/package.json index 5804ddcf..146b59d9 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,10 @@ "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.1", - "@types/node": "^20.12.6", + "@types/node": "^20.12.7", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", - "typescript": "~5.4.4" + "typescript": "~5.4.5" }, "engines": { "node": ">=10.0.0" @@ -72,7 +72,7 @@ "test:unit": "mocha test/unit --exit", "check": "tsc --noEmit -p tsconfig.check.json", "translate": "translate-adapter", - "release": "release-script" + "release": "release-script --all" }, - "version": "0.5.4" + "version": "0.6.0" } From 1bea7002b834d672f998717c2232223d4d1d13af Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 17 Apr 2024 16:08:22 +0200 Subject: [PATCH 634/729] update depen --- .github/workflows/test-and-release.yml | 2 +- package-lock.json | 42 +++++++++++++------------- package.json | 6 ++-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index c82ca580..afb92f31 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -72,7 +72,7 @@ jobs: steps: - uses: ioBroker/testing-action-deploy@v1 with: - node-version: "18.x" + node-version: "20.x" # Uncomment the following line if your adapter cannot be installed using 'npm ci' # install-command: 'npm install' npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/package-lock.json b/package-lock.json index b6866f81..13307385 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,13 @@ "version": "0.6.0", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^3.0.6", + "@iobroker/adapter-core": "^3.1.0", "@peculiar/webcrypto": "^1.4.6", "axios": "^1.6.8", "json-bigint": "^1.0.0", "json2iob": "^2.6.8", "ngeohash": "^0.6.3", - "qs": "^6.12.0", + "qs": "^6.12.1", "request": "^2.88.2", "traverse": "^0.6.9", "uuid": "^9.0.1" @@ -25,7 +25,7 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.0", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@iobroker/testing": "^4.1.1", + "@iobroker/testing": "^4.1.3", "@types/node": "^20.12.7", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", @@ -365,9 +365,9 @@ "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.6.tgz", - "integrity": "sha512-uoCDbd5gEPqUYAb2qY6L+ovpycK2JS9dqB85a53WNZ5sGjcm5ChA7kKcsZD7NpMM9pBFb7tJSviosPPalbXQTA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.1.0.tgz", + "integrity": "sha512-//XeBqMzVWIPelJYiIXalxRMtvMbY7S5XOFQbSjwG0YqX0wgobWmbJk1hGd/qGVUYzhY+SKNJ3nAbjB+28bd0w==", "engines": { "npm": ">=7.0.0" }, @@ -376,9 +376,9 @@ } }, "node_modules/@iobroker/testing": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.1.tgz", - "integrity": "sha512-TGl0o+ejiSUuJiyv6bYgOCkv3w/bOo0eEThAgl3sG3nyiWDBLuXCbtE18UlRLbFyYLOWZ1KETp1f0x7kHMKLxA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.3.tgz", + "integrity": "sha512-PTfvlXQBXDJVX35bkJxzgjuMX6bEjUmB4Dy8+bWLqbOgyq1JQVrRn+ah5IB7hEf+4lP8wD0MpAjXFJTv3zfTvA==", "dev": true, "dependencies": { "alcalzone-shared": "~4.0.3", @@ -3079,9 +3079,9 @@ } }, "node_modules/qs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", - "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", + "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", "dependencies": { "side-channel": "^1.0.6" }, @@ -4325,15 +4325,15 @@ "dev": true }, "@iobroker/adapter-core": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.6.tgz", - "integrity": "sha512-uoCDbd5gEPqUYAb2qY6L+ovpycK2JS9dqB85a53WNZ5sGjcm5ChA7kKcsZD7NpMM9pBFb7tJSviosPPalbXQTA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.1.0.tgz", + "integrity": "sha512-//XeBqMzVWIPelJYiIXalxRMtvMbY7S5XOFQbSjwG0YqX0wgobWmbJk1hGd/qGVUYzhY+SKNJ3nAbjB+28bd0w==", "requires": {} }, "@iobroker/testing": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.1.tgz", - "integrity": "sha512-TGl0o+ejiSUuJiyv6bYgOCkv3w/bOo0eEThAgl3sG3nyiWDBLuXCbtE18UlRLbFyYLOWZ1KETp1f0x7kHMKLxA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.3.tgz", + "integrity": "sha512-PTfvlXQBXDJVX35bkJxzgjuMX6bEjUmB4Dy8+bWLqbOgyq1JQVrRn+ah5IB7hEf+4lP8wD0MpAjXFJTv3zfTvA==", "dev": true, "requires": { "alcalzone-shared": "~4.0.3", @@ -6323,9 +6323,9 @@ "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" }, "qs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", - "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", + "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", "requires": { "side-channel": "^1.0.6" } diff --git a/package.json b/package.json index 146b59d9..cde8a2a3 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,13 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^3.0.6", + "@iobroker/adapter-core": "^3.1.0", "@peculiar/webcrypto": "^1.4.6", "axios": "^1.6.8", "json-bigint": "^1.0.0", "json2iob": "^2.6.8", "ngeohash": "^0.6.3", - "qs": "^6.12.0", + "qs": "^6.12.1", "request": "^2.88.2", "traverse": "^0.6.9", "uuid": "^9.0.1" @@ -36,7 +36,7 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.0", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@iobroker/testing": "^4.1.1", + "@iobroker/testing": "^4.1.3", "@types/node": "^20.12.7", "eslint": "^8.57.0", "eslint-plugin-promise": "^6.1.1", From 379ad764f7abf6be0501f78f04d8da9f94b73d22 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 1 Oct 2024 00:09:53 +0200 Subject: [PATCH 635/729] update skoda api --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index c477e846..83eb5b4e 100644 --- a/main.js +++ b/main.js @@ -1852,7 +1852,7 @@ class VwWeconnect extends utils.Adapter { }; } if (this.config.type === "skodae" || this.config.type === "skoda") { - url = "https://api.connect.skoda-auto.cz/api/v3/garage"; + url = "https://api.connect.skoda-auto.cz/api/v4/garage"; // @ts-ignore headers = { accept: "application/json", From fee89533e1029eec7eed29fb81b6f27e707e4f3b Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 1 Oct 2024 08:14:52 +0200 Subject: [PATCH 636/729] chore: release v0.6.1 - fix for skoda login --- README.md | 4 + io-package.json | 24 +++- package-lock.json | 343 +++++++++++++++++++++++----------------------- package.json | 26 ++-- 4 files changed, 209 insertions(+), 188 deletions(-) diff --git a/README.md b/README.md index e46f6ec9..c8d983b2 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.6.1 (2024-10-01) + +- fix for skoda login + ### 0.6.0 (2024-04-11) - add additonal cupra states diff --git a/io-package.json b/io-package.json index a0befdf0..dd2ed80f 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.6.0", + "version": "0.6.1", "news": { + "0.6.1": { + "en": "fix for skoda login", + "de": "fix für skoda login", + "ru": "исправить для skoda login", + "pt": "correção para o login skoda", + "nl": "fix voor skoda login", + "fr": "correction pour la connexion skoda", + "it": "correzione per skoda login", + "es": "fix for skoda login", + "pl": "fix for skoda logowanie", + "uk": "виправлення для входу в скоду", + "zh-cn": "用于 skoda 登录的修复" + }, "0.6.0": { "en": "add additonal cupra states", "de": "Zusätzliche Cupra States hinzugefügt", @@ -44,10 +57,6 @@ "0.3.6": { "en": "Improve trip loading and fix windowheating warning", "de": "Verbesserung der Trip Abfrage und Fix für windowheating Warnung" - }, - "0.3.2": { - "en": "Improve Volkswagen App remotes (window heatings,settings)", - "de": "Verbesserung der Volkswagen App Remotes (Fensterheizungen, Einstellungen)" } }, "title": "VW Connect", @@ -75,7 +84,10 @@ "pl": "Adapter do VW Connect", "zh-cn": "大众我们连接的适配器" }, - "authors": ["ta2k ", "Sneak-L8 "], + "authors": [ + "ta2k ", + "Sneak-L8 " + ], "keywords": [ "VW", "Connect", diff --git a/package-lock.json b/package-lock.json index 13307385..8b4cd3fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,35 @@ { "name": "iobroker.vw-connect", - "version": "0.6.0", + "version": "0.6.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.6.0", + "version": "0.6.1", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^3.1.0", - "@peculiar/webcrypto": "^1.4.6", - "axios": "^1.6.8", + "@iobroker/adapter-core": "^3.2.1", + "@peculiar/webcrypto": "^1.5.0", + "axios": "^1.7.7", "json-bigint": "^1.0.0", - "json2iob": "^2.6.8", + "json2iob": "^2.6.12", "ngeohash": "^0.6.3", - "qs": "^6.12.1", + "qs": "^6.13.0", "request": "^2.88.2", - "traverse": "^0.6.9", + "traverse": "^0.6.10", "uuid": "^9.0.1" }, "devDependencies": { - "@alcalzone/release-script": "^3.7.0", - "@alcalzone/release-script-plugin-iobroker": "^3.7.0", + "@alcalzone/release-script": "^3.8.0", + "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.3", - "@types/node": "^20.12.7", - "eslint": "^8.57.0", - "eslint-plugin-promise": "^6.1.1", - "typescript": "~5.4.5" + "@types/node": "^20.16.10", + "eslint": "^8.57.1", + "eslint-plugin-promise": "^6.6.0", + "typescript": "~5.6.2" }, "engines": { "node": ">=10.0.0" @@ -45,9 +45,9 @@ } }, "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, "dependencies": { "axios": "^1.6.2", @@ -81,16 +81,16 @@ } }, "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, "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", @@ -148,9 +148,9 @@ } }, "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, "dependencies": { "@alcalzone/release-script-core": "3.7.0", @@ -161,9 +161,9 @@ } }, "node_modules/@alcalzone/release-script-plugin-iobroker": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.0.tgz", - "integrity": "sha512-6nkLIDZ4qvZ21f3ozjPJ//x+hqkaiTfkDcYnyw6SWOIUbCa5v7Xj0cAZY7INguSfjv18UOTlU1J8xdzqHxtREg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.2.tgz", + "integrity": "sha512-ezXFyxx2irq7my3BmlBUrzT+QHNsldR9MQYkXs7uyH6lXSkudmqq5EiDW9WckT0Cj9YqIUzoOJhhnZA9M+XTvQ==", "dev": true, "dependencies": { "@alcalzone/release-script-core": "3.7.0", @@ -203,9 +203,9 @@ } }, "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, "dependencies": { "@alcalzone/pak": "^0.10.1", @@ -323,21 +323,22 @@ } }, "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, "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, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -359,20 +360,21 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "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==", + "deprecated": "Use @eslint/object-schema instead", "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.1.0.tgz", - "integrity": "sha512-//XeBqMzVWIPelJYiIXalxRMtvMbY7S5XOFQbSjwG0YqX0wgobWmbJk1hGd/qGVUYzhY+SKNJ3nAbjB+28bd0w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.1.tgz", + "integrity": "sha512-sUvNZV5sUvg8TcucJ+CLDYgZ0sSivQEmkIaJQHNPU8yUBzOU//ECCc55gz+B2BVvgeGIN3fnmlCS9hOu7yOulw==", "engines": { - "npm": ">=7.0.0" + "node": ">=16" }, "peerDependencies": { - "@iobroker/types": "^5.0.11" + "@iobroker/types": "^6.0.11" } }, "node_modules/@iobroker/testing": { @@ -432,9 +434,9 @@ } }, "node_modules/@iobroker/types": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-5.0.12.tgz", - "integrity": "sha512-zExHvDhSyjgSioJYB8BQa1LvmtiZjn0ThJfaKP+jH9tx7ddyK/irI5cqjR0Y6DUpx0x9BkaDI9utuPVbRWzYLQ==", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-6.0.11.tgz", + "integrity": "sha512-RNDURjtL5Cm9wt6ocCqdRi86Qx1350zBIvvrJ9+Fjgasoi6cWCdoOghkwEeb95TH2j//q/uLqWwL8SZ0vxx6Kw==", "peer": true, "engines": { "node": ">=12.0.0" @@ -476,9 +478,9 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", - "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", + "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", "dependencies": { "asn1js": "^3.0.5", "pvtsutils": "^1.3.5", @@ -497,15 +499,15 @@ } }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.6.tgz", - "integrity": "sha512-YBcMfqNSwn3SujUJvAaySy5tlYbYm6tVt9SKoXu8BaTdKGROiJDgPR3TXpZdAKUfklzm3lRapJEAltiMQtBgZg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", + "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", "dependencies": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.5", "tslib": "^2.6.2", - "webcrypto-core": "^1.7.9" + "webcrypto-core": "^1.8.0" }, "engines": { "node": ">=10.12.0" @@ -561,12 +563,12 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "node_modules/@types/node": { - "version": "20.12.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", - "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "version": "20.16.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz", + "integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@ungap/structured-clone": { @@ -782,9 +784,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1410,16 +1412,16 @@ } }, "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==", "dev": true, "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", @@ -1465,15 +1467,18 @@ } }, "node_modules/eslint-plugin-promise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz", + "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-scope": { @@ -2527,9 +2532,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json2iob": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.8.tgz", - "integrity": "sha512-hNHS6hCelDJzgP8PVkgF2JxW8g+zbTQacZPSJoZJcXoxUJ69RENjZniX58YYZuAcPaKlB1MV7Oczq+vYRErrjQ==", + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.12.tgz", + "integrity": "sha512-cLlZbhPU5rTrfBljz5qhWER1vsTUTidccPz/uMHPdgyTIUy1hMA24m8mVJnmSLrocpsOfSJ827O7+B65k710HA==", "dependencies": { "@types/json-bigint": "^1.0.4", "json-bigint": "^1.0.0" @@ -3079,9 +3084,9 @@ } }, "node_modules/qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dependencies": { "side-channel": "^1.0.6" }, @@ -3678,9 +3683,9 @@ } }, "node_modules/traverse": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.9.tgz", - "integrity": "sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg==", + "version": "0.6.10", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.10.tgz", + "integrity": "sha512-hN4uFRxbK+PX56DxYiGHsTn2dME3TVr9vbNqlQGcGcPhJAn+tdP126iA+TArMpI4YSgnTkMWyoLl5bf81Hi5TA==", "dependencies": { "gopd": "^1.0.1", "typedarray.prototype.slice": "^1.0.3", @@ -3694,9 +3699,9 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -3836,9 +3841,9 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -3863,9 +3868,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "node_modules/universalify": { @@ -3911,9 +3916,9 @@ } }, "node_modules/webcrypto-core": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.9.tgz", - "integrity": "sha512-FE+a4PPkOmBbgNDIyRmcHhgXn+2ClRl3JzJdDu/P4+B8y81LqKe6RAsI9b3lAOHe1T1BMkSjsRHTYRikImZnVA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", + "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", "dependencies": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", @@ -4077,9 +4082,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", @@ -4109,16 +4114,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", @@ -4195,9 +4200,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", @@ -4205,9 +4210,9 @@ } }, "@alcalzone/release-script-plugin-iobroker": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.0.tgz", - "integrity": "sha512-6nkLIDZ4qvZ21f3ozjPJ//x+hqkaiTfkDcYnyw6SWOIUbCa5v7Xj0cAZY7INguSfjv18UOTlU1J8xdzqHxtREg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.2.tgz", + "integrity": "sha512-ezXFyxx2irq7my3BmlBUrzT+QHNsldR9MQYkXs7uyH6lXSkudmqq5EiDW9WckT0Cj9YqIUzoOJhhnZA9M+XTvQ==", "dev": true, "requires": { "@alcalzone/release-script-core": "3.7.0", @@ -4238,9 +4243,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", @@ -4296,18 +4301,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" } @@ -4319,15 +4324,15 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "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 }, "@iobroker/adapter-core": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.1.0.tgz", - "integrity": "sha512-//XeBqMzVWIPelJYiIXalxRMtvMbY7S5XOFQbSjwG0YqX0wgobWmbJk1hGd/qGVUYzhY+SKNJ3nAbjB+28bd0w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.1.tgz", + "integrity": "sha512-sUvNZV5sUvg8TcucJ+CLDYgZ0sSivQEmkIaJQHNPU8yUBzOU//ECCc55gz+B2BVvgeGIN3fnmlCS9hOu7yOulw==", "requires": {} }, "@iobroker/testing": { @@ -4378,9 +4383,9 @@ } }, "@iobroker/types": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-5.0.12.tgz", - "integrity": "sha512-zExHvDhSyjgSioJYB8BQa1LvmtiZjn0ThJfaKP+jH9tx7ddyK/irI5cqjR0Y6DUpx0x9BkaDI9utuPVbRWzYLQ==", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-6.0.11.tgz", + "integrity": "sha512-RNDURjtL5Cm9wt6ocCqdRi86Qx1350zBIvvrJ9+Fjgasoi6cWCdoOghkwEeb95TH2j//q/uLqWwL8SZ0vxx6Kw==", "peer": true }, "@nodelib/fs.scandir": { @@ -4410,9 +4415,9 @@ } }, "@peculiar/asn1-schema": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", - "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", + "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", "requires": { "asn1js": "^3.0.5", "pvtsutils": "^1.3.5", @@ -4428,15 +4433,15 @@ } }, "@peculiar/webcrypto": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.6.tgz", - "integrity": "sha512-YBcMfqNSwn3SujUJvAaySy5tlYbYm6tVt9SKoXu8BaTdKGROiJDgPR3TXpZdAKUfklzm3lRapJEAltiMQtBgZg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", + "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", "requires": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.5", "tslib": "^2.6.2", - "webcrypto-core": "^1.7.9" + "webcrypto-core": "^1.8.0" } }, "@sinonjs/commons": { @@ -4491,12 +4496,12 @@ "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, "@types/node": { - "version": "20.12.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", - "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "version": "20.16.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz", + "integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==", "dev": true, "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "@ungap/structured-clone": { @@ -4652,9 +4657,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "requires": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -5124,16 +5129,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", @@ -5181,9 +5186,9 @@ } }, "eslint-plugin-promise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz", + "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", "dev": true, "requires": {} }, @@ -5903,9 +5908,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json2iob": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.8.tgz", - "integrity": "sha512-hNHS6hCelDJzgP8PVkgF2JxW8g+zbTQacZPSJoZJcXoxUJ69RENjZniX58YYZuAcPaKlB1MV7Oczq+vYRErrjQ==", + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.12.tgz", + "integrity": "sha512-cLlZbhPU5rTrfBljz5qhWER1vsTUTidccPz/uMHPdgyTIUy1hMA24m8mVJnmSLrocpsOfSJ827O7+B65k710HA==", "requires": { "@types/json-bigint": "^1.0.4", "json-bigint": "^1.0.0" @@ -6323,9 +6328,9 @@ "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" }, "qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", + "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.6" } @@ -6742,9 +6747,9 @@ } }, "traverse": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.9.tgz", - "integrity": "sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg==", + "version": "0.6.10", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.10.tgz", + "integrity": "sha512-hN4uFRxbK+PX56DxYiGHsTn2dME3TVr9vbNqlQGcGcPhJAn+tdP126iA+TArMpI4YSgnTkMWyoLl5bf81Hi5TA==", "requires": { "gopd": "^1.0.1", "typedarray.prototype.slice": "^1.0.3", @@ -6752,9 +6757,9 @@ } }, "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" }, "tunnel-agent": { "version": "0.6.0", @@ -6852,9 +6857,9 @@ } }, "typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true }, "unbox-primitive": { @@ -6869,9 +6874,9 @@ } }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "universalify": { @@ -6904,9 +6909,9 @@ } }, "webcrypto-core": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.9.tgz", - "integrity": "sha512-FE+a4PPkOmBbgNDIyRmcHhgXn+2ClRl3JzJdDu/P4+B8y81LqKe6RAsI9b3lAOHe1T1BMkSjsRHTYRikImZnVA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", + "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", "requires": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", diff --git a/package.json b/package.json index cde8a2a3..490290c1 100644 --- a/package.json +++ b/package.json @@ -18,29 +18,29 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^3.1.0", - "@peculiar/webcrypto": "^1.4.6", - "axios": "^1.6.8", + "@iobroker/adapter-core": "^3.2.1", + "@peculiar/webcrypto": "^1.5.0", + "axios": "^1.7.7", "json-bigint": "^1.0.0", - "json2iob": "^2.6.8", + "json2iob": "^2.6.12", "ngeohash": "^0.6.3", - "qs": "^6.12.1", + "qs": "^6.13.0", "request": "^2.88.2", - "traverse": "^0.6.9", + "traverse": "^0.6.10", "uuid": "^9.0.1" }, "deprecated": false, "description": "Adapter for VW Connect", "devDependencies": { - "@alcalzone/release-script": "^3.7.0", - "@alcalzone/release-script-plugin-iobroker": "^3.7.0", + "@alcalzone/release-script": "^3.8.0", + "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@iobroker/testing": "^4.1.3", - "@types/node": "^20.12.7", - "eslint": "^8.57.0", - "eslint-plugin-promise": "^6.1.1", - "typescript": "~5.4.5" + "@types/node": "^20.16.10", + "eslint": "^8.57.1", + "eslint-plugin-promise": "^6.6.0", + "typescript": "~5.6.2" }, "engines": { "node": ">=10.0.0" @@ -74,5 +74,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.6.0" + "version": "0.6.1" } From 9d5018a51d01ddc4a275a05834211931b5a553c8 Mon Sep 17 00:00:00 2001 From: Martijn Poppen Date: Thu, 12 Dec 2024 09:35:40 +0100 Subject: [PATCH 637/729] FIX: Accept consent when login in The Consent was changed and it seems like the API only accepts a German consent. So that's what I changed and VW, AUDI, SEAT and CUPRA are working again. --- main.js | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/main.js b/main.js index 83eb5b4e..4fa88eff 100644 --- a/main.js +++ b/main.js @@ -683,22 +683,24 @@ class VwWeconnect extends utils.Adapter { //check for empty form object if (Object.keys(form).length === 0 && form.constructor === Object) { try { - const stringJson = body - .split("window._IDK = ")[1] - .split(" Date: Thu, 20 Feb 2025 23:48:52 +0100 Subject: [PATCH 638/729] update dep --- .eslintignore | 2 - .eslintrc.json | 42 - admin/words.js | 75 +- eslint.config.cjs | 52 + lib/extractKeys.js | 356 ++-- lib/json2iob.js | 321 --- lib/tools.js | 84 +- main.js | 11 + package-lock.json | 4506 ++++++++++++++++++++++++++----------------- package.json | 25 +- test/mocha.setup.js | 2 +- 11 files changed, 3120 insertions(+), 2356 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.json create mode 100644 eslint.config.cjs delete mode 100644 lib/json2iob.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 478d05aa..00000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -.prettierrc.js -**/.eslintrc.js \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index a596ba33..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "root": true, - "env": { - "es6": true, - "node": true, - "mocha": true - }, - "extends": ["eslint:recommended"], - "plugins": [], - "rules": { - "indent": [ - "error", - 2, - { - "SwitchCase": 1 - } - ], - "no-console": "off", - "no-unused-vars": [ - "error", - { - "ignoreRestSiblings": true, - "argsIgnorePattern": "^_" - } - ], - "no-var": "error", - "no-trailing-spaces": "error", - "prefer-const": "error", - "quotes": [ - "error", - "double", - { - "avoidEscape": true, - "allowTemplateLiterals": true - } - ], - "semi": ["error", "always"] - }, - "parserOptions": { - "ecmaVersion": 2020 - } -} diff --git a/admin/words.js b/admin/words.js index 1676a110..aa7f7286 100644 --- a/admin/words.js +++ b/admin/words.js @@ -1,41 +1,42 @@ +//eslint-disable-next-line no-unused-vars /*global systemDictionary:true */ "use strict"; systemDictionary = { - "vw-connect adapter settings": { - "en": "Adapter settings for vw-connect", - "de": "Adaptereinstellungen für vw-connect", - "ru": "Настройки адаптера для vw-connect", - "pt": "Configurações do adaptador para vw-connect", - "nl": "Adapterinstellingen voor vw-connect", - "fr": "Paramètres d'adaptateur pour vw-connect", - "it": "Impostazioni dell'adattatore per vw-connect", - "es": "Ajustes del adaptador para vw-connect", - "pl": "Ustawienia adaptera dla vw-connect", - "zh-cn": "vw-connect的适配器设置" - }, - "option1": { - "en": "option1", - "de": "Option 1", - "ru": "Опция 1", - "pt": "Opção 1", - "nl": "Optie 1", - "fr": "Option 1", - "it": "opzione 1", - "es": "Opción 1", - "pl": "opcja 1", - "zh-cn": "选项1" - }, - "option2": { - "en": "option2", - "de": "Option 2", - "ru": "option2", - "pt": "opção 2", - "nl": "Optie 2", - "fr": "Option 2", - "it": "opzione 2", - "es": "opcion 2", - "pl": "Opcja 2", - "zh-cn": "选项2" - } -}; \ No newline at end of file + "vw-connect adapter settings": { + en: "Adapter settings for vw-connect", + de: "Adaptereinstellungen für vw-connect", + ru: "Настройки адаптера для vw-connect", + pt: "Configurações do adaptador para vw-connect", + nl: "Adapterinstellingen voor vw-connect", + fr: "Paramètres d'adaptateur pour vw-connect", + it: "Impostazioni dell'adattatore per vw-connect", + es: "Ajustes del adaptador para vw-connect", + pl: "Ustawienia adaptera dla vw-connect", + "zh-cn": "vw-connect的适配器设置", + }, + option1: { + en: "option1", + de: "Option 1", + ru: "Опция 1", + pt: "Opção 1", + nl: "Optie 1", + fr: "Option 1", + it: "opzione 1", + es: "Opción 1", + pl: "opcja 1", + "zh-cn": "选项1", + }, + option2: { + en: "option2", + de: "Option 2", + ru: "option2", + pt: "opção 2", + nl: "Optie 2", + fr: "Option 2", + it: "opzione 2", + es: "opcion 2", + pl: "Opcja 2", + "zh-cn": "选项2", + }, +}; diff --git a/eslint.config.cjs b/eslint.config.cjs new file mode 100644 index 00000000..5b6475c2 --- /dev/null +++ b/eslint.config.cjs @@ -0,0 +1,52 @@ +const globals = require("globals"); +const js = require("@eslint/js"); + +const { + FlatCompat, +} = require("@eslint/eslintrc"); + +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +module.exports = [{ + ignores: ["**/.prettierrc.js", "**/.eslintrc.js"], +}, ...compat.extends("eslint:recommended"), { + plugins: {}, + + languageOptions: { + globals: { + ...globals.node, + ...globals.mocha, + }, + + ecmaVersion: 2020, + sourceType: "commonjs", + }, + + rules: { + indent: ["error", 2, { + SwitchCase: 1, + }], + + "no-console": "off", + + "no-unused-vars": ["error", { + ignoreRestSiblings: true, + argsIgnorePattern: "^_", + }], + + "no-var": "error", + "no-trailing-spaces": "error", + "prefer-const": "error", + + quotes: ["error", "double", { + avoidEscape: true, + allowTemplateLiterals: true, + }], + + semi: ["error", "always"], + }, +}]; \ No newline at end of file diff --git a/lib/extractKeys.js b/lib/extractKeys.js index 025a0c3a..95ee9bb1 100644 --- a/lib/extractKeys.js +++ b/lib/extractKeys.js @@ -1,197 +1,197 @@ //v2.5 async function extractKeys(adapter, path, element, preferedArrayName, forceIndex) { - try { - if (element === null || element === undefined) { - adapter.log.debug("Cannot extract empty: " + path); - return; - } - const objectKeys = Object.keys(element); - let write = false; - if (Array.isArray(element)) { - extractArray(adapter, element, "", path, write, preferedArrayName, forceIndex); - return; - } - if (path.toLowerCase().endsWith("settings")) { - await adapter.setObjectNotExistsAsync(path, { - type: "state", - common: { - name: "Einstellungen sind hier änderbar / You can change the settings here", - role: "indicator", - write: false, - read: true, - }, - native: {}, - }); - write = true; + try { + if (element === null || element === undefined) { + adapter.log.debug("Cannot extract empty: " + path); + return; + } + const objectKeys = Object.keys(element); + let write = false; + if (Array.isArray(element)) { + extractArray(adapter, element, "", path, write, preferedArrayName, forceIndex); + return; + } + if (path.toLowerCase().endsWith("settings")) { + await adapter.setObjectNotExistsAsync(path, { + type: "state", + common: { + name: "Einstellungen sind hier änderbar / You can change the settings here", + role: "indicator", + write: false, + read: true, + }, + native: {}, + }); + write = true; + } + if (typeof element === "string" || typeof element === "number") { + let name = element; + if (typeof element === "number") { + name = element.toString(); + } + adapter + .setObjectNotExistsAsync(path, { + type: "state", + common: { + name: name, + role: "indicator", + type: typeof element, + write: write, + read: true, + }, + native: {}, + }) + .then(() => { + adapter.setState(path, element, true); + }) + .catch((error) => { + adapter.log.error(error); + }); + return; + } + + objectKeys.forEach((key) => { + if (Array.isArray(element[key])) { + extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex); + } else if (element[key] !== null && typeof element[key] === "object") { + extractKeys(adapter, path + "." + key, element[key], preferedArrayName, forceIndex); + } else { + if (path.indexOf("stations.") > -1 && path.indexOf("sessions.") > -1 && key === "id") { + adapter.setObjectNotExistsAsync(path + ".stopCharging", { + type: "state", + common: { + name: "Stoppe Ladung", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); } - if (typeof element === "string" || typeof element === "number") { - let name = element; - if (typeof element === "number") { - name = element.toString(); - } - adapter - .setObjectNotExistsAsync(path, { - type: "state", - common: { - name: name, - role: "indicator", - type: typeof element, - write: write, - read: true, - }, - native: {}, - }) - .then(() => { - adapter.setState(path, element, true); - }) - .catch((error) => { - adapter.log.error(error); - }); - return; + if (path.indexOf("stations.") > -1 && path.split(".").length === 4 && key === "id") { + adapter.setObjectNotExistsAsync(path + ".startCharging", { + type: "state", + common: { + name: "Starte Ladung", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); } - objectKeys.forEach((key) => { - if (Array.isArray(element[key])) { - extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex); - } else if (element[key] !== null && typeof element[key] === "object") { - extractKeys(adapter, path + "." + key, element[key], preferedArrayName, forceIndex); - } else { - if (path.indexOf("stations.") > -1 && path.indexOf("sessions.") > -1 && key === "id") { - adapter.setObjectNotExistsAsync(path + ".stopCharging", { - type: "state", - common: { - name: "Stoppe Ladung", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - } - if (path.indexOf("stations.") > -1 && path.split(".").length === 4 && key === "id") { - adapter.setObjectNotExistsAsync(path + ".startCharging", { - type: "state", - common: { - name: "Starte Ladung", - type: "boolean", - role: "boolean", - write: true, - }, - native: {}, - }); - } - - adapter - .setObjectNotExistsAsync(path + "." + key, { - type: "state", - common: { - name: key, - role: "indicator", - type: typeof element[key], - write: write, - read: true, - }, - native: {}, - }) - .then(() => { - adapter.setState(path + "." + key, element[key], true); - }) - .catch((error) => { - adapter.log.error(error); - }); - } - }); - } catch (error) { - adapter.log.error("Error extract keys: " + path + " " + JSON.stringify(element)); - adapter.log.error(error); - } + adapter + .setObjectNotExistsAsync(path + "." + key, { + type: "state", + common: { + name: key, + role: "indicator", + type: typeof element[key], + write: write, + read: true, + }, + native: {}, + }) + .then(() => { + adapter.setState(path + "." + key, element[key], true); + }) + .catch((error) => { + adapter.log.error(error); + }); + } + }); + } catch (error) { + adapter.log.error("Error extract keys: " + path + " " + JSON.stringify(element)); + adapter.log.error(error); + } } function extractArray(adapter, element, key, path, write, preferedArrayName, forceIndex) { - try { - if (key) { - element = element[key]; - } - element.forEach(async (arrayElement, index) => { - index = index + 1; - if (index < 10) { - index = "0" + index; - } - let arrayPath = key + index; + try { + if (key) { + element = element[key]; + } + element.forEach(async (arrayElement, index) => { + index = index + 1; + if (index < 10) { + index = "0" + index; + } + let arrayPath = key + index; - if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { - arrayPath = arrayElement[Object.keys(arrayElement)[0]]; - } - Object.keys(arrayElement).forEach((keyName) => { - if (keyName.endsWith("Id")) { - if (arrayElement[keyName].replace) { - arrayPath = arrayElement[keyName].replace(/\./g, ""); - } else { - arrayPath = arrayElement[keyName]; - } - } - }); - Object.keys(arrayElement).forEach((keyName) => { - if (keyName.endsWith("Name")) { - arrayPath = arrayElement[keyName]; - } - }); + if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { + arrayPath = arrayElement[Object.keys(arrayElement)[0]]; + } + Object.keys(arrayElement).forEach((keyName) => { + if (keyName.endsWith("Id")) { + if (arrayElement[keyName].replace) { + arrayPath = arrayElement[keyName].replace(/\./g, ""); + } else { + arrayPath = arrayElement[keyName]; + } + } + }); + Object.keys(arrayElement).forEach((keyName) => { + if (keyName.endsWith("Name")) { + arrayPath = arrayElement[keyName]; + } + }); - if (arrayElement.id) { - if (arrayElement.id.replace) { - arrayPath = arrayElement.id.replace(/\./g, ""); - } else { - arrayPath = arrayElement.id; - } - } - if (arrayElement.name) { - arrayPath = arrayElement.name.replace(/\./g, ""); - } - if (arrayElement.start_date_time) { - arrayPath = arrayElement.start_date_time.replace(/\./g, ""); - } - if (preferedArrayName && arrayElement[preferedArrayName]) { - arrayPath = arrayElement[preferedArrayName].replace(/\./g, ""); - } + if (arrayElement.id) { + if (arrayElement.id.replace) { + arrayPath = arrayElement.id.replace(/\./g, ""); + } else { + arrayPath = arrayElement.id; + } + } + if (arrayElement.name) { + arrayPath = arrayElement.name.replace(/\./g, ""); + } + if (arrayElement.start_date_time) { + arrayPath = arrayElement.start_date_time.replace(/\./g, ""); + } + if (preferedArrayName && arrayElement[preferedArrayName]) { + arrayPath = arrayElement[preferedArrayName].replace(/\./g, ""); + } - if (forceIndex) { - arrayPath = key + index; - } - //special case array with 2 string objects - if ( - Object.keys(arrayElement).length === 2 && + if (forceIndex) { + arrayPath = key + index; + } + //special case array with 2 string objects + if ( + Object.keys(arrayElement).length === 2 && typeof Object.keys(arrayElement)[0] === "string" && typeof Object.keys(arrayElement)[1] === "string" && typeof arrayElement[Object.keys(arrayElement)[0]] !== "object" && typeof arrayElement[Object.keys(arrayElement)[1]] !== "object" - ) { - let subKey = arrayElement[Object.keys(arrayElement)[0]]; - const subValue = arrayElement[Object.keys(arrayElement)[1]]; - const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; - if (key) { - subKey = key + "." + subKey; - } - await adapter.setObjectNotExistsAsync(path + "." + subKey, { - type: "state", - common: { - name: subName, - role: "indicator", - type: typeof subValue, - write: write, - read: true, - }, - native: {}, - }); - adapter.setState(path + "." + subKey, subValue, true); - return; - } - extractKeys(adapter, path + "." + arrayPath, arrayElement, preferedArrayName, forceIndex); + ) { + let subKey = arrayElement[Object.keys(arrayElement)[0]]; + const subValue = arrayElement[Object.keys(arrayElement)[1]]; + const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; + if (key) { + subKey = key + "." + subKey; + } + await adapter.setObjectNotExistsAsync(path + "." + subKey, { + type: "state", + common: { + name: subName, + role: "indicator", + type: typeof subValue, + write: write, + read: true, + }, + native: {}, }); - } catch (error) { - adapter.log.error("Cannot extract array " + path); - adapter.log.error(error); - } + adapter.setState(path + "." + subKey, subValue, true); + return; + } + extractKeys(adapter, path + "." + arrayPath, arrayElement, preferedArrayName, forceIndex); + }); + } catch (error) { + adapter.log.error("Cannot extract array " + path); + adapter.log.error(error); + } } module.exports = { - extractKeys, + extractKeys, }; diff --git a/lib/json2iob.js b/lib/json2iob.js deleted file mode 100644 index 90cc8be3..00000000 --- a/lib/json2iob.js +++ /dev/null @@ -1,321 +0,0 @@ -//v1.9 -/* -options: -write //set common write variable to true -forceIndex //instead of trying to find names for array entries, use the index as the name -channelName //set name of the root channel -preferedArrayName //set key to use this as an array entry name -preferedArrayDec //set key to use this as an array entry description -autoCast (true false) // make JSON.parse to parse numbers correctly -descriptions: Object of names for state keys -*/ -const JSONbig = require("json-bigint")({ storeAsString: true }); -module.exports = class Json2iob { - constructor(adapter) { - this.adapter = adapter; - this.alreadyCreatedObjects = {}; - } - - async parse(path, element, options) { - try { - if (element === null || element === undefined) { - this.adapter.log.debug("Cannot extract empty: " + path); - return; - } - - const objectKeys = Object.keys(element); - - if (!options || !options.write) { - if (!options) { - options = { write: false }; - } else { - options["write"] = false; - } - } - - if (typeof element === "string" || typeof element === "number") { - const lastPathElement = path.split(".").pop(); - - if (!this.alreadyCreatedObjects[path]) { - await this.adapter - .setObjectNotExistsAsync(path, { - type: "state", - common: { - name: lastPathElement, - role: this.getRole(element, options.write), - type: element !== null ? typeof element : "mixed", - write: options.write, - read: true, - }, - native: {}, - }) - .then(() => { - this.alreadyCreatedObjects[path] = true; - }) - .catch((error) => { - this.adapter.log.error(error); - }); - } - await this.adapter.setStateAsync(path, element, true); - - return; - } - if (!this.alreadyCreatedObjects[path]) { - let name = options.channelName || ""; - if (options.preferedArrayDesc && element[options.preferedArrayDesc]) { - name = element[options.preferedArrayDesc]; - } - await this.adapter - .setObjectNotExistsAsync(path, { - type: "channel", - common: { - name: name, - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.alreadyCreatedObjects[path] = true; - options.channelName = undefined; - }) - .catch((error) => { - this.adapter.log.error(error); - }); - } - if (Array.isArray(element)) { - await this.extractArray(element, "", path, options); - return; - } - - for (const key of objectKeys) { - if (this.isJsonString(element[key]) && options.autoCast) { - element[key] = JSONbig.parse(element[key]); - } - - if (Array.isArray(element[key])) { - await this.extractArray(element, key, path, options); - } else if (element[key] !== null && typeof element[key] === "object") { - await this.parse(path + "." + key, element[key], options); - } else { - const pathKey = key.replace(/\./g, "_"); - if (!this.alreadyCreatedObjects[path + "." + pathKey]) { - let objectName = key; - if (options.descriptions && options.descriptions[key]) { - objectName = options.descriptions[key]; - } - const type = element[key] !== null ? typeof element[key] : "mixed"; - const common = { - name: objectName, - role: this.getRole(element[key], options.write), - type: type, - write: options.write, - read: true, - }; - - await this.adapter - .setObjectNotExistsAsync(path + "." + pathKey, { - type: "state", - common: common, - native: {}, - }) - .then(() => { - this.alreadyCreatedObjects[path + "." + pathKey] = true; - }) - .catch((error) => { - this.adapter.log.error(error); - }); - } - await this.adapter.setStateAsync(path + "." + pathKey, element[key], true); - } - } - } catch (error) { - this.adapter.log.error("Error extract keys: " + path + " " + JSON.stringify(element)); - this.adapter.log.error(error); - } - } - async extractArray(element, key, path, options) { - try { - if (key) { - element = element[key]; - } - const lastTimestamp = Date.now(); - let pureStringArray = true; - for (let index in element) { - const arrayElement = element[index]; - const indexNr = parseInt(index) + 1; - if (indexNr < 10) { - index = "0" + index; - } - let arrayPath = key + index; - if (typeof arrayElement === "string" && key !== "") { - await this.parse(path + "." + key + "." + arrayElement, arrayElement, options); - continue; - } - pureStringArray = false; - if (!options.forceIndex) { - if (typeof arrayElement[Object.keys(arrayElement)[0]] === "string") { - arrayPath = arrayElement[Object.keys(arrayElement)[0]]; - } - for (const keyName of Object.keys(arrayElement)) { - if (keyName.endsWith("Id") && arrayElement[keyName] !== null) { - if (arrayElement[keyName] && arrayElement[keyName].replace) { - arrayPath = arrayElement[keyName].replace(/\./g, ""); - } else { - arrayPath = arrayElement[keyName]; - } - } - } - for (const keyName in Object.keys(arrayElement)) { - if (keyName.endsWith("Name")) { - if (arrayElement[keyName] && arrayElement[keyName].replace) { - arrayPath = arrayElement[keyName].replace(/\./g, ""); - } else { - arrayPath = arrayElement[keyName]; - } - } - } - - if (arrayElement.id) { - if (arrayElement.id.replace) { - arrayPath = arrayElement.id.replace(/\./g, ""); - } else { - arrayPath = arrayElement.id; - } - } - if (arrayElement.name) { - arrayPath = arrayElement.name.replace(/\./g, ""); - } - if (arrayElement.label) { - arrayPath = arrayElement.label.replace(/\./g, ""); - } - if (arrayElement.labelText) { - arrayPath = arrayElement.labelText.replace(/\./g, ""); - } - if (arrayElement.start_date_time) { - arrayPath = arrayElement.start_date_time.replace(/\./g, ""); - } - if (options.preferedArrayName && options.preferedArrayName.indexOf("+") !== -1) { - const preferedArrayNameArray = options.preferedArrayName.split("+"); - if (arrayElement[preferedArrayNameArray[0]]) { - const element0 = arrayElement[preferedArrayNameArray[0]].replace(/\./g, "").replace(/ /g, ""); - let element1 = ""; - if (preferedArrayNameArray[1].indexOf("/") !== -1) { - const subArray = preferedArrayNameArray[1].split("/"); - const subElement = arrayElement[subArray[0]]; - if (subElement && subElement[subArray[1]] !== undefined) { - element1 = subElement[subArray[1]]; - } else if (arrayElement[subArray[1]] !== undefined) { - element1 = arrayElement[subArray[1]]; - } - } else { - element1 = arrayElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); - } - arrayPath = element0 + "-" + element1; - } - } else if (options.preferedArrayName && options.preferedArrayName.indexOf("/") !== -1) { - const preferedArrayNameArray = options.preferedArrayName.split("/"); - const subElement = arrayElement[preferedArrayNameArray[0]]; - if (subElement) { - arrayPath = subElement[preferedArrayNameArray[1]].replace(/\./g, "").replace(/ /g, ""); - } - } else if (options.preferedArrayName && arrayElement[options.preferedArrayName]) { - arrayPath = arrayElement[options.preferedArrayName].toString().replace(/\./g, ""); - } - //special case array with 2 string objects - if ( - Object.keys(arrayElement).length === 2 && - typeof Object.keys(arrayElement)[0] === "string" && - typeof Object.keys(arrayElement)[1] === "string" && - typeof arrayElement[Object.keys(arrayElement)[0]] !== "object" && - typeof arrayElement[Object.keys(arrayElement)[1]] !== "object" && - arrayElement[Object.keys(arrayElement)[0]] !== "null" - ) { - let subKey = arrayElement[Object.keys(arrayElement)[0]]; - const subValue = arrayElement[Object.keys(arrayElement)[1]]; - const subName = Object.keys(arrayElement)[0] + " " + Object.keys(arrayElement)[1]; - if (key) { - subKey = key + "." + subKey; - } - if (!this.alreadyCreatedObjects[path + "." + subKey]) { - await this.adapter - .setObjectNotExistsAsync(path + "." + subKey, { - type: "state", - common: { - name: subName, - role: this.getRole(subValue, options.write), - type: subValue !== null ? typeof subValue : "mixed", - write: options.write, - read: true, - }, - native: {}, - }) - .then(() => { - this.alreadyCreatedObjects[path + "." + subKey] = true; - }); - } - await this.adapter.setStateAsync(path + "." + subKey, subValue, true); - continue; - } - } - let newPath; - if (key !== "") { - newPath = path + "." + key; - } else { - newPath = path; - } - await this.parse(newPath + "." + arrayPath, arrayElement, options); - } - if (pureStringArray == true) { - this.setOtherStatesInChannelNull(path + "." + key, lastTimestamp); - } - } catch (error) { - this.adapter.log.error("Cannot extract array " + path); - this.adapter.log.error(error); - } - } - - isJsonString(str) { - try { - JSON.parse(str); - } catch (e) { - return false; - } - return true; - } - getRole(element, write) { - if (typeof element === "boolean" && !write) { - return "indicator"; - } - if (typeof element === "boolean" && write) { - return "switch"; - } - if (typeof element === "number" && !write) { - return "value"; - } - if (typeof element === "number" && write) { - return "level"; - } - if (typeof element === "string") { - return "text"; - } - return "state"; - } - - /** - * Read all states of channel and empty all state with older timestamp than ts. - * If only some of the state of a channel get updated (e.g. because not all values are contained - * in some json reply), this make it possible than all other state are emptied. - * @param {*} channel - * @param {*} ts - */ - async setOtherStatesInChannelNull(channel, ts) { - const states = await this.adapter.getStatesAsync(channel + ".*"); - const allIds = Object.keys(states); - for (const keyName of allIds) { - if (states[keyName] && states[keyName].ts < ts) { - await this.adapter.setStateAsync(keyName, null, true); - } - } - } -}; diff --git a/lib/tools.js b/lib/tools.js index 8df52135..c12f1498 100644 --- a/lib/tools.js +++ b/lib/tools.js @@ -6,11 +6,11 @@ const axios = require("axios"); * @returns {it is Record} */ function isObject(it) { - // This is necessary because: - // typeof null === 'object' - // typeof [] === 'object' - // [] instanceof Object === true - return Object.prototype.toString.call(it) === "[object Object]"; + // This is necessary because: + // typeof null === 'object' + // typeof [] === 'object' + // [] instanceof Object === true + return Object.prototype.toString.call(it) === "[object Object]"; } /** @@ -19,8 +19,8 @@ function isObject(it) { * @returns {it is any[]} */ function isArray(it) { - if (typeof Array.isArray === "function") return Array.isArray(it); - return Object.prototype.toString.call(it) === "[object Array]"; + if (typeof Array.isArray === "function") return Array.isArray(it); + return Object.prototype.toString.call(it) === "[object Array]"; } /** @@ -31,14 +31,14 @@ function isArray(it) { * @returns {Promise} */ async function translateText(text, targetLang, yandexApiKey) { - if (targetLang === "en") { - return text; - } - if (yandexApiKey) { - return await translateYandex(text, targetLang, yandexApiKey); - } else { - return await translateGoogle(text, targetLang); - } + if (targetLang === "en") { + return text; + } + if (yandexApiKey) { + return await translateYandex(text, targetLang, yandexApiKey); + } else { + return await translateGoogle(text, targetLang); + } } /** @@ -49,19 +49,19 @@ async function translateText(text, targetLang, yandexApiKey) { * @returns {Promise} */ async function translateYandex(text, targetLang, apiKey) { - if (targetLang === "zh-cn") { - targetLang = "zh"; - } - try { - const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${apiKey}&text=${encodeURIComponent(text)}&lang=en-${targetLang}`; - const response = await axios({url, timeout: 15000}); - if (response.data && response.data["text"]) { - return response.data["text"][0]; - } - throw new Error("Invalid response for translate request"); - } catch (e) { - throw new Error(`Could not translate to "${targetLang}": ${e}`); - } + if (targetLang === "zh-cn") { + targetLang = "zh"; + } + try { + const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${apiKey}&text=${encodeURIComponent(text)}&lang=en-${targetLang}`; + const response = await axios({url, timeout: 15000}); + if (response.data && response.data["text"]) { + return response.data["text"][0]; + } + throw new Error("Invalid response for translate request"); + } catch (e) { + throw new Error(`Could not translate to "${targetLang}": ${e}`); + } } /** @@ -71,21 +71,21 @@ async function translateYandex(text, targetLang, apiKey) { * @returns {Promise} */ async function translateGoogle(text, targetLang) { - try { - const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`; - const response = await axios({url, timeout: 15000}); - if (isArray(response.data)) { - // we got a valid response - return response.data[0][0][0]; - } - throw new Error("Invalid response for translate request"); - } catch (e) { - throw new Error(`Could not translate to "${targetLang}": ${e}`); - } + try { + const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`; + const response = await axios({url, timeout: 15000}); + if (isArray(response.data)) { + // we got a valid response + return response.data[0][0][0]; + } + throw new Error("Invalid response for translate request"); + } catch (e) { + throw new Error(`Could not translate to "${targetLang}": ${e}`); + } } module.exports = { - isArray, - isObject, - translateText + isArray, + isObject, + translateText }; diff --git a/main.js b/main.js index 83eb5b4e..4ee743a9 100644 --- a/main.js +++ b/main.js @@ -455,6 +455,7 @@ class VwWeconnect extends utils.Adapter { } login() { + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { const nonce = this.getNonce(); const state = uuidv4(); @@ -659,6 +660,8 @@ class VwWeconnect extends utils.Adapter { ); this.log.warn("Bitte in die App einloggen und die Nutzungsbedingungen akzeptieren."); this.log.warn("https://" + resp.request.host + resp.headers.location); + this.log.warn("For Skoda: https://skodaid.vwgroup.io/landing-page"); + this.log.warn("For VW: https://vwid.vwgroup.io/landing-page"); this.log.warn("Try to auto accept new consent"); request.get( @@ -1108,6 +1111,7 @@ class VwWeconnect extends utils.Adapter { return; } if (this.config.type === "audi") { + this.getVWToken({}, jwtid_token, reject, resolve); return; } @@ -2713,6 +2717,7 @@ class VwWeconnect extends utils.Adapter { }); } getIdStatus(vin) { + return new Promise(async (resolve, reject) => { await axios({ method: "get", @@ -3101,6 +3106,7 @@ class VwWeconnect extends utils.Adapter { }); } async getSeatCupraStatus(vin) { + return new Promise(async (resolve, reject) => { request.get( { @@ -3523,6 +3529,7 @@ class VwWeconnect extends utils.Adapter { } setSkodaESettings(vin, action, value, bodyContent) { + return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; let body = bodyContent || {}; @@ -3942,6 +3949,7 @@ class VwWeconnect extends utils.Adapter { //Home } genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { + return new Promise(async (resolve, reject) => { header["If-None-Match"] = this.etags[url] || ""; request.get( @@ -4024,6 +4032,7 @@ class VwWeconnect extends utils.Adapter { }); } setIdRemote(vin, action, value, bodyContent) { + return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; let body = bodyContent || { spin: this.config.pin }; @@ -5299,6 +5308,7 @@ class VwWeconnect extends utils.Adapter { new URL(s); return true; } catch (err) { + this.log.debug(err); return false; } } @@ -5360,6 +5370,7 @@ class VwWeconnect extends utils.Adapter { clearTimeout(this.refreshTimeout); callback(); } catch (e) { + this.log.error(e); callback(); } } diff --git a/package-lock.json b/package-lock.json index 8b4cd3fd..61f260e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,27 +9,30 @@ "version": "0.6.1", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^3.2.1", + "@iobroker/adapter-core": "^3.2.3", "@peculiar/webcrypto": "^1.5.0", - "axios": "^1.7.7", + "axios": "^1.7.9", "json-bigint": "^1.0.0", - "json2iob": "^2.6.12", + "json2iob": "^2.6.17", "ngeohash": "^0.6.3", - "qs": "^6.13.0", + "qs": "^6.14.0", "request": "^2.88.2", - "traverse": "^0.6.10", - "uuid": "^9.0.1" + "traverse": "^0.6.11", + "uuid": "^11.1.0" }, "devDependencies": { "@alcalzone/release-script": "^3.8.0", "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@iobroker/testing": "^4.1.3", - "@types/node": "^20.16.10", - "eslint": "^8.57.1", - "eslint-plugin-promise": "^6.6.0", - "typescript": "~5.6.2" + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.20.0", + "@iobroker/testing": "^5.0.3", + "@types/node": "^22.13.4", + "eslint": "^9.20.1", + "eslint-plugin-promise": "^7.2.1", + "globals": "^16.0.0", + "typescript": "~5.7.3" }, "engines": { "node": ">=10.0.0" @@ -234,47 +237,6 @@ "node": ">=12.20" } }, - "node_modules/@alcalzone/release-script/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@alcalzone/release-script/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "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.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@alcalzone/release-script/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "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", @@ -291,24 +253,54 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", - "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", + "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -316,34 +308,95 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", + "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", "dev": true, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array": { - "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", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.6.tgz", + "integrity": "sha512-+0TjwR1eAUdZtvv/ir1mGX+v0tUoR3VEPB8Up0LLJC+whRW0GgBBtpbOkg/a/U4Dxa6l5a3l9AJ1aWIQVyoWJA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.11.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -359,78 +412,72 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "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==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true + "node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@iobroker/adapter-core": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.1.tgz", - "integrity": "sha512-sUvNZV5sUvg8TcucJ+CLDYgZ0sSivQEmkIaJQHNPU8yUBzOU//ECCc55gz+B2BVvgeGIN3fnmlCS9hOu7yOulw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.3.tgz", + "integrity": "sha512-ktk2KGexzOAbUZpkv/9JATJvO2DUHIfQAWhtpRjLxcR3+hs5/73hvt46XPSqwSpY/wnw5+E7kM7BqkfN7G19IQ==", + "license": "MIT", "engines": { "node": ">=16" }, "peerDependencies": { - "@iobroker/types": "^6.0.11" + "@iobroker/types": ">=6.0.11" } }, "node_modules/@iobroker/testing": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.3.tgz", - "integrity": "sha512-PTfvlXQBXDJVX35bkJxzgjuMX6bEjUmB4Dy8+bWLqbOgyq1JQVrRn+ah5IB7hEf+4lP8wD0MpAjXFJTv3zfTvA==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-5.0.3.tgz", + "integrity": "sha512-vPEtxVzOFTcgNKGGsInzV5Q61OHuKst7iJWN7vnr5jETk1l5W4lRnSI/AoiaSO34vINknyyOiXm7ZRcDjoy7ag==", "dev": true, + "license": "MIT", "dependencies": { - "alcalzone-shared": "~4.0.3", - "chai": "^4.3.7", - "chai-as-promised": "^7.1.1", - "debug": "^4.3.4", - "fs-extra": "^10.1.0", - "mocha": "^10.2.0", - "sinon": "^15.0.1", + "alcalzone-shared": "~5.0.0", + "chai": "^4.5.0", + "chai-as-promised": "^7.1.2", + "debug": "^4.4.0", + "fs-extra": "^11.3.0", + "mocha": "^11.0.1", + "sinon": "^19.0.2", "sinon-chai": "^3.7.0" } }, - "node_modules/@iobroker/testing/node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "node_modules/@iobroker/testing/node_modules/alcalzone-shared": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-5.0.0.tgz", + "integrity": "sha512-X73hgVWcrIKUUB6jZgHj5flRbTft8AAoJ2MqRKEcAX1whW3OeGkxsQ6ol4nd4/rKxd1eoCRXUGW3cIhXrXU4Sg==", "dev": true, + "license": "MIT", "engines": { - "node": ">=0.3.1" + "node": ">=18" } }, - "node_modules/@iobroker/testing/node_modules/sinon": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", - "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", - "deprecated": "16.1.1", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^10.3.0", - "@sinonjs/samsam": "^8.0.0", - "diff": "^5.1.0", - "nise": "^5.1.4", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/@iobroker/testing/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==", + "node_modules/@iobroker/testing/node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=14.14" } }, "node_modules/@iobroker/types": { @@ -442,39 +489,76 @@ "node": ">=12.0.0" } }, - "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==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": ">= 8" + "node": ">=12" } }, - "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==", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, + "license": "MIT", "engines": { - "node": ">= 8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "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==", + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">= 8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/@peculiar/asn1-schema": { @@ -513,75 +597,101 @@ "node": ">=10.12.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, + "node_modules/@sinonjs/commons/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", + "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@sinonjs/commons": "^3.0.1" } }, "node_modules/@sinonjs/samsam": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", - "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz", + "integrity": "sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^2.0.0", + "@sinonjs/commons": "^3.0.1", "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" } }, - "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", + "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } + "license": "(Unlicense OR Apache-2.0)" }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", - "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", - "dev": true + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/json-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { - "version": "20.16.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz", - "integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==", + "version": "22.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", + "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.20.0" } }, - "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/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -626,10 +736,11 @@ } }, "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==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -659,10 +770,11 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -678,12 +790,13 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -693,18 +806,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -751,6 +864,15 @@ "node": "*" } }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -760,6 +882,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" }, @@ -784,9 +907,10 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -829,12 +953,16 @@ } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { @@ -848,12 +976,13 @@ } }, "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==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -863,7 +992,8 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/buffer-from": { "version": "1.1.2", @@ -872,15 +1002,44 @@ "dev": true }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "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.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -903,6 +1062,7 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -916,10 +1076,11 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -927,22 +1088,23 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" } }, "node_modules/chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", "dev": true, + "license": "WTFPL", "dependencies": { "check-error": "^1.0.2" }, "peerDependencies": { - "chai": ">= 2.1.2 < 5" + "chai": ">= 2.1.2 < 6" } }, "node_modules/chalk": { @@ -986,16 +1148,11 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1008,19 +1165,44 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "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==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/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, + "license": "MIT", + "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/color-convert": { @@ -1064,10 +1246,11 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "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==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1089,13 +1272,14 @@ } }, "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -1105,27 +1289,29 @@ } }, "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/inspect-js" } }, "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" }, @@ -1137,12 +1323,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1158,6 +1345,7 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1187,6 +1375,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1203,6 +1392,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -1224,26 +1414,36 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, + "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": { - "esutils": "^2.0.2" + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" }, "engines": { - "node": ">=6.0.0" + "node": ">= 0.4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1273,56 +1473,62 @@ } }, "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", + "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" }, "engines": { "node": ">= 0.4" @@ -1332,12 +1538,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "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" } @@ -1346,14 +1550,16 @@ "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.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "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" }, @@ -1362,26 +1568,29 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "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==", + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "license": "MIT", "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" }, "engines": { "node": ">= 0.4" @@ -1412,67 +1621,76 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "version": "9.20.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", + "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", "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.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.11.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.20.0", + "@eslint/plugin-kit": "^0.2.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "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.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-plugin-promise": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz", - "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz", + "integrity": "sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==", "dev": true, + "license": "ISC", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1482,16 +1700,17 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1509,6 +1728,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -1522,27 +1754,42 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1555,6 +1802,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1567,6 +1815,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -1576,6 +1825,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -1632,32 +1882,25 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "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", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.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==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1686,28 +1929,31 @@ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, + "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" }, "node_modules/follow-redirects": { "version": "1.15.6", @@ -1729,11 +1975,48 @@ } }, "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", "dependencies": { - "is-callable": "^1.1.3" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/forever-agent": { @@ -1768,21 +2051,16 @@ "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": ">=12" + } }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -1795,19 +2073,23 @@ "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/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -1820,6 +2102,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1843,15 +2126,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -1860,6 +2149,19 @@ "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", @@ -1873,13 +2175,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -1897,20 +2200,21 @@ } }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, + "license": "ISC", "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" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": "*" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -1921,6 +2225,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -1928,27 +2233,53 @@ "node": ">= 6" } }, - "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { - "type-fest": "^0.20.2" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", + "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "license": "MIT", "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -1970,11 +2301,12 @@ "dev": true }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "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" @@ -1986,12 +2318,6 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, - "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/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2014,9 +2340,13 @@ } }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2034,6 +2364,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -2042,9 +2373,13 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2053,9 +2388,10 @@ } }, "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==", + "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" }, @@ -2067,6 +2403,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -2081,6 +2418,7 @@ "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" }, @@ -2093,6 +2431,7 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, + "license": "MIT", "bin": { "he": "bin/he" } @@ -2154,42 +2493,48 @@ "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.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2199,11 +2544,15 @@ } }, "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "license": "MIT", "dependencies": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2214,6 +2563,7 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -2222,12 +2572,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2240,6 +2591,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2248,10 +2600,13 @@ } }, "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "license": "MIT", "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", "is-typed-array": "^1.1.13" }, "engines": { @@ -2262,11 +2617,13 @@ } }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2284,6 +2641,21 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "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", @@ -2293,6 +2665,24 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2305,10 +2695,11 @@ "node": ">=0.10.0" } }, - "node_modules/is-negative-zero": { + "node_modules/is-map": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2321,16 +2712,19 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2339,31 +2733,26 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -2372,12 +2761,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -2399,11 +2801,13 @@ } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2413,11 +2817,14 @@ } }, "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2427,11 +2834,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -2450,6 +2858,7 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -2457,22 +2866,48 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/isexe": { "version": "2.0.0", @@ -2485,6 +2920,22 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2510,6 +2961,13 @@ "bignumber.js": "^9.0.0" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -2532,9 +2990,10 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json2iob": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.12.tgz", - "integrity": "sha512-cLlZbhPU5rTrfBljz5qhWER1vsTUTidccPz/uMHPdgyTIUy1hMA24m8mVJnmSLrocpsOfSJ827O7+B65k710HA==", + "version": "2.6.17", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.17.tgz", + "integrity": "sha512-6TUZaIgNyrQ+NvfMXu3i3JanjWtps0AHNFWJmx2LsC/2q1Zxfw9RS+D363fx5rL4v1FXBREaLWQ/dGWnaQ7MFg==", + "license": "MIT", "dependencies": { "@types/json-bigint": "^1.0.4", "json-bigint": "^1.0.0" @@ -2570,10 +3029,21 @@ } }, "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } }, "node_modules/levn": { "version": "0.4.1", @@ -2607,7 +3077,9 @@ "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true + "deprecated": "This package is deprecated. Use the optional chaining (?.) operator instead.", + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", @@ -2620,6 +3092,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -2652,6 +3125,15 @@ "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/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -2698,44 +3180,50 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.1.0.tgz", + "integrity": "sha512-8uJR5RTC2NgpY3GrYcgpZrsEd9zKbPDpob1RezyR2upGHRQtHWofmzTMzTMSV6dru3tj5Ukt0+Vnq1qhFEEwAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^10.4.5", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/mocha/node_modules/brace-expansion": { @@ -2743,15 +3231,17 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2759,29 +3249,12 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { + "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==", - "dev": true - }, - "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/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -2798,25 +3271,17 @@ } }, "node_modules/nise": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.5.tgz", - "integrity": "sha512-VJuPIfUFaXNRzETTQEEItTOP8Y171ijr+JLq42wHes3DiryR8vT+1TXQW/Rx8JNUhyYYWyIvjXTU6dOhJcs9Nw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^10.0.2", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node_modules/nise/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", + "integrity": "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "type-detect": "4.0.8" + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^13.0.1", + "@sinonjs/text-encoding": "^0.7.3", + "just-extend": "^6.2.0", + "path-to-regexp": "^8.1.0" } }, "node_modules/normalize-path": { @@ -2824,6 +3289,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2849,9 +3315,13 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "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" } @@ -2860,18 +3330,22 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -2881,15 +3355,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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", @@ -2922,6 +3387,23 @@ "node": ">= 0.8.0" } }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2952,6 +3434,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2973,15 +3462,6 @@ "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", - "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", @@ -2991,13 +3471,38 @@ "node": ">=8" } }, - "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "isarray": "0.0.1" + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/path-to-regexp": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" } }, "node_modules/pathval": { @@ -3025,6 +3530,7 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -3033,9 +3539,10 @@ } }, "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -3084,11 +3591,12 @@ } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -3097,31 +3605,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -3131,6 +3620,7 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -3138,15 +3628,40 @@ "node": ">=8.10.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -3221,62 +3736,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", - "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/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-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -3289,7 +3758,8 @@ "node_modules/safe-array-concat/node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" }, "node_modules/safe-buffer": { "version": "5.2.1", @@ -3310,14 +3780,37 @@ } ] }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "is-regex": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -3347,10 +3840,11 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -3359,6 +3853,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -3375,6 +3870,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -3385,6 +3881,20 @@ "node": ">= 0.4" } }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3407,14 +3917,69 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "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": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "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": { + "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" @@ -3430,17 +3995,17 @@ "dev": true }, "node_modules/sinon": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", - "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-19.0.2.tgz", + "integrity": "sha512-euuToqM+PjO4UgXeLETsfQiuoyPXlqFezr6YZDFwHR3t4qaX0fZUe1MfPMznTL5f8BWrVS89KduLdMUsxFCO6g==", "dev": true, - "peer": true, + "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^11.2.2", - "@sinonjs/samsam": "^8.0.0", - "diff": "^5.1.0", - "nise": "^5.1.5", + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^13.0.2", + "@sinonjs/samsam": "^8.0.1", + "diff": "^7.0.0", + "nise": "^6.1.1", "supports-color": "^7.2.0" }, "funding": { @@ -3458,22 +4023,12 @@ "sinon": ">=4.0.0" } }, - "node_modules/sinon/node_modules/@sinonjs/fake-timers": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", - "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", - "dev": true, - "peer": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, "node_modules/sinon/node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", "dev": true, - "peer": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -3483,7 +4038,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -3548,15 +4102,35 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "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, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -3566,14 +4140,19 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3582,6 +4161,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -3606,6 +4186,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "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, + "license": "MIT", + "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", @@ -3632,6 +4226,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -3642,12 +4237,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "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", @@ -3663,6 +4252,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -3683,13 +4273,14 @@ } }, "node_modules/traverse": { - "version": "0.6.10", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.10.tgz", - "integrity": "sha512-hN4uFRxbK+PX56DxYiGHsTn2dME3TVr9vbNqlQGcGcPhJAn+tdP126iA+TArMpI4YSgnTkMWyoLl5bf81Hi5TA==", + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.11.tgz", + "integrity": "sha512-vxXDZg8/+p3gblxB6BhhG5yWVn1kGRlaL8O78UDXc3wRnPizB5g83dcvWV1jpDMIPnjZjOFuxlMmE82XJ4407w==", + "license": "MIT", "dependencies": { - "gopd": "^1.0.1", - "typedarray.prototype.slice": "^1.0.3", - "which-typed-array": "^1.1.15" + "gopd": "^1.2.0", + "typedarray.prototype.slice": "^1.0.5", + "which-typed-array": "^1.1.18" }, "engines": { "node": ">= 0.4" @@ -3732,49 +4323,40 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, - "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/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -3784,16 +4366,18 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -3803,16 +4387,17 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-proto": "^1.0.3", "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" }, "engines": { "node": ">= 0.4" @@ -3822,16 +4407,19 @@ } }, "node_modules/typedarray.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.3.tgz", - "integrity": "sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.5.tgz", + "integrity": "sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", + "es-abstract": "^1.23.9", "es-errors": "^1.3.0", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-offset": "^1.0.2" + "get-proto": "^1.0.1", + "math-intrinsics": "^1.1.0", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-offset": "^1.0.4" }, "engines": { "node": ">= 0.4" @@ -3841,10 +4429,11 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3854,24 +4443,29 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" }, "node_modules/universalify": { "version": "2.0.0", @@ -3891,15 +4485,16 @@ } }, "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "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/verror": { @@ -3943,29 +4538,86 @@ } }, "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "license": "MIT", "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", + "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { @@ -3976,16 +4628,37 @@ } }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "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, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -3998,11 +4671,72 @@ "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/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } }, "node_modules/y18n": { "version": "5.0.8", @@ -4020,30 +4754,32 @@ "dev": true }, "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "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.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, + "license": "ISC", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-unparser": { @@ -4051,6 +4787,7 @@ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, + "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -4133,40 +4870,6 @@ "semver": "^7.5.2", "source-map-support": "^0.5.21", "yargs": "^17.4.1" - }, - "dependencies": { - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "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.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - } } }, "@alcalzone/release-script-core": { @@ -4278,43 +4981,100 @@ } }, "@eslint-community/regexpp": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", - "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true }, + "@eslint/config-array": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "dev": true, + "requires": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + } + }, + "@eslint/core": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", + "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.15" + } + }, "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true + } } }, "@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", + "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", + "dev": true + }, + "@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", "dev": true }, - "@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "@eslint/plugin-kit": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.6.tgz", + "integrity": "sha512-+0TjwR1eAUdZtvv/ir1mGX+v0tUoR3VEPB8Up0LLJC+whRW0GgBBtpbOkg/a/U4Dxa6l5a3l9AJ1aWIQVyoWJA==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.11.0", + "levn": "^0.4.1" + } + }, + "@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true + }, + "@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "requires": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "dependencies": { + "@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true + } } }, "@humanwhocodes/module-importer": { @@ -4323,61 +5083,49 @@ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, - "@humanwhocodes/object-schema": { - "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==", + "@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", "dev": true }, "@iobroker/adapter-core": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.1.tgz", - "integrity": "sha512-sUvNZV5sUvg8TcucJ+CLDYgZ0sSivQEmkIaJQHNPU8yUBzOU//ECCc55gz+B2BVvgeGIN3fnmlCS9hOu7yOulw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.3.tgz", + "integrity": "sha512-ktk2KGexzOAbUZpkv/9JATJvO2DUHIfQAWhtpRjLxcR3+hs5/73hvt46XPSqwSpY/wnw5+E7kM7BqkfN7G19IQ==", "requires": {} }, "@iobroker/testing": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.3.tgz", - "integrity": "sha512-PTfvlXQBXDJVX35bkJxzgjuMX6bEjUmB4Dy8+bWLqbOgyq1JQVrRn+ah5IB7hEf+4lP8wD0MpAjXFJTv3zfTvA==", - "dev": true, - "requires": { - "alcalzone-shared": "~4.0.3", - "chai": "^4.3.7", - "chai-as-promised": "^7.1.1", - "debug": "^4.3.4", - "fs-extra": "^10.1.0", - "mocha": "^10.2.0", - "sinon": "^15.0.1", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-5.0.3.tgz", + "integrity": "sha512-vPEtxVzOFTcgNKGGsInzV5Q61OHuKst7iJWN7vnr5jETk1l5W4lRnSI/AoiaSO34vINknyyOiXm7ZRcDjoy7ag==", + "dev": true, + "requires": { + "alcalzone-shared": "~5.0.0", + "chai": "^4.5.0", + "chai-as-promised": "^7.1.2", + "debug": "^4.4.0", + "fs-extra": "^11.3.0", + "mocha": "^11.0.1", + "sinon": "^19.0.2", "sinon-chai": "^3.7.0" }, "dependencies": { - "diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "alcalzone-shared": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-5.0.0.tgz", + "integrity": "sha512-X73hgVWcrIKUUB6jZgHj5flRbTft8AAoJ2MqRKEcAX1whW3OeGkxsQ6ol4nd4/rKxd1eoCRXUGW3cIhXrXU4Sg==", "dev": true }, - "sinon": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz", - "integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^10.3.0", - "@sinonjs/samsam": "^8.0.0", - "diff": "^5.1.0", - "nise": "^5.1.4", - "supports-color": "^7.2.0" - } - }, - "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==", + "fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } } } @@ -4388,30 +5136,52 @@ "integrity": "sha512-RNDURjtL5Cm9wt6ocCqdRi86Qx1350zBIvvrJ9+Fjgasoi6cWCdoOghkwEeb95TH2j//q/uLqWwL8SZ0vxx6Kw==", "peer": 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==", + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } } }, "@peculiar/asn1-schema": { @@ -4444,50 +5214,60 @@ "webcrypto-core": "^1.8.0" } }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, "@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "requires": { "type-detect": "4.0.8" + }, + "dependencies": { + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + } } }, "@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", + "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", "dev": true, "requires": { - "@sinonjs/commons": "^3.0.0" + "@sinonjs/commons": "^3.0.1" } }, "@sinonjs/samsam": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", - "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz", + "integrity": "sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==", "dev": true, "requires": { - "@sinonjs/commons": "^2.0.0", + "@sinonjs/commons": "^3.0.1", "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - } + "type-detect": "^4.1.0" } }, "@sinonjs/text-encoding": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", - "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", + "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", + "dev": true + }, + "@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, "@types/json-bigint": { @@ -4495,25 +5275,25 @@ "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "@types/node": { - "version": "20.16.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz", - "integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==", + "version": "22.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", + "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", "dev": true, "requires": { - "undici-types": "~6.19.2" + "undici-types": "~6.20.0" } }, - "@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 - }, "acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true }, "acorn-jsx": { @@ -4544,9 +5324,9 @@ } }, "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==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-regex": { @@ -4565,9 +5345,9 @@ } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -4581,27 +5361,26 @@ "dev": true }, "array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "requires": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" } }, "arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "requires": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" } }, "asn1": { @@ -4633,6 +5412,11 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, + "async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==" + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -4657,9 +5441,9 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "requires": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -4698,9 +5482,9 @@ "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" }, "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true }, "brace-expansion": { @@ -4714,12 +5498,12 @@ } }, "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==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-stdout": { @@ -4735,15 +5519,32 @@ "dev": true }, "call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "requires": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + } + }, + "call-bind-apply-helpers": { + "version": "1.0.2", + "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": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } + }, + "call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" } }, "callsites": { @@ -4764,9 +5565,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -4775,13 +5576,13 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" } }, "chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", "dev": true, "requires": { "check-error": "^1.0.2" @@ -4818,9 +5619,9 @@ } }, "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "requires": { "anymatch": "~3.1.2", @@ -4834,14 +5635,27 @@ } }, "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "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, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } } }, "color-convert": { @@ -4879,9 +5693,9 @@ "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==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -4898,42 +5712,42 @@ } }, "data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "requires": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" } }, "data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "requires": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" } }, "data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "requires": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "requires": { - "ms": "2.1.2" + "ms": "^2.1.3" } }, "decamelize": { @@ -4983,20 +5797,27 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, + "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": { - "esutils": "^2.0.2" + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -5023,65 +5844,67 @@ } }, "es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", "requires": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" } }, "es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "requires": { - "get-intrinsic": "^1.2.4" - } + "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", @@ -5089,31 +5912,32 @@ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" }, "es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "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" } }, "es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "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==", "requires": { - "get-intrinsic": "^1.2.4", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "hasown": "^2.0.2" } }, "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" } }, "escalade": { @@ -5129,51 +5953,53 @@ "dev": true }, "eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "version": "9.20.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", + "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", "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.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.11.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.20.0", + "@eslint/plugin-kit": "^0.2.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "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.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true + }, "glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -5186,16 +6012,18 @@ } }, "eslint-plugin-promise": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz", - "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz", + "integrity": "sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==", "dev": true, - "requires": {} + "requires": { + "@eslint-community/eslint-utils": "^4.4.0" + } }, "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -5209,20 +6037,28 @@ "dev": true }, "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "requires": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true + } } }, "esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -5292,28 +6128,19 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "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", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "requires": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" } }, "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==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -5336,19 +6163,19 @@ "dev": true }, "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" } }, "flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true }, "follow-redirects": { @@ -5357,11 +6184,29 @@ "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "requires": { + "is-callable": "^1.2.7" + } + }, + "foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, "requires": { - "is-callable": "^1.1.3" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } } }, "forever-agent": { @@ -5390,16 +6235,10 @@ "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 - }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, @@ -5409,14 +6248,16 @@ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" } }, "functions-have-names": { @@ -5437,15 +6278,29 @@ "dev": true }, "get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.0", + "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": { @@ -5455,13 +6310,13 @@ "dev": true }, "get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "requires": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" } }, "getpass": { @@ -5473,17 +6328,37 @@ } }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "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" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "glob-parent": { @@ -5496,20 +6371,18 @@ } }, "globals": { - "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" - } + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", + "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", + "dev": true }, "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "requires": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" } }, "globalyzer": { @@ -5525,12 +6398,9 @@ "dev": true }, "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "requires": { - "get-intrinsic": "^1.1.3" - } + "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.9", @@ -5538,12 +6408,6 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -5559,9 +6423,9 @@ } }, "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==" }, "has-flag": { "version": "4.0.0", @@ -5578,14 +6442,17 @@ } }, "has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "requires": { + "dunder-proto": "^1.0.0" + } }, "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==" }, "has-tostringtag": { "version": "1.0.2", @@ -5647,47 +6514,44 @@ "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.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, "internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "requires": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" } }, "is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "requires": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + } + }, + "is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" } }, "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "requires": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" } }, "is-binary-path": { @@ -5700,12 +6564,12 @@ } }, "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" } }, "is-callable": { @@ -5714,19 +6578,22 @@ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" }, "is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "requires": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", "is-typed-array": "^1.1.13" } }, "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "requires": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" } }, "is-extglob": { @@ -5735,12 +6602,31 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "requires": { + "call-bound": "^1.0.3" + } + }, "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-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "requires": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -5750,10 +6636,10 @@ "is-extglob": "^2.1.1" } }, - "is-negative-zero": { + "is-map": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==" + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==" }, "is-number": { "version": "7.0.0", @@ -5762,19 +6648,14 @@ "dev": true }, "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "requires": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" } }, - "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": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -5782,20 +6663,27 @@ "dev": true }, "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" } }, + "is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==" + }, "is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "requires": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" } }, "is-stream": { @@ -5805,27 +6693,30 @@ "dev": true }, "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "requires": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" } }, "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "requires": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" } }, "is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "requires": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" } }, "is-typedarray": { @@ -5839,19 +6730,27 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==" + }, "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", "requires": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3" } }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true + "is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "requires": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + } }, "isexe": { "version": "2.0.0", @@ -5864,6 +6763,16 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -5886,6 +6795,12 @@ "bignumber.js": "^9.0.0" } }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -5908,9 +6823,9 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json2iob": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.12.tgz", - "integrity": "sha512-cLlZbhPU5rTrfBljz5qhWER1vsTUTidccPz/uMHPdgyTIUy1hMA24m8mVJnmSLrocpsOfSJ827O7+B65k710HA==", + "version": "2.6.17", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.17.tgz", + "integrity": "sha512-6TUZaIgNyrQ+NvfMXu3i3JanjWtps0AHNFWJmx2LsC/2q1Zxfw9RS+D363fx5rL4v1FXBREaLWQ/dGWnaQ7MFg==", "requires": { "@types/json-bigint": "^1.0.4", "json-bigint": "^1.0.0" @@ -5938,11 +6853,20 @@ } }, "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", "dev": true }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -6002,6 +6926,11 @@ "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==" + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -6036,33 +6965,38 @@ "brace-expansion": "^1.1.7" } }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + }, "mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.1.0.tgz", + "integrity": "sha512-8uJR5RTC2NgpY3GrYcgpZrsEd9zKbPDpob1RezyR2upGHRQtHWofmzTMzTMSV6dru3tj5Ukt0+Vnq1qhFEEwAg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^10.4.5", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "yargs-unparser": "^2.0.0" }, "dependencies": { "brace-expansion": { @@ -6075,32 +7009,20 @@ } }, "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true } } }, "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 - }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "natural-compare": { @@ -6115,27 +7037,16 @@ "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" }, "nise": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.5.tgz", - "integrity": "sha512-VJuPIfUFaXNRzETTQEEItTOP8Y171ijr+JLq42wHes3DiryR8vT+1TXQW/Rx8JNUhyYYWyIvjXTU6dOhJcs9Nw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", + "integrity": "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g==", "dev": true, "requires": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^10.0.2", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - } + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^13.0.1", + "@sinonjs/text-encoding": "^0.7.3", + "just-extend": "^6.2.0", + "path-to-regexp": "^8.1.0" } }, "normalize-path": { @@ -6159,9 +7070,9 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, "object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==" }, "object-keys": { "version": "1.1.1", @@ -6169,25 +7080,18 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "requires": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^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", @@ -6211,6 +7115,16 @@ "type-check": "^0.4.0" } }, + "own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "requires": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + } + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6229,6 +7143,12 @@ "p-limit": "^3.0.2" } }, + "package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6244,27 +7164,36 @@ "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", - "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", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "requires": { - "isarray": "0.0.1" + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + } } }, + "path-to-regexp": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "dev": true + }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -6289,9 +7218,9 @@ "dev": true }, "possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==" }, "prelude-ls": { "version": "1.2.1", @@ -6328,19 +7257,13 @@ "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" }, "qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "requires": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" } }, - "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 - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -6359,15 +7282,32 @@ "picomatch": "^2.2.1" } }, + "reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "requires": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + } + }, "regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "requires": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" } }, "request": { @@ -6421,38 +7361,15 @@ "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", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "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-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "requires": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "dependencies": { @@ -6468,14 +7385,30 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "requires": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + } + } + }, "safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "requires": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "is-regex": "^1.2.1" } }, "safer-buffer": { @@ -6493,9 +7426,9 @@ } }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -6525,6 +7458,16 @@ "has-property-descriptors": "^1.0.2" } }, + "set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "requires": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6541,14 +7484,47 @@ "dev": true }, "side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "requires": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "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": { + "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": { @@ -6558,43 +7534,30 @@ "dev": true }, "sinon": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", - "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-19.0.2.tgz", + "integrity": "sha512-euuToqM+PjO4UgXeLETsfQiuoyPXlqFezr6YZDFwHR3t4qaX0fZUe1MfPMznTL5f8BWrVS89KduLdMUsxFCO6g==", "dev": true, - "peer": true, "requires": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^11.2.2", - "@sinonjs/samsam": "^8.0.0", - "diff": "^5.1.0", - "nise": "^5.1.5", + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^13.0.2", + "@sinonjs/samsam": "^8.0.1", + "diff": "^7.0.0", + "nise": "^6.1.1", "supports-color": "^7.2.0" }, "dependencies": { - "@sinonjs/fake-timers": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", - "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", - "dev": true, - "peer": true, - "requires": { - "@sinonjs/commons": "^3.0.0" - } - }, "diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true, - "peer": true + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "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, - "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -6651,23 +7614,38 @@ "strip-ansi": "^6.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@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.1" + } + }, "string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "requires": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" } }, "string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "requires": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } @@ -6691,6 +7669,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@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.1" + } + }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -6712,12 +7699,6 @@ "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", @@ -6747,13 +7728,13 @@ } }, "traverse": { - "version": "0.6.10", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.10.tgz", - "integrity": "sha512-hN4uFRxbK+PX56DxYiGHsTn2dME3TVr9vbNqlQGcGcPhJAn+tdP126iA+TArMpI4YSgnTkMWyoLl5bf81Hi5TA==", + "version": "0.6.11", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.11.tgz", + "integrity": "sha512-vxXDZg8/+p3gblxB6BhhG5yWVn1kGRlaL8O78UDXc3wRnPizB5g83dcvWV1jpDMIPnjZjOFuxlMmE82XJ4407w==", "requires": { - "gopd": "^1.0.1", - "typedarray.prototype.slice": "^1.0.3", - "which-typed-array": "^1.1.15" + "gopd": "^1.2.0", + "typedarray.prototype.slice": "^1.0.5", + "which-typed-array": "^1.1.18" } }, "tslib": { @@ -6784,99 +7765,96 @@ } }, "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "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==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true }, "typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "requires": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" } }, "typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "requires": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" } }, "typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "requires": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" } }, "typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "requires": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-proto": "^1.0.3", "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" } }, "typedarray.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.3.tgz", - "integrity": "sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.5.tgz", + "integrity": "sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==", "requires": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", + "es-abstract": "^1.23.9", "es-errors": "^1.3.0", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-offset": "^1.0.2" + "get-proto": "^1.0.1", + "math-intrinsics": "^1.1.0", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-offset": "^1.0.4" } }, "typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true }, "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "requires": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" } }, "undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true }, "universalify": { @@ -6894,9 +7872,9 @@ } }, "uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + "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==" }, "verror": { "version": "1.10.0", @@ -6930,37 +7908,127 @@ } }, "which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "requires": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + } + }, + "which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "requires": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + } + } + }, + "which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" } }, "which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", "requires": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" } }, "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "wrap-ansi": { - "version": "7.0.0", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, @@ -6970,12 +8038,6 @@ "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 - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -6989,24 +8051,24 @@ "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.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "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.1.1" } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true }, "yargs-unparser": { diff --git a/package.json b/package.json index 490290c1..c546f595 100644 --- a/package.json +++ b/package.json @@ -18,16 +18,16 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^3.2.1", + "@iobroker/adapter-core": "^3.2.3", "@peculiar/webcrypto": "^1.5.0", - "axios": "^1.7.7", + "axios": "^1.7.9", "json-bigint": "^1.0.0", - "json2iob": "^2.6.12", + "json2iob": "^2.6.17", "ngeohash": "^0.6.3", - "qs": "^6.13.0", + "qs": "^6.14.0", "request": "^2.88.2", - "traverse": "^0.6.10", - "uuid": "^9.0.1" + "traverse": "^0.6.11", + "uuid": "^11.1.0" }, "deprecated": false, "description": "Adapter for VW Connect", @@ -36,11 +36,14 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@iobroker/testing": "^4.1.3", - "@types/node": "^20.16.10", - "eslint": "^8.57.1", - "eslint-plugin-promise": "^6.6.0", - "typescript": "~5.6.2" + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.20.0", + "@iobroker/testing": "^5.0.3", + "@types/node": "^22.13.4", + "eslint": "^9.20.1", + "eslint-plugin-promise": "^7.2.1", + "globals": "^16.0.0", + "typescript": "~5.7.3" }, "engines": { "node": ">=10.0.0" diff --git a/test/mocha.setup.js b/test/mocha.setup.js index b3b96311..b0c1d7b7 100644 --- a/test/mocha.setup.js +++ b/test/mocha.setup.js @@ -1,6 +1,6 @@ // Don't silently swallow unhandled rejections process.on("unhandledRejection", (e) => { - throw e; + throw e; }); // enable the should interface with sinon From 9e12cc8455659fe9603f64d015e671f2ddf43059 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 01:13:26 +0100 Subject: [PATCH 639/729] fix seat climate --- main.js | 68 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/main.js b/main.js index 2890acbe..803bc136 100644 --- a/main.js +++ b/main.js @@ -686,24 +686,21 @@ class VwWeconnect extends utils.Adapter { //check for empty form object if (Object.keys(form).length === 0 && form.constructor === Object) { try { - const stringJson = body - .split("window._IDK = ")[1] - .split(" { await axios({ method: "get", @@ -3109,7 +3104,6 @@ class VwWeconnect extends utils.Adapter { }); } async getSeatCupraStatus(vin) { - return new Promise(async (resolve, reject) => { request.get( { @@ -3327,16 +3321,37 @@ class VwWeconnect extends utils.Adapter { }); } setSeatCupraStatus(vin, action, state) { - return new Promise((resolve, reject) => { + return new Promise(async (resolve, reject) => { + const body = {}; + let url = "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state; + if (action === "climatisation" && state === "start") { + url = "https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/" + vin + "/climatisation/start"; + const pre = this.name + "." + this.instance; + const climateStates = await this.getStatesAsync(pre + "." + vin + ".status.climatisationSettings.*"); + + const allIds = Object.keys(climateStates); + allIds.forEach((keyName) => { + const key = keyName.split(".").splice(-1)[0]; + if (key.indexOf("Timestamp") === -1) { + body[key] = climateStates[keyName].val; + } + }); + if (body.targetTemperature_C) { + body.targetTemperature = body.targetTemperature_C; + body.targetTemperatureUnit = "celsius"; + } + // body = JSON.stringify(body); + } request.post( { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state, + url: url, headers: { accept: "*/*", "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }, + data: body, followAllRedirects: true, gzip: true, json: true, @@ -3532,7 +3547,6 @@ class VwWeconnect extends utils.Adapter { } setSkodaESettings(vin, action, value, bodyContent) { - return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; let body = bodyContent || {}; @@ -3952,7 +3966,6 @@ class VwWeconnect extends utils.Adapter { //Home } genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { - return new Promise(async (resolve, reject) => { header["If-None-Match"] = this.etags[url] || ""; request.get( @@ -4035,7 +4048,6 @@ class VwWeconnect extends utils.Adapter { }); } setIdRemote(vin, action, value, bodyContent) { - return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; let body = bodyContent || { spin: this.config.pin }; @@ -6369,4 +6381,4 @@ if (module.parent) { } else { // otherwise start the instance directly new VwWeconnect(); -} \ No newline at end of file +} From dca3784bcce6dd27a297c47c80ef174e2f75f186 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 08:48:13 +0100 Subject: [PATCH 640/729] fix linter --- main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.js b/main.js index 803bc136..7aa77551 100644 --- a/main.js +++ b/main.js @@ -1111,6 +1111,7 @@ class VwWeconnect extends utils.Adapter { return; } if (this.config.type === "audi") { + // eslint-disable-next-line this.getVWToken({}, jwtid_token, reject, resolve); return; } @@ -2716,6 +2717,7 @@ class VwWeconnect extends utils.Adapter { }); } getIdStatus(vin) { + //eslint-disable-next-line return new Promise(async (resolve, reject) => { await axios({ method: "get", @@ -3104,6 +3106,7 @@ class VwWeconnect extends utils.Adapter { }); } async getSeatCupraStatus(vin) { + //eslint-disable-next-line return new Promise(async (resolve, reject) => { request.get( { @@ -3321,6 +3324,7 @@ class VwWeconnect extends utils.Adapter { }); } setSeatCupraStatus(vin, action, state) { + //eslint-disable-next-line return new Promise(async (resolve, reject) => { const body = {}; let url = "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state; @@ -3547,6 +3551,7 @@ class VwWeconnect extends utils.Adapter { } setSkodaESettings(vin, action, value, bodyContent) { + //eslint-disable-next-line return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; let body = bodyContent || {}; @@ -3966,6 +3971,7 @@ class VwWeconnect extends utils.Adapter { //Home } genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { + //eslint-disable-next-line return new Promise(async (resolve, reject) => { header["If-None-Match"] = this.etags[url] || ""; request.get( @@ -4048,6 +4054,7 @@ class VwWeconnect extends utils.Adapter { }); } setIdRemote(vin, action, value, bodyContent) { + //eslint-disable-next-line return new Promise(async (resolve, reject) => { const pre = this.name + "." + this.instance; let body = bodyContent || { spin: this.config.pin }; From 7721ede817307ec3ab95f6069c9905e512638a55 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 09:42:44 +0100 Subject: [PATCH 641/729] change skoda api --- main.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 7aa77551..78ff9d27 100644 --- a/main.js +++ b/main.js @@ -146,13 +146,14 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "skodae") { this.type = "Skoda"; this.country = "CZ"; - this.clientId = "f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com"; + this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com"; this.xclientId = "afb0473b-6d82-42b8-bfea-cead338c46ef"; - this.scope = "openid mbb profile"; - this.redirect = "skodaconnect://oidc.login/"; + this.scope = + "address badge birthdate cars driversLicense dealers email mileage mbb nationalIdentifier openid phone profession profile vin"; + this.redirect = "myskoda%3A%2F%2Fredirect%2Flogin%2F"; this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code%20id_token%20token"; - this.xappversion = "3.2.6"; + this.responseType = "code id_token"; + this.xappversion = "8.0.0"; this.xappname = "cz.skodaauto.connect"; } if (this.config.type === "seat") { From 2b60140e81daec8c67378b8dcbe653102d5fd23b Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 15:19:19 +0100 Subject: [PATCH 642/729] fix skoda flow --- admin/index_m.html | 12 +- main.js | 341 +++++++++++++-------- package-lock.json | 717 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 4 files changed, 934 insertions(+), 137 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 5d8645e8..47f47682 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -83,17 +83,17 @@
diff --git a/main.js b/main.js index 78ff9d27..28a63e39 100644 --- a/main.js +++ b/main.js @@ -19,6 +19,8 @@ const geohash = require("ngeohash"); const { extractKeys } = require("./lib/extractKeys"); const axios = require("axios").default; const Json2iob = require("json2iob"); +const mqtt = require("mqtt"); +const uuid = require("uuid"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -38,7 +40,7 @@ class VwWeconnect extends utils.Adapter { this.json2iob = new Json2iob(this); this.jar = request.jar(); this.userAgent = "iobroker v"; - this.skodaUserAgent = "OneConnect/000000164 CFNetwork/1494.0.7 Darwin/23.4.0"; + this.skodaUserAgent = "MySkoda/Android/8.0.0/250203003"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -343,17 +345,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get audi data status Failed"); }); } else if (this.config.type === "skodae") { - this.clientId = "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com"; - this.scope = "openid dealers profile email cars address"; - this.redirect = "skodaconnect://oidc.login/"; - - this.login() - .then(() => { - this.getSkodaEStatus(vin); - }) - .catch(() => { - this.log.error("Failed second skoda login"); - }); + this.getSkodaEStatus(vin); } else { this.getHomeRegion(vin) .catch(() => { @@ -485,6 +477,7 @@ class VwWeconnect extends utils.Adapter { this.config.type === "vwv2" || this.config.type === "go" || this.config.type === "seatelli" || + this.config.type === "skodae" || this.config.type === "skodapower" || this.config.type === "audidata" || this.config.type === "audietron" || @@ -871,7 +864,12 @@ class VwWeconnect extends utils.Adapter { } async cleanObjects(vin) { //vw-connect.0.WVWZZZAUZL8908723.general.systemId - const remoteState = await this.getObjectAsync(vin + ".general.systemId"); + let remoteState = await this.getObjectAsync(vin + ".general.systemId"); + if (remoteState) { + this.log.info("clean old states" + vin); + await this.delObjectAsync(vin, { recursive: true }); + } + remoteState = await this.getObjectAsync(vin + ".general.capabilities"); if (remoteState) { this.log.info("clean old states" + vin); await this.delObjectAsync(vin, { recursive: true }); @@ -1195,13 +1193,17 @@ class VwWeconnect extends utils.Adapter { const parsedParameters = qs.parse(hash); // this.config.atoken = parsedParameters.access_token; let systemId = "TECHNICAL"; - if (this.clientId === "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com") { + if (this.clientId === "7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com") { systemId = "CONNECT"; } method = "POST"; - url = "https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId=" + systemId; + url = + "https://mysmob.api.connect.skoda-auto.cz/api/v1/authentication/exchange-authorization-code?tokenType=" + + systemId; body = JSON.stringify({ - authorizationCode: parsedParameters.code, + code: parsedParameters.code, + redirectUri: "myskoda://redirect/login/", + verifier: code_verifier, }); headers = { accept: "*/*", @@ -1391,7 +1393,7 @@ class VwWeconnect extends utils.Adapter { return; } - if (this.clientId != "7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com") { + if (this.clientId != "7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com") { this.secondAccessToken = tokens.accessToken; this.secondRefreshToken = tokens.refreshToken; } @@ -1646,11 +1648,29 @@ class VwWeconnect extends utils.Adapter { this.config.type === "audietron" || this.config.type === "id" || this.config.type === "seatelli" || - this.config.type === "skodapower" || - this.config.type === "skodae" + this.config.type === "skodapower" ) { return; } + if (this.config.type === "skodae") { + await axios({ + method: "get", + url: "https://mysmob.api.connect.skoda-auto.cz/api/v1/users", + headers: { + "User-Agent": this.skodaUserAgent, + Authorization: "Bearer " + this.config.atoken, + }, + }) + .then((response) => { + this.log.debug("get user data " + JSON.stringify(response.data)); + this.skodaUser = response.data.id; + }) + .catch((error) => { + this.log.error("get user data Failed"); + this.log.error(error); + }); + return; + } if (this.config.type === "seatcupra") { this.seatcupraUser = await axios({ method: "get", @@ -1857,7 +1877,8 @@ class VwWeconnect extends utils.Adapter { }; } if (this.config.type === "skodae" || this.config.type === "skoda") { - url = "https://api.connect.skoda-auto.cz/api/v4/garage"; + url = + "https://mysmob.api.connect.skoda-auto.cz/api/v2/garage?connectivityGenerations=MOD1&connectivityGenerations=MOD2&connectivityGenerations=MOD3&connectivityGenerations=MOD4"; // @ts-ignore headers = { accept: "application/json", @@ -2214,13 +2235,17 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "skodae" || this.config.type === "skoda") { this.log.info(`Found ${body.vehicles.length} vehicles`); - body.vehicles.forEach(async (element) => { + + for (const element of body.vehicles) { const vin = element.vin; + await this.cleanObjects(vin); + + const name = element.title + " " + element.licensePlate; this.vinArray.push(vin); - await this.setObjectNotExistsAsync(element.vin, { + await this.extendObject(element.vin, { type: "device", common: { - name: element.specification.title, + name: name, role: "indicator", type: "string", write: false, @@ -2233,7 +2258,17 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to extract"); this.log.error(error); }); - + await this.extendObject(vin + "mqtt", { + type: "channel", + common: { + name: "MQTT status", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); this.setObjectNotExists(vin + ".remote", { type: "state", common: { @@ -2262,6 +2297,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.targetTemperatureInCelsius", { type: "state", common: { @@ -2282,36 +2318,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.chargeMinLimit", { - type: "state", - common: { - name: "Set chargeMinLimit", - type: "number", - role: "number", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.climatisation", { - type: "state", - common: { - name: "Start/Stop Climatisation", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - this.setObjectNotExists(vin + ".remote.climatisationv2", { - type: "state", - common: { - name: "Start/Stop Climatisation v2", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); + this.setObjectNotExists(vin + ".remote.lock", { type: "state", common: { @@ -2322,19 +2329,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - - this.setObjectNotExists(vin + ".remote.lockv2", { - type: "state", - common: { - name: "Lock v2", - type: "boolean", - role: "switch", - write: true, - }, - native: {}, - }); - }); - + } + this.connectMqtt(); resolve(); return; } @@ -2717,6 +2713,108 @@ class VwWeconnect extends utils.Adapter { ); }); } + generateRandomToken(length) { + const bytes = crypto.randomBytes(Math.ceil((length * 3) / 4)); + let token = bytes.toString("base64"); + // Convert to URL-safe base64 format + token = token.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""); + return token.substring(0, length); + } + async connectMqtt() { + if (this.mqttClient) { + this.mqttClient.end(); + } + + const fixedUUID = ".I3f23ae47-2eb0-43d4-b2c9-aa35c7b8cd2c"; + this.mqttClient = mqtt.connect("mqtts://mqtt.messagehub.de:8883", { + username: "android-app", + password: this.config.atoken, + clientId: `${fixedUUID}#${uuid.v4()}.$${this.skodaUser}`, + }); + this.mqttClient.on("connect", () => { + this.log.info("Connected to MQTT"); + for (const vin of this.vinArray) { + this.log.info("Connect to MQTT for " + vin); + + this.mqttClient.subscribe(`${this.skodaUser}/${vin}/#`, (err) => { + err && this.log.error(err); + }); + } + }); + this.mqttClient.on("message", (topic, message) => { + /*Examples: + { + "version": 1, + "operation": "stop-air-conditioning", + "status": "IN_PROGRESS", + "traceId": "e063a0da2c324315b8f04477340dd4b1", + "requestId": "df538725-66ff-4644-9a5d-7f3eac8838fb" +} + { + "version": 1, + "operation": "start-window-heating", + "status": "ERROR", + "errorCode": "timeout", + "traceId": "800a74737b5a4328862d958c35b71b74", + "requestId": "5a16b265-85e7-4502-bd24-c92091c3df31" +} + { + "version": 1, + "traceId": "cd2e3695-c136-4835-8e05-7e6fc305e0b2", + "timestamp": "2024-09-11T21:06:26Z", + "producer": "SKODA_MHUB", + "name": "change-soc", + "data": { + "mode": "manual", + "state": "charging", + "soc": "74", + "chargedRange": "207", + "timeToFinish": "25", + "userId": "50f8b18c-d444-422c-998f-2b599f4f0ec7", + "vin": "TMBJB9NY6RF999999" + } +} + */ + this.log.debug("Received message on topic: " + topic + " with message: " + message.toString()); + const vin = topic.split("/")[1]; + + try { + const options = { + forceIndex: true, + deleteBeforeUpdate: true, + }; + const data = JSON.parse(message.toString()); + let formattedData = data; + if (data.operation) { + options.channelName = "Last Operation"; + formattedData = { operation: data }; + } + if (data.data) { + options.channelName = "Last Event"; + formattedData = { + event: data, + }; + } + + this.json2iob.parse(vin + ".mqtt", formattedData, options); + } catch (error) { + this.log.debug("Error parsing message: " + error); + } + }); + this.mqttClient.on("error", (error) => { + this.log.error("MQTT Error: " + error); + }); + this.mqttClient.on("close", () => { + this.log.error("MQTT Connection closed"); + }); + this.mqttClient.on("reconnect", () => { + this.log.info("MQTT Reconnecting"); + }); + this.mqttClient.on("offline", () => { + this.log.error("MQTT Offline"); + }); + } + getIdStatus(vin) { //eslint-disable-next-line return new Promise(async (resolve, reject) => { @@ -3456,37 +3554,33 @@ class VwWeconnect extends utils.Adapter { } async getSkodaEStatus(vin) { const statusArray = [ - { path: "air-conditioning", version: "v1", postfix: "/status" }, - { path: "air-conditioning", version: "v1", postfix: "/settings" }, + { path: "air-conditioning", version: "v2", postfix: "" }, + // { path: "air-conditioning", version: "v1", postfix: "/settings" }, // { path: "air-conditioning", version: "v1", postfix: "/timers" }, - { path: "charging", version: "v1", postfix: "/status" }, - { path: "charging", version: "v1", postfix: "/settings" }, + { path: "charging", version: "v1", postfix: "" }, + // { path: "charging", version: "v1", postfix: "/settings" }, { path: "vehicle-status", version: "v2", postfix: "" }, - { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth + { path: "maps/positions/vehicles", version: "v3", postfix: "/parking" }, //need second auth ]; for (const status of statusArray) { const url = - "https://api.connect.skoda-auto.cz/api/" + status.version + "/" + status.path + "/" + vin + status.postfix; + "https://mysmob.api.connect.skoda-auto.cz/api/" + + status.version + + "/" + + status.path + + "/" + + vin + + status.postfix; const headers = { - "api-key": "ok", + "x-demo-mode": "false", accept: "application/json", - "content-type": "application/json;charset=utf-8", "user-agent": this.skodaUserAgent, "accept-language": "de-de", "If-None-Match": this.etags[url] || "", authorization: "Bearer " + this.config.atoken, }; - if (status.path === "position/vehicles") { - if (this.secondAccessToken === "blocked") { - continue; - } - if (!this.secondAccessToken) { - this.log.warn("Missing second auth token for parking position"); - continue; - } - headers["Authorization"] = "Bearer " + this.secondAccessToken; - } + await axios({ method: "get", url: url, @@ -3551,51 +3645,63 @@ class VwWeconnect extends utils.Adapter { this.firstStart = false; } - setSkodaESettings(vin, action, value, bodyContent) { + setSkodaESettings(vin, action, value) { //eslint-disable-next-line return new Promise(async (resolve, reject) => { - const pre = this.name + "." + this.instance; - let body = bodyContent || {}; - if (value !== "UpdateSettings") { - const states = await this.getStatesAsync(pre + "." + vin + ".status." + action + ".settings.*"); - body = {}; - const allIds = Object.keys(states); - allIds.forEach((keyName) => { - const keyNameArray = keyName.split("."); - const key = keyNameArray[keyNameArray.length - 1]; - const subKey = keyNameArray[keyNameArray.length - 2]; - if (subKey === "settings" && states[keyName]) { - body[key] = states[keyName].val; - } else if (states[keyName]) { - if (!body[subKey]) { - body[subKey] = {}; - } - body[subKey][key] = states[keyName].val; - } - }); + let body = {}; + let url = "https://mysmob.api.connect.skoda-auto.cz/api/v2/" + action + "/" + vin + "/" + value; + if (action === "air-conditioning" && value === "start") { + body = { + targetTemperature: { + temperatureValue: 23.0, + unitInCar: "CELSIUS", + }, + heaterSource: "ELECTRIC", + airConditioningWithoutExternalPower: true, + }; + const targetTemperatureState = await this.getStateAsync( + vin + ".status.air-conditioning.targetTemperature.temperatureValue", + ); + + if (targetTemperatureState) { + body.targetTemperature.temperatureValue = targetTemperatureState.val; + } + const remoteTarget = await this.getStateAsync(vin + ".remote.targetTemperatureInCelsius"); + if (remoteTarget) { + body.targetTemperature.temperatureValue = remoteTarget.val; + } } - const settingsName = this.toCammelCase(action) + "Settings"; - const finalBody = { - type: value, - }; - finalBody[settingsName] = body; + if (action === "lock" || action === "unlock") { + body = { + currentSpin: this.config.pin, + }; + url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/" + vin + "/" + action; + } + + if (action === "maxChargeCurrent") { + body = { + targetSOCInPercent: value, + }; + url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/" + vin + "/set-charge-limit"; + } + const method = "POST"; - const url = "https://api.connect.skoda-auto.cz/api/v1/" + action + "/operation-requests?vin=" + vin; + this.log.debug(url); - this.log.debug(JSON.stringify(finalBody)); + this.log.debug(JSON.stringify(body)); request( { method: method, url: url, headers: { - "api-key": "ok", + "x-demo-mode": "false", accept: "application/json", "content-type": "application/json;charset=utf-8", "user-agent": this.skodaUserAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, }, - body: finalBody, + body: body, followAllRedirects: true, json: true, gzip: true, @@ -5391,6 +5497,7 @@ class VwWeconnect extends utils.Adapter { clearInterval(this.fupdateInterval); clearTimeout(this.refreshTokenTimeout); clearTimeout(this.refreshTimeout); + this.mqttClient && this.mqttClient.end(); callback(); } catch (e) { this.log.error(e); @@ -5641,7 +5748,7 @@ class VwWeconnect extends utils.Adapter { }); return; } else if (this.config.type === "skodae") { - const value = state.val ? "Start" : "Stop"; + const value = state.val ? "start" : "stop"; this.setSkodaESettings(vin, action, value).catch(() => { this.log.error("failed set state " + action); }); @@ -5683,7 +5790,7 @@ class VwWeconnect extends utils.Adapter { }); return; } else if (this.config.type === "skodae") { - const value = state.val ? "Start" : "Stop"; + const value = state.val ? "start" : "stop"; this.setSkodaESettings(vin, action, value).catch(() => { this.log.error("failed set state " + action); }); @@ -5713,7 +5820,7 @@ class VwWeconnect extends utils.Adapter { } if (action === "air-conditioning") { if (this.config.type === "skodae") { - const value = state.val ? "Start" : "Stop"; + const value = state.val ? "start" : "stop"; this.setSkodaESettings(vin, action, value).catch(() => { this.log.error("failed set state " + action); }); diff --git a/package-lock.json b/package-lock.json index 61f260e6..1e143764 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "axios": "^1.7.9", "json-bigint": "^1.0.0", "json2iob": "^2.6.17", + "mqtt": "^5.10.3", "ngeohash": "^0.6.3", "qs": "^6.14.0", "request": "^2.88.2", @@ -237,6 +238,18 @@ "node": ">=12.20" } }, + "node_modules/@babel/runtime": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", + "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "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", @@ -680,12 +693,48 @@ "version": "22.13.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", - "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.20.0" } }, + "node_modules/@types/readable-stream": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz", + "integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } + }, + "node_modules/@types/readable-stream/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==", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", + "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/acorn": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", @@ -936,6 +985,26 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -965,6 +1034,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.19.tgz", + "integrity": "sha512-4Ay3A3oDfGg3GGirhl4s62ebtnk0pJZA5mLp672MPKOQXsWvXjEF4dqdXySjJIs7b9OVr/O8aOo0Lm+xdjo2JA==", + "license": "MIT", + "dependencies": { + "@types/readable-stream": "^4.0.0", + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^4.2.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -995,11 +1076,34 @@ "dev": true, "license": "ISC" }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "node_modules/call-bind": { "version": "1.0.8", @@ -1234,12 +1338,47 @@ "node": ">= 0.8" } }, + "node_modules/commist": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/commist/-/commist-3.2.0.tgz", + "integrity": "sha512-4PIMoPniho+LqXmpS5d3NuGYncG6XWlkBSVGiWycL22dd42OYdUGil2CWuzklaJoNxyxUSpO4MKIBU94viWNAw==", + "license": "MIT" + }, "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": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1326,7 +1465,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1830,6 +1968,24 @@ "node": ">=0.10.0" } }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -1882,6 +2038,19 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-unique-numbers": { + "version": "8.0.13", + "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-8.0.13.tgz", + "integrity": "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.8", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.1.0" + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -2436,6 +2605,12 @@ "he": "bin/he" } }, + "node_modules/help-me": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", + "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==", + "license": "MIT" + }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -2459,6 +2634,26 @@ "node": ">=10.17.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", @@ -2493,6 +2688,12 @@ "node": ">=0.8.19" } }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -2936,6 +3137,16 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "license": "MIT", + "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", @@ -3180,6 +3391,15 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -3249,11 +3469,59 @@ "node": ">=10" } }, + "node_modules/mqtt": { + "version": "5.10.3", + "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.3.tgz", + "integrity": "sha512-hA/6YrUS4fywhBGCjH/XXUuLeueJiPqruVVWjK2A24Ma4KcWfZ/x8x07aoesBV+HXDWBC08tbT4IWfSXNW0Jtw==", + "license": "MIT", + "dependencies": { + "@types/readable-stream": "^4.0.5", + "@types/ws": "^8.5.9", + "commist": "^3.2.0", + "concat-stream": "^2.0.0", + "debug": "^4.3.4", + "help-me": "^5.0.0", + "lru-cache": "^10.0.1", + "minimist": "^1.2.8", + "mqtt-packet": "^9.0.1", + "number-allocator": "^1.0.14", + "readable-stream": "^4.4.2", + "reinterval": "^1.1.0", + "rfdc": "^1.3.0", + "split2": "^4.2.0", + "worker-timers": "^7.1.4", + "ws": "^8.17.1" + }, + "bin": { + "mqtt": "build/bin/mqtt.js", + "mqtt_pub": "build/bin/pub.js", + "mqtt_sub": "build/bin/sub.js" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/mqtt-packet": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.1.tgz", + "integrity": "sha512-koZF1V/X2RZUI6uD9wN5OK1JxxcG1ofAR4H3LjCw1FkeKzruZQ26aAA6v2m1lZyWONZIR5wMMJFrZJDRNzbiQw==", + "license": "MIT", + "dependencies": { + "bl": "^6.0.8", + "debug": "^4.3.4", + "process-nextick-args": "^2.0.1" + } + }, + "node_modules/mqtt/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, "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==", - "dev": true, "license": "MIT" }, "node_modules/natural-compare": { @@ -3306,6 +3574,16 @@ "node": ">=8" } }, + "node_modules/number-allocator": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/number-allocator/-/number-allocator-1.0.14.tgz", + "integrity": "sha512-OrL44UTVAvkKdOdRQZIJpLkAdjXGTRda052sN4sO77bKEzYYqWKMBjQvrJFzqygI99gL6Z4u2xctPW1tB8ErvA==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.1", + "js-sdsl": "4.3.0" + } + }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -3556,6 +3834,21 @@ "node": ">= 0.8.0" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", + "engines": { + "node": ">= 0.6.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==", + "license": "MIT" + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -3615,6 +3908,22 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -3650,6 +3959,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -3670,6 +3985,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/reinterval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", + "integrity": "sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ==", + "license": "MIT" + }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -3736,6 +4057,12 @@ "node": ">=4" } }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "license": "MIT" + }, "node_modules/safe-array-concat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", @@ -4064,6 +4391,15 @@ "source-map": "^0.6.0" } }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -4088,6 +4424,15 @@ "node": ">=0.10.0" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -4406,6 +4751,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, "node_modules/typedarray.prototype.slice": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.5.tgz", @@ -4464,7 +4815,6 @@ "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true, "license": "MIT" }, "node_modules/universalify": { @@ -4484,6 +4834,12 @@ "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": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, "node_modules/uuid": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", @@ -4627,6 +4983,40 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/worker-timers": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-7.1.8.tgz", + "integrity": "sha512-R54psRKYVLuzff7c1OTFcq/4Hue5Vlz4bFtNEIarpSiCYhpifHU3aIQI29S84o1j87ePCYqbmEJPqwBTf+3sfw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.5", + "tslib": "^2.6.2", + "worker-timers-broker": "^6.1.8", + "worker-timers-worker": "^7.0.71" + } + }, + "node_modules/worker-timers-broker": { + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-6.1.8.tgz", + "integrity": "sha512-FUCJu9jlK3A8WqLTKXM9E6kAmI/dR1vAJ8dHYLMisLNB/n3GuaFIjJ7pn16ZcD1zCOf7P6H62lWIEBi+yz/zQQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.5", + "fast-unique-numbers": "^8.0.13", + "tslib": "^2.6.2", + "worker-timers-worker": "^7.0.71" + } + }, + "node_modules/worker-timers-worker": { + "version": "7.0.71", + "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-7.0.71.tgz", + "integrity": "sha512-ks/5YKwZsto1c2vmljroppOKCivB/ma97g9y77MAAz2TBBjPPgpoOiS1qYQKIgvGTr2QYPT3XhJWIB6Rj2MVPQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.5", + "tslib": "^2.6.2" + } + }, "node_modules/workerpool": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", @@ -4738,6 +5128,27 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "license": "MIT", + "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", @@ -4971,6 +5382,14 @@ "tiny-glob": "^0.2.9" } }, + "@babel/runtime": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", + "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -5285,11 +5704,42 @@ "version": "22.13.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", - "dev": true, "requires": { "undici-types": "~6.20.0" } }, + "@types/readable-stream": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz", + "integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==", + "requires": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "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==" + } + } + }, + "@types/ws": { + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", + "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", + "requires": { + "@types/node": "*" + } + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, "acorn": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", @@ -5468,6 +5918,11 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -5487,6 +5942,17 @@ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true }, + "bl": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.19.tgz", + "integrity": "sha512-4Ay3A3oDfGg3GGirhl4s62ebtnk0pJZA5mLp672MPKOQXsWvXjEF4dqdXySjJIs7b9OVr/O8aOo0Lm+xdjo2JA==", + "requires": { + "@types/readable-stream": "^4.0.0", + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^4.2.0" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5512,11 +5978,19 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "call-bind": { "version": "1.0.8", @@ -5681,12 +6155,40 @@ "delayed-stream": "~1.0.0" } }, + "commist": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/commist/-/commist-3.2.0.tgz", + "integrity": "sha512-4PIMoPniho+LqXmpS5d3NuGYncG6XWlkBSVGiWycL22dd42OYdUGil2CWuzklaJoNxyxUSpO4MKIBU94viWNAw==" + }, "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": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -5745,7 +6247,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, "requires": { "ms": "^2.1.3" } @@ -6085,6 +6586,16 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -6128,6 +6639,15 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "fast-unique-numbers": { + "version": "8.0.13", + "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-8.0.13.tgz", + "integrity": "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g==", + "requires": { + "@babel/runtime": "^7.23.8", + "tslib": "^2.6.2" + } + }, "file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -6476,6 +6996,11 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "help-me": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", + "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==" + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -6492,6 +7017,11 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, "ignore": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", @@ -6514,6 +7044,11 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -6773,6 +7308,11 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==" + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -6965,6 +7505,11 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, "minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -7019,11 +7564,50 @@ } } }, + "mqtt": { + "version": "5.10.3", + "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.3.tgz", + "integrity": "sha512-hA/6YrUS4fywhBGCjH/XXUuLeueJiPqruVVWjK2A24Ma4KcWfZ/x8x07aoesBV+HXDWBC08tbT4IWfSXNW0Jtw==", + "requires": { + "@types/readable-stream": "^4.0.5", + "@types/ws": "^8.5.9", + "commist": "^3.2.0", + "concat-stream": "^2.0.0", + "debug": "^4.3.4", + "help-me": "^5.0.0", + "lru-cache": "^10.0.1", + "minimist": "^1.2.8", + "mqtt-packet": "^9.0.1", + "number-allocator": "^1.0.14", + "readable-stream": "^4.4.2", + "reinterval": "^1.1.0", + "rfdc": "^1.3.0", + "split2": "^4.2.0", + "worker-timers": "^7.1.4", + "ws": "^8.17.1" + }, + "dependencies": { + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + } + } + }, + "mqtt-packet": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.1.tgz", + "integrity": "sha512-koZF1V/X2RZUI6uD9wN5OK1JxxcG1ofAR4H3LjCw1FkeKzruZQ26aAA6v2m1lZyWONZIR5wMMJFrZJDRNzbiQw==", + "requires": { + "bl": "^6.0.8", + "debug": "^4.3.4", + "process-nextick-args": "^2.0.1" + } + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "natural-compare": { "version": "1.4.0", @@ -7064,6 +7648,15 @@ "path-key": "^3.0.0" } }, + "number-allocator": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/number-allocator/-/number-allocator-1.0.14.tgz", + "integrity": "sha512-OrL44UTVAvkKdOdRQZIJpLkAdjXGTRda052sN4sO77bKEzYYqWKMBjQvrJFzqygI99gL6Z4u2xctPW1tB8ErvA==", + "requires": { + "debug": "^4.3.1", + "js-sdsl": "4.3.0" + } + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -7228,6 +7821,16 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, + "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-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -7273,6 +7876,18 @@ "safe-buffer": "^5.1.0" } }, + "readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "requires": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -7297,6 +7912,11 @@ "which-builtin-type": "^1.2.1" } }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -7310,6 +7930,11 @@ "set-function-name": "^2.0.2" } }, + "reinterval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", + "integrity": "sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ==" + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -7361,6 +7986,11 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, + "rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==" + }, "safe-array-concat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", @@ -7587,6 +8217,11 @@ "source-map": "^0.6.0" } }, + "split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==" + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -7603,6 +8238,14 @@ "tweetnacl": "~0.14.0" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -7819,6 +8462,11 @@ "reflect.getprototypeof": "^1.0.6" } }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, "typedarray.prototype.slice": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.5.tgz", @@ -7854,8 +8502,7 @@ "undici-types": { "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "universalify": { "version": "2.0.0", @@ -7871,6 +8518,11 @@ "punycode": "^2.1.0" } }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "uuid": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", @@ -7970,6 +8622,37 @@ "has-tostringtag": "^1.0.2" } }, + "worker-timers": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-7.1.8.tgz", + "integrity": "sha512-R54psRKYVLuzff7c1OTFcq/4Hue5Vlz4bFtNEIarpSiCYhpifHU3aIQI29S84o1j87ePCYqbmEJPqwBTf+3sfw==", + "requires": { + "@babel/runtime": "^7.24.5", + "tslib": "^2.6.2", + "worker-timers-broker": "^6.1.8", + "worker-timers-worker": "^7.0.71" + } + }, + "worker-timers-broker": { + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-6.1.8.tgz", + "integrity": "sha512-FUCJu9jlK3A8WqLTKXM9E6kAmI/dR1vAJ8dHYLMisLNB/n3GuaFIjJ7pn16ZcD1zCOf7P6H62lWIEBi+yz/zQQ==", + "requires": { + "@babel/runtime": "^7.24.5", + "fast-unique-numbers": "^8.0.13", + "tslib": "^2.6.2", + "worker-timers-worker": "^7.0.71" + } + }, + "worker-timers-worker": { + "version": "7.0.71", + "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-7.0.71.tgz", + "integrity": "sha512-ks/5YKwZsto1c2vmljroppOKCivB/ma97g9y77MAAz2TBBjPPgpoOiS1qYQKIgvGTr2QYPT3XhJWIB6Rj2MVPQ==", + "requires": { + "@babel/runtime": "^7.24.5", + "tslib": "^2.6.2" + } + }, "workerpool": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", @@ -8038,6 +8721,12 @@ "strip-ansi": "^6.0.0" } }, + "ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "requires": {} + }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index c546f595..db496ce1 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "axios": "^1.7.9", "json-bigint": "^1.0.0", "json2iob": "^2.6.17", + "mqtt": "^5.10.3", "ngeohash": "^0.6.3", "qs": "^6.14.0", "request": "^2.88.2", From 8f3946fab3dc23e6ff69804193658f6cf8597a82 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 15:23:28 +0100 Subject: [PATCH 643/729] updat mqtt status handling --- main.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index 28a63e39..6f89aff4 100644 --- a/main.js +++ b/main.js @@ -2787,16 +2787,15 @@ class VwWeconnect extends utils.Adapter { let formattedData = data; if (data.operation) { options.channelName = "Last Operation"; + this.json2iob.parse(vin + ".mqtt.operation", formattedData, options); formattedData = { operation: data }; - } - if (data.data) { + } else if (data.data) { options.channelName = "Last Event"; - formattedData = { - event: data, - }; + this.json2iob.parse(vin + ".mqtt.event", formattedData, options); + } else { + options.channelName = "Last Other Message"; + this.json2iob.parse(vin + ".mqtt.other", formattedData, options); } - - this.json2iob.parse(vin + ".mqtt", formattedData, options); } catch (error) { this.log.debug("Error parsing message: " + error); } From 983d4c0e466aa18deb0a261b8cf0bf92451572bf Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 18:50:40 +0100 Subject: [PATCH 644/729] add refresh token --- main.js | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 6f89aff4..21c35870 100644 --- a/main.js +++ b/main.js @@ -1404,6 +1404,16 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "seatelli" || this.config.type === "skodapower") { this.config.atoken = tokens.token; } + if (this.config.type === "skodae") { + if (this.refreshTokenInterval) { + clearInterval(this.refreshTokenInterval); + } + this.refreshTokenInterval = setInterval(() => { + this.refreshSkodaEToken().catch(() => {}); + }, 0.9 * 60 * 60 * 1000); // 0.9hours + resolve(); + return; + } if (this.config.type === "seatcupra") { if (this.refreshTokenInterval) { clearInterval(this.refreshTokenInterval); @@ -2732,9 +2742,9 @@ class VwWeconnect extends utils.Adapter { clientId: `${fixedUUID}#${uuid.v4()}.$${this.skodaUser}`, }); this.mqttClient.on("connect", () => { - this.log.info("Connected to MQTT"); + this.log.debug("Connected to MQTT"); for (const vin of this.vinArray) { - this.log.info("Connect to MQTT for " + vin); + this.log.debug("Connect to MQTT for " + vin); this.mqttClient.subscribe(`${this.skodaUser}/${vin}/#`, (err) => { err && this.log.error(err); @@ -4373,6 +4383,34 @@ class VwWeconnect extends utils.Adapter { ); }); } + + async refreshSkodaEToken() { + await axios({ + method: "post", + url: "https://mysmob.api.connect.skoda-auto.cz/api/v1/authentication/refresh-token?tokenType=CONNECT", + headers: { + accept: "*/*", + "content-type": "application/json", + "user-agent": this.skodaUserAgent, + "accept-language": "de-de", + }, + data: { + token: this.config.rtoken, + }, + }) + .then((res) => { + this.config.atoken = res.data.accessToken; + this.config.rtoken = res.data.refreshToken; + this.connectMqtt(); + }) + .catch((error) => { + this.log.error("Failed refresh token. Relogin in 10min"); + this.reloginTimeout = this.setTimeout(() => { + this.login(); + }, 10 * 60 * 1000); + this.log.error(error); + }); + } refreshSeatCupraToken() { return new Promise((resolve, reject) => { this.log.debug("Token Refresh started"); From ea8a2ef9ae1962c55e6be3b94bbf8cf7f4fbf8f5 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 18:59:01 +0100 Subject: [PATCH 645/729] move events --- main.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 21c35870..c5f53ec5 100644 --- a/main.js +++ b/main.js @@ -2279,6 +2279,17 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + await this.extendObject(vin + "mqtt.events", { + type: "channel", + common: { + name: "MQTT Events", + role: "indicator", + type: "mixed", + write: false, + read: true, + }, + native: {}, + }); this.setObjectNotExists(vin + ".remote", { type: "state", common: { @@ -2794,14 +2805,13 @@ class VwWeconnect extends utils.Adapter { deleteBeforeUpdate: true, }; const data = JSON.parse(message.toString()); - let formattedData = data; + const formattedData = data; if (data.operation) { options.channelName = "Last Operation"; this.json2iob.parse(vin + ".mqtt.operation", formattedData, options); - formattedData = { operation: data }; } else if (data.data) { - options.channelName = "Last Event"; - this.json2iob.parse(vin + ".mqtt.event", formattedData, options); + options.channelName = formattedData.name; + this.json2iob.parse(vin + ".mqtt.events." + formattedData.name, formattedData, options); } else { options.channelName = "Last Other Message"; this.json2iob.parse(vin + ".mqtt.other", formattedData, options); From e89b6608c8e6424205f21cce0f9a34bbbf8bea1e Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 19:04:25 +0100 Subject: [PATCH 646/729] fix path --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index c5f53ec5..493576cf 100644 --- a/main.js +++ b/main.js @@ -2268,7 +2268,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("Failed to extract"); this.log.error(error); }); - await this.extendObject(vin + "mqtt", { + await this.extendObject(vin + ".mqtt", { type: "channel", common: { name: "MQTT status", @@ -2279,7 +2279,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - await this.extendObject(vin + "mqtt.events", { + await this.extendObject(vin + ".mqtt.events", { type: "channel", common: { name: "MQTT Events", @@ -2290,7 +2290,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote", { + await this.setObjectNotExists(vin + ".remote", { type: "state", common: { name: "Remote controls", From 0a1507c478cdec241a6bc717758889e7e8f94a3d Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 22:39:09 +0100 Subject: [PATCH 647/729] add remotes --- main.js | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 493576cf..82e0025c 100644 --- a/main.js +++ b/main.js @@ -2308,6 +2308,28 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".remote.auxiliaryheating", { + type: "state", + common: { + name: "Standheizung Aux Heating", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); + this.extendObject(vin + ".remote.windowheating", { + type: "state", + common: { + name: "Scheibenheizung Window Heating", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); this.setObjectNotExists(vin + ".remote.air-conditioning", { type: "state", common: { @@ -2824,7 +2846,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("MQTT Error: " + error); }); this.mqttClient.on("close", () => { - this.log.error("MQTT Connection closed"); + this.log.info("MQTT Connection closed"); }); this.mqttClient.on("reconnect", () => { this.log.info("MQTT Reconnecting"); @@ -3573,13 +3595,36 @@ class VwWeconnect extends utils.Adapter { } async getSkodaEStatus(vin) { const statusArray = [ + { + path: "trip-statistics", + version: "v1", + postfix: "", + params: { + offset: "0", + offsetType: "WEEK", + timezone: "Europe/Berlin", + }, + name: "tripsWeek", + }, + { + path: "trip-statistics", + version: "v1", + postfix: "", + params: { + offset: "0", + offsetType: "YEAR", + timezone: "Europe/Berlin", + }, + name: "tripsYear", + }, + { path: "vehicle-maintenance", version: "v3", postfix: "" }, { path: "air-conditioning", version: "v2", postfix: "" }, // { path: "air-conditioning", version: "v1", postfix: "/settings" }, // { path: "air-conditioning", version: "v1", postfix: "/timers" }, { path: "charging", version: "v1", postfix: "" }, // { path: "charging", version: "v1", postfix: "/settings" }, { path: "vehicle-status", version: "v2", postfix: "" }, - { path: "maps/positions/vehicles", version: "v3", postfix: "/parking" }, //need second auth + { path: "maps/positions/vehicles", version: "v3", postfix: "/parking", name: "position" }, //need second auth ]; for (const status of statusArray) { @@ -3604,12 +3649,18 @@ class VwWeconnect extends utils.Adapter { method: "get", url: url, headers: headers, + params: status.params, }) .then(async (res) => { this.log.debug(JSON.stringify(res.data)); - let path = vin + ".status." + status.path.replace("/", ""); - if (status.postfix) { - path += "." + status.postfix.replace("/", ""); + let path; + if (status.name) { + path = vin + ".status." + status.name; + } else { + path = vin + ".status." + status.path.replace("/", ""); + if (status.postfix) { + path += "." + status.postfix.replace("/", ""); + } } this.log.debug(path); this.extractKeys(this, path, res.data); @@ -3690,6 +3741,17 @@ class VwWeconnect extends utils.Adapter { body.targetTemperature.temperatureValue = remoteTarget.val; } } + if (action === "auxiliaryheating") { + url = "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/auxiliary-heating/" + value; + if (value === "start") { + body = { spin: this.config.pin }; + } + } + if (action === "windowheating") { + url = + "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/" + value + "-window-heating"; + } + if (action === "lock" || action === "unlock") { body = { currentSpin: this.config.pin, @@ -5816,7 +5878,7 @@ class VwWeconnect extends utils.Adapter { }); return; } else if (this.config.type === "skodae") { - const value = state.val ? "Start" : "Stop"; + const value = state.val ? "start" : "stop"; this.setSkodaESettings(vin, action, value).catch(() => { this.log.error("failed set state " + action); }); From c8bf532b166ccf48bc4539a85ef2106b6b6162bb Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 23:04:44 +0100 Subject: [PATCH 648/729] increase reconnect --- main.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.js b/main.js index 82e0025c..91dd96b4 100644 --- a/main.js +++ b/main.js @@ -2764,6 +2764,7 @@ class VwWeconnect extends utils.Adapter { return token.substring(0, length); } async connectMqtt() { + this.reconnectCount = 0; if (this.mqttClient) { this.mqttClient.end(); } @@ -2773,8 +2774,10 @@ class VwWeconnect extends utils.Adapter { username: "android-app", password: this.config.atoken, clientId: `${fixedUUID}#${uuid.v4()}.$${this.skodaUser}`, + reconnectPeriod: 60000, }); this.mqttClient.on("connect", () => { + this.reconnectCount = 0; this.log.debug("Connected to MQTT"); for (const vin of this.vinArray) { this.log.debug("Connect to MQTT for " + vin); @@ -2849,6 +2852,12 @@ class VwWeconnect extends utils.Adapter { this.log.info("MQTT Connection closed"); }); this.mqttClient.on("reconnect", () => { + this.reconnectCount++; + if (this.reconnectCount > 10) { + this.log.error("Reconnect count exceeded. Stop MQTT"); + this.mqttClient.end(); + return; + } this.log.info("MQTT Reconnecting"); }); this.mqttClient.on("offline", () => { From bb6bb2136a7b2eadfb2d62e3fe679330e737e085 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 21 Feb 2025 23:07:25 +0100 Subject: [PATCH 649/729] fix maint url --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 91dd96b4..74966da3 100644 --- a/main.js +++ b/main.js @@ -3626,7 +3626,7 @@ class VwWeconnect extends utils.Adapter { }, name: "tripsYear", }, - { path: "vehicle-maintenance", version: "v3", postfix: "" }, + { path: "vehicle-maintenance/vehicles", version: "v3", postfix: "" }, { path: "air-conditioning", version: "v2", postfix: "" }, // { path: "air-conditioning", version: "v1", postfix: "/settings" }, // { path: "air-conditioning", version: "v1", postfix: "/timers" }, From 8e2fc84248f3dedae08294c2d8f89b05836e4a2e Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Feb 2025 10:27:00 +0100 Subject: [PATCH 650/729] fix seat login --- admin/index_m.html | 7 ++++--- main.js | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/index_m.html b/admin/index_m.html index 47f47682..f20e2991 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -86,14 +86,15 @@ - + - - + + +
diff --git a/main.js b/main.js index 74966da3..63f06abd 100644 --- a/main.js +++ b/main.js @@ -172,9 +172,11 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "seatcupra") { this.type = "Seat"; - this.clientId = "3c756d46-f1ba-4d78-9f9a-cff0d5292d51@apps_vw-dilab_com"; + // this.clientId = "3c756d46-f1ba-4d78-9f9a-cff0d5292d51@apps_vw-dilab_com"; + this.clientId = "99a5b77d-bd88-4d53-b4e5-a539c60694a3@apps_vw-dilab_com"; this.scope = "openid profile nickname birthdate phone"; - this.redirect = "cupra://oauth-callback"; + // this.redirect = "cupra://oauth-callback"; + this.redirect = "seat://oauth-callback"; this.responseType = "code"; this.xappversion = "1.1.29"; this.xappname = "SEATConnect"; From 9402d7c58c28a9daa0c3b59731b5c9f403293e97 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Feb 2025 10:29:27 +0100 Subject: [PATCH 651/729] fix type list --- admin/index_m.html | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/index_m.html b/admin/index_m.html index f20e2991..2ac5c427 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -92,7 +92,6 @@ - From d498cecd54e196d92c5c11586a88327820233581 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Feb 2025 10:54:45 +0100 Subject: [PATCH 652/729] refactor seat --- main.js | 283 ++++++++++++-------------------------------------------- 1 file changed, 60 insertions(+), 223 deletions(-) diff --git a/main.js b/main.js index 63f06abd..3405d641 100644 --- a/main.js +++ b/main.js @@ -1226,7 +1226,7 @@ class VwWeconnect extends utils.Adapter { code_verifier; } if (this.config.type === "seatcupra") { - url = "https://identity.vwgroup.io/oidc/v1/token"; + url = "https://ola.prod.code.seat.cloud.vwgroup.com/authorization/api/v1/token"; body = "code=" + jwtauth_code + @@ -1239,9 +1239,8 @@ class VwWeconnect extends utils.Adapter { headers = { accept: "*/*", "content-type": "application/x-www-form-urlencoded; charset=utf-8", - authorization: - "Basic M2M3NTZkNDYtZjFiYS00ZDc4LTlmOWEtY2ZmMGQ1MjkyZDUxQGFwcHNfdnctZGlsYWJfY29tOmViODgxNGU2NDFjODFhMjY0MGFkNjJlZWNjZWMxMWM5OGVmZmM5YmNjZDQyNjlhYjdhZjMzOGI1MGE5NGIzYTI=", - "user-agent": "CUPRAApp%20-%20Store/20220207 CFNetwork/1240.0.4 Darwin/20.6.0", + authorization: "Basic OTlhNWI3N2QtYmQ4OC00ZDUzLWI0ZTUtYTUzOWM2MDY5NGEzQGFwcHNfdnctZGlsYWJfY29tOg==", + "user-agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", "accept-language": "de-de", }; } @@ -2181,14 +2180,17 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "seatcupra") { this.log.info("Found " + body.vehicles.length + " vehicles"); - body.vehicles.forEach((element) => { + + for (const element of body.vehicles) { const vin = element.vin; if (!vin) { this.log.info("No vin found for:" + JSON.stringify(element)); return; } this.vinArray.push(vin); - this.setObjectNotExists(element.vin, { + + await this.extractKeys(this, vin + ".general", element); + await this.extendObject(element.vin, { type: "device", common: { name: element.vehicleNickname, @@ -2199,8 +2201,6 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.extractKeys(this, vin + ".general", element); - this.setObjectNotExists(vin + ".remote", { type: "state", common: { @@ -2241,7 +2241,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - }); + } resolve(); return; } @@ -3257,222 +3257,59 @@ class VwWeconnect extends utils.Adapter { }); } async getSeatCupraStatus(vin) { - //eslint-disable-next-line - return new Promise(async (resolve, reject) => { - request.get( - { - url: - "https://ola.prod.code.seat.cloud.vwgroup.com/v5/users/" + - this.seatcupraUser + - "/vehicles/" + - vin + - "/mycar", - - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - - reject(); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".status", body); - if (this.config.rawJson) { - this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { - type: "state", - common: { - name: vin + ".status" + "rawJson", - role: "state", - type: "json", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".status" + "rawJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - } - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - }, - ); - - request.get( - { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/charging/status", - - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".charging", body.status); - if (this.config.rawJson) { - this.setObjectNotExistsAsync(vin + ".charging" + "rawJson", { - type: "state", - common: { - name: vin + ".charging" + "rawJson", - role: "state", - type: "json", - write: false, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState(vin + ".charging" + "rawJson", JSON.stringify(body.status), true); - }) - .catch((error) => { - this.log.error(error); - }); - } - } catch (err) { - this.log.error(err); - } - }, - ); - request.get( - { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/climatisation/status", - - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - return; - } - this.log.debug(JSON.stringify(body)); - try { - this.extractKeys(this, vin + ".climatisation", body.data); - } catch (err) { - this.log.error(err); - } - }, - ); + const endpoints = [ + { + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v5/users/${this.seatcupraUser}/vehicles/${vin}/mycar`, + path: "status", + }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/${vin}/charging/status`, path: "charging" }, + { + url: `https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/${vin}/climatisation/status`, + path: "climatisation", + }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/${vin}/status`, path: "statusv2" }, + { + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/parkingposition`, + path: "parkingposition", + }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/mileage`, path: "mileage" }, + { + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/${vin}/climatisation/settings`, + path: "climatisation.settings", + }, + ]; - await axios({ - method: "get", - maxBodyLength: Infinity, - url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/" + vin + "/status", - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - }) - .then((res) => { - this.log.debug(JSON.stringify(res.data)); - this.json2iob.parse(vin + ".statusv2", res.data); - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); + const headers = { + accept: "*/*", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }; - await axios({ - method: "get", - maxBodyLength: Infinity, - url: "https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/" + vin + "/parkingposition", - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - }) - .then((res) => { - this.log.debug(JSON.stringify(res.data)); - this.json2iob.parse(vin + ".parkingposition", res.data); - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); - await axios({ - method: "get", - maxBodyLength: Infinity, - url: "https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/" + vin + "/mileage", - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - }) - .then((res) => { - this.log.debug(JSON.stringify(res.data)); - this.json2iob.parse(vin + ".mileage", res.data); - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); - await axios({ - method: "get", - maxBodyLength: Infinity, - url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/" + vin + "/climatisation/settings", - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - }, - }) - .then((res) => { - this.log.debug(JSON.stringify(res.data)); - this.json2iob.parse(vin + ".climatisation.settings", res.data); - }) - .catch((error) => { - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - }); - }); + for (const endpoint of endpoints) { + try { + const response = await axios.get(endpoint.url, { headers }); + this.log.debug(JSON.stringify(response.data)); + this.json2iob.parse(vin + "." + endpoint.path, response.data); + if (this.config.rawJson) { + await this.setObjectNotExistsAsync(vin + "." + endpoint.path + "rawJson", { + type: "state", + common: { + name: vin + "." + endpoint.path + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + "." + endpoint.path + "rawJson", JSON.stringify(response.data), true); + } + } catch (error) { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + } + } } setSeatCupraStatus(vin, action, state) { //eslint-disable-next-line From 18fb5fcecc8c139e6ae5016b0cb0bed203064631 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Feb 2025 21:59:28 +0100 Subject: [PATCH 653/729] add seat refresh token --- main.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index 3405d641..b39d67bb 100644 --- a/main.js +++ b/main.js @@ -3277,6 +3277,8 @@ class VwWeconnect extends utils.Adapter { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/${vin}/climatisation/settings`, path: "climatisation.settings", }, + + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/measurements/engines`, path: "range" }, ]; const headers = { @@ -4336,16 +4338,12 @@ class VwWeconnect extends utils.Adapter { this.log.debug("Token Refresh started"); request.post( { - url: "https://identity.vwgroup.io/oidc/v1/token", - body: - "client_secret=eb8814e641c81a2640ad62eeccec11c98effc9bccd4269ab7af338b50a94b3a2&client_id=" + - this.clientId + - "&grant_type=refresh_token&refresh_token=" + - this.config.rtoken, + url: "https://ola.prod.code.seat.cloud.vwgroup.com/authorization/api/v1/token", + body: "client_id=" + this.clientId + "&grant_type=refresh_token&refresh_token=" + this.config.rtoken, headers: { accept: "*/*", "content-type": "application/x-www-form-urlencoded; charset=utf-8", - "user-agent": this.userAgent, + "user-agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", "accept-language": "de-de", }, followAllRedirects: true, From 64bd18e587751f43ab0124743036e8bf4dd1f898 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Feb 2025 22:08:30 +0100 Subject: [PATCH 654/729] add path ignore --- main.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/main.js b/main.js index b39d67bb..a4338e49 100644 --- a/main.js +++ b/main.js @@ -51,6 +51,7 @@ class VwWeconnect extends utils.Adapter { this.homeRegionSetter = {}; this.secondAccessToken = null; + this.ignoredPaths = {}; this.vinArray = []; this.etags = {}; this.hasRemoteLock = false; @@ -3289,6 +3290,10 @@ class VwWeconnect extends utils.Adapter { }; for (const endpoint of endpoints) { + if (this.ignoredPaths[vin] && this.ignoredPaths[vin].includes(endpoint.path)) { + this.log.debug("Ignored path: " + endpoint.path); + continue; + } try { const response = await axios.get(endpoint.url, { headers }); this.log.debug(JSON.stringify(response.data)); @@ -3308,6 +3313,13 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + "." + endpoint.path + "rawJson", JSON.stringify(response.data), true); } } catch (error) { + this.log.info("Vehicle is not supporting: " + endpoint.path); + if (error.response && error.response.status === 400) { + if (!this.ignoredPaths[vin]) { + this.ignoredPaths[vin] = []; + } + this.ignoredPaths[vin].push(endpoint.path); + } this.log.error(error); error.response && this.log.error(JSON.stringify(error.response.data)); } @@ -3478,6 +3490,10 @@ class VwWeconnect extends utils.Adapter { ]; for (const status of statusArray) { + if (this.ignoredPaths[vin] && this.ignoredPaths[vin].includes(status.path)) { + this.log.debug("Path ignored: " + status.path); + continue; + } const url = "https://mysmob.api.connect.skoda-auto.cz/api/" + status.version + @@ -3551,6 +3567,14 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(error.response.data)); return; } + if (error.response.status === 404) { + this.log.info("Vehicle is not supporting " + status.path); + if (!this.ignoredPaths[vin]) { + this.ignoredPaths[vin] = []; + } + this.ignoredPaths[vin].push(status.path); + return; + } if (error.response.status >= 500) { this.log.info("Server not available. Please try again later:" + JSON.stringify(error.response.data)); return; From e509cbf80581a1077d4c1b0c4bfb7ae15c53cf61 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 22 Feb 2025 22:32:53 +0100 Subject: [PATCH 655/729] add endpoints --- main.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index a4338e49..e442ae6b 100644 --- a/main.js +++ b/main.js @@ -3481,12 +3481,21 @@ class VwWeconnect extends utils.Adapter { }, { path: "vehicle-maintenance/vehicles", version: "v3", postfix: "" }, { path: "air-conditioning", version: "v2", postfix: "" }, - // { path: "air-conditioning", version: "v1", postfix: "/settings" }, + // { path: "air-conditioning", version: "v2", postfix: "/active-ventilation" }, + // { path: "air-conditioning", version: "v2", postfix: "/auxiliary-heating" }, + { path: "air-conditioning", version: "v1", postfix: "/settings" }, // { path: "air-conditioning", version: "v1", postfix: "/timers" }, { path: "charging", version: "v1", postfix: "" }, - // { path: "charging", version: "v1", postfix: "/settings" }, + { path: "charging", version: "v1", postfix: "/settings" }, { path: "vehicle-status", version: "v2", postfix: "" }, { path: "maps/positions/vehicles", version: "v3", postfix: "/parking", name: "position" }, //need second auth + { path: "vehicle-status", version: "v2", postfix: "/driving-range" }, + { path: "vehicle-maintenance/vehicles", version: "v3", postfix: "/report" }, + { path: "fueling/sessions", version: "v2", postfix: "" }, + { path: "fueling/sessions", version: "v2", postfix: "/state" }, + { path: "fueling/locations", version: "v2", postfix: "" }, + { path: "fueling/sessions", version: "v2", postfix: "/latest" }, + { path: "vehicle-information", version: "v1", postfix: "" }, ]; for (const status of statusArray) { @@ -3547,7 +3556,7 @@ class VwWeconnect extends utils.Adapter { } }) .catch((error) => { - this.log.debug(status.path); + this.log.debug(status.path + " " + status.postfix); this.log.debug(error); error.response && this.log.debug(JSON.stringify(error.response.data)); @@ -3568,7 +3577,7 @@ class VwWeconnect extends utils.Adapter { return; } if (error.response.status === 404) { - this.log.info("Vehicle is not supporting " + status.path); + this.log.info("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; } From 76ab0215db43ccadd0bb28ece4c0820d246eb480 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 02:05:59 +0100 Subject: [PATCH 656/729] add 403 --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index e442ae6b..6f831f65 100644 --- a/main.js +++ b/main.js @@ -3576,7 +3576,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(error.response.data)); return; } - if (error.response.status === 404) { + if (error.response.status === 404 || error.response.status === 403) { this.log.info("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; From ea945639700d924145f101ff6d70ae85eb388a90 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 17:39:59 +0100 Subject: [PATCH 657/729] add seat endpoints --- io-package.json | 41 ++++++++++++++++-- main.js | 98 ++++++++++++++++++++++++++++++++++++++--- package-lock.json | 108 +++++++++++++++++++++++----------------------- package.json | 8 ++-- 4 files changed, 186 insertions(+), 69 deletions(-) diff --git a/io-package.json b/io-package.json index dd2ed80f..5f80058d 100644 --- a/io-package.json +++ b/io-package.json @@ -84,10 +84,7 @@ "pl": "Adapter do VW Connect", "zh-cn": "大众我们连接的适配器" }, - "authors": [ - "ta2k ", - "Sneak-L8 " - ], + "authors": ["ta2k ", "Sneak-L8 "], "keywords": [ "VW", "Connect", @@ -126,6 +123,42 @@ } ] }, + "messages": [ + { + "condition": { + "operand": "and", + "rules": ["oldVersion<0.7.0", "newVersion>=0.7.0"] + }, + "title": { + "en": "Adapter Change for Skoda and Seat", + "de": "Adapter Änderung für Skoda und Seat", + "ru": "Изменение адаптера для Skoda и Seat", + "pt": "Alteração do adaptador para Skoda e Seat", + "nl": "Adapterwijziging voor Skoda en Seat", + "fr": "Changement d'adaptateur pour Skoda et Seat", + "it": "Cambiamento dell'adattatore per Skoda e Seat", + "es": "Cambio de adaptador para Skoda y Seat", + "pl": "Zmiana adaptera dla Skoda i Seat", + "uk": "Зміна адаптера для Skoda та Seat", + "zh-cn": "Skoda 和 Seat 的适配器更改" + }, + "text": { + "en": "The adapter has completly changed with for Skoda and Seat. Please delete old states and adapt your vis and scripts to the new states.", + "de": "Der Adapter hat sich komplett geändert für Skoda und Seat. Bitte löschen Sie alte States und passen Sie Ihre Vis und Skripte an die neuen States an.", + "ru": "Адаптер полностью изменился для Skoda и Seat. Пожалуйста, удалите старые состояния и адаптируйте свои визуализации и скрипты к новым состояниям.", + "pt": "O adaptador mudou completamente para Skoda e Seat. Por favor, exclua os estados antigos e adapte sua vis e scripts aos novos estados.", + "nl": "De adapter is volledig veranderd voor Skoda en Seat. Verwijder alstublieft oude states en pas uw vis en scripts aan op de nieuwe states.", + "fr": "L'adaptateur a complètement changé pour Skoda et Seat. Veuillez supprimer les anciens états et adapter votre vis et vos scripts aux nouveaux états.", + "it": "L'adattatore è completamente cambiato per Skoda e Seat. Si prega di eliminare i vecchi stati e adattare la propria vis e gli script ai nuovi stati.", + "es": "El adaptador ha cambiado completamente para Skoda y Seat. Por favor, elimine los estados antiguos y adapte su vis y scripts a los nuevos estados.", + "pl": "Adapter całkowicie zmienił się dla Skoda i Seat. Proszę usunąć stare stany i dostosować swoje wizy i skrypty do nowych stanów.", + "uk": "Адаптер повністю змінився для Skoda та Seat. Будь ласка, видаліть старі стани та адаптуйте свої візуалізації та скрипти до нових станів.", + "zh-cn": "适配器已完全更改为 Skoda 和 Seat。请删除旧状态,并将您的 vis 和脚本调整为新状态。" + }, + "level": "warn", + "buttons": ["agree", "cancel"] + } + ], "native": { "user": "", "password": "", diff --git a/main.js b/main.js index 6f831f65..acb6650e 100644 --- a/main.js +++ b/main.js @@ -2231,6 +2231,17 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".remote.access", { + type: "state", + common: { + name: "Lock or Unlock Car", + type: "boolean", + role: "boolean", + def: false, + write: true, + }, + native: {}, + }); this.extendObject(vin + ".remote.windowheating", { type: "state", common: { @@ -2365,12 +2376,13 @@ class VwWeconnect extends utils.Adapter { native: {}, }); - this.setObjectNotExists(vin + ".remote.lock", { + this.extendObject(vin + ".remote.access", { type: "state", common: { - name: "Lock ", + name: "Lock or Unlock Car", type: "boolean", - role: "switch", + role: "boolean", + def: false, write: true, }, native: {}, @@ -3259,27 +3271,41 @@ class VwWeconnect extends utils.Adapter { } async getSeatCupraStatus(vin) { const endpoints = [ + { + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v3/vehicles/${vin}/warninglights`, + path, + }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v5/users/${this.seatcupraUser}/vehicles/${vin}/mycar`, path: "status", }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/${vin}/charging/status`, path: "charging" }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/${vin}/charging/info`, path: "charging.info" }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/${vin}/climatisation/status`, path: "climatisation", }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/${vin}/status`, path: "statusv2" }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/parkingposition`, path: "parkingposition", }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/mileage`, path: "mileage" }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/maintenance`, path: "maintenance" }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/ranges`, path: "ranges" }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/${vin}/climatisation/settings`, path: "climatisation.settings", }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/measurements/engines`, path: "range" }, + //https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/VSSZZZKM/driving-data/SHORT/last + { + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/SHORT/last`, + path: "tripLast", + }, + //https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/VSSZZZKM/driving-data/SHORT?from=2023-02-24T13:34:52Z&to=2025-02-23T13:34:52Z ]; const headers = { @@ -3314,7 +3340,7 @@ class VwWeconnect extends utils.Adapter { } } catch (error) { this.log.info("Vehicle is not supporting: " + endpoint.path); - if (error.response && error.response.status === 400) { + if ((error.response && error.response.status === 400) || error.response.status === 404) { if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; } @@ -3328,7 +3354,7 @@ class VwWeconnect extends utils.Adapter { setSeatCupraStatus(vin, action, state) { //eslint-disable-next-line return new Promise(async (resolve, reject) => { - const body = {}; + let body = {}; let url = "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state; if (action === "climatisation" && state === "start") { url = "https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/" + vin + "/climatisation/start"; @@ -3348,6 +3374,16 @@ class VwWeconnect extends utils.Adapter { } // body = JSON.stringify(body); } + if (action === "access") { + //verify pin first + await this.verifySeatPin(); + body = { + currentSpin: this.config.pin, + }; + + url = "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state; + } + request.post( { url: url, @@ -3376,6 +3412,30 @@ class VwWeconnect extends utils.Adapter { ); }); } + async verifySeatPin() { + await axios({ + method: "post", + url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + this.seatcupraUser + "/spin/verify", + headers: { + "content-type": "application/json", + accept: "*/*", + authorization: "Bearer " + this.config.atoken, + "accept-language": "de-DE,de;q=0.9", + "user-agent": this.userAgent, + "content-version": "1", + }, + data: { + spin: this.config.pin, + }, + }) + .then((res) => { + this.log.debug(JSON.stringify(res.data)); + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } getAudiDataStatus(vin) { return new Promise((resolve, reject) => { const statusArray = [ @@ -3576,7 +3636,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(error.response.data)); return; } - if (error.response.status === 404 || error.response.status === 403) { + if (error.response.status === 404) { this.log.info("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; @@ -3635,7 +3695,9 @@ class VwWeconnect extends utils.Adapter { "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/" + value + "-window-heating"; } - if (action === "lock" || action === "unlock") { + if (action === "access") { + //verify pin first + await this.verifySkodaPin(); body = { currentSpin: this.config.pin, }; @@ -3698,6 +3760,28 @@ class VwWeconnect extends utils.Adapter { ); }); } + async verifySkodaPin() { + await axios({ + method: "post", + url: "https://mysmob.api.connect.skoda-auto.cz/api/v1/spin/verify", + headers: { + "x-demo-mode": "false", + accept: "application/json", + "user-agent": this.skodaUserAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + }, + data: { currentSpin: this.config.pin }, + }) + .then(async (res) => { + this.log.debug(JSON.stringify(res.data)); + }) + .catch((error) => { + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); + } + async getElliData(type) { if (this.config.historyLimit == -1) { this.log.debug("Elli disabled in config"); diff --git a/package-lock.json b/package-lock.json index 1e143764..c341cb8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,11 +26,11 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "^9.20.0", + "@eslint/eslintrc": "^3.3.0", + "@eslint/js": "^9.21.0", "@iobroker/testing": "^5.0.3", - "@types/node": "^22.13.4", - "eslint": "^9.20.1", + "@types/node": "^22.13.5", + "eslint": "^9.21.0", "eslint-plugin-promise": "^7.2.1", "globals": "^16.0.0", "typescript": "~5.7.3" @@ -291,9 +291,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", - "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -304,9 +304,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz", + "integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==", "dev": true, "license": "MIT", "dependencies": { @@ -341,9 +341,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.20.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", - "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", + "integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", "dev": true, "license": "MIT", "engines": { @@ -361,13 +361,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.6.tgz", - "integrity": "sha512-+0TjwR1eAUdZtvv/ir1mGX+v0tUoR3VEPB8Up0LLJC+whRW0GgBBtpbOkg/a/U4Dxa6l5a3l9AJ1aWIQVyoWJA==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", + "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.11.0", + "@eslint/core": "^0.12.0", "levn": "^0.4.1" }, "engines": { @@ -690,9 +690,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", - "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -1759,22 +1759,22 @@ } }, "node_modules/eslint": { - "version": "9.20.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", - "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", + "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.11.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.20.0", - "@eslint/plugin-kit": "^0.2.5", + "@eslint/config-array": "^0.19.2", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.0", + "@eslint/js": "9.21.0", + "@eslint/plugin-kit": "^0.2.7", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", + "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -5417,18 +5417,18 @@ } }, "@eslint/core": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz", - "integrity": "sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", "dev": true, "requires": { "@types/json-schema": "^7.0.15" } }, "@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz", + "integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -5451,9 +5451,9 @@ } }, "@eslint/js": { - "version": "9.20.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz", - "integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", + "integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", "dev": true }, "@eslint/object-schema": { @@ -5463,12 +5463,12 @@ "dev": true }, "@eslint/plugin-kit": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.6.tgz", - "integrity": "sha512-+0TjwR1eAUdZtvv/ir1mGX+v0tUoR3VEPB8Up0LLJC+whRW0GgBBtpbOkg/a/U4Dxa6l5a3l9AJ1aWIQVyoWJA==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", + "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", "dev": true, "requires": { - "@eslint/core": "^0.11.0", + "@eslint/core": "^0.12.0", "levn": "^0.4.1" } }, @@ -5701,9 +5701,9 @@ "dev": true }, "@types/node": { - "version": "22.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", - "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", "requires": { "undici-types": "~6.20.0" } @@ -6454,21 +6454,21 @@ "dev": true }, "eslint": { - "version": "9.20.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz", - "integrity": "sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==", + "version": "9.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", + "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.11.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.20.0", - "@eslint/plugin-kit": "^0.2.5", + "@eslint/config-array": "^0.19.2", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.0", + "@eslint/js": "9.21.0", + "@eslint/plugin-kit": "^0.2.7", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", + "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", diff --git a/package.json b/package.json index db496ce1..59746ce1 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,11 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "^9.20.0", + "@eslint/eslintrc": "^3.3.0", + "@eslint/js": "^9.21.0", "@iobroker/testing": "^5.0.3", - "@types/node": "^22.13.4", - "eslint": "^9.20.1", + "@types/node": "^22.13.5", + "eslint": "^9.21.0", "eslint-plugin-promise": "^7.2.1", "globals": "^16.0.0", "typescript": "~5.7.3" From 0acf752529624b52469656cbb0b7507af40051d2 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 19:17:45 +0100 Subject: [PATCH 658/729] add additonal check --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index acb6650e..170e9b3f 100644 --- a/main.js +++ b/main.js @@ -3636,7 +3636,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(JSON.stringify(error.response.data)); return; } - if (error.response.status === 404) { + if (error.response.status === 404 || error.response.status === 403) { this.log.info("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; From 16f256e6492eb4b94d2727dd56d67ae5da495a76 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 20:51:50 +0100 Subject: [PATCH 659/729] fix not supported cupra --- main.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 170e9b3f..ffa9304e 100644 --- a/main.js +++ b/main.js @@ -21,6 +21,7 @@ const axios = require("axios").default; const Json2iob = require("json2iob"); const mqtt = require("mqtt"); const uuid = require("uuid"); +const path = require("path"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] @@ -913,10 +914,7 @@ class VwWeconnect extends utils.Adapter { return; } else if (this.config.type === "seatcupra") { this.vinArray.forEach((vin) => { - this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get seat status Failed"); - this.refreshSeatCupraToken().catch(() => {}); - }); + this.getSeatCupraStatus(vin); }); return; } else if (this.config.type === "seatelli" || this.config.type === "skodapower") { @@ -3339,12 +3337,13 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + "." + endpoint.path + "rawJson", JSON.stringify(response.data), true); } } catch (error) { - this.log.info("Vehicle is not supporting: " + endpoint.path); if ((error.response && error.response.status === 400) || error.response.status === 404) { + this.log.info("Vehicle is not supporting: " + endpoint.path); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; } this.ignoredPaths[vin].push(endpoint.path); + return; } this.log.error(error); error.response && this.log.error(JSON.stringify(error.response.data)); From 43fe8643fc63a33eae1e4d8c112b5bbbc6f12c51 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 20:55:29 +0100 Subject: [PATCH 660/729] remove dep --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index ffa9304e..8903ba68 100644 --- a/main.js +++ b/main.js @@ -21,7 +21,6 @@ const axios = require("axios").default; const Json2iob = require("json2iob"); const mqtt = require("mqtt"); const uuid = require("uuid"); -const path = require("path"); class VwWeconnect extends utils.Adapter { /** * @param {Partial} [options={}] From 8030da8553439b3a081a84e162e71bed511c5c1a Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 20:56:59 +0100 Subject: [PATCH 661/729] fix path --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 8903ba68..94a489ed 100644 --- a/main.js +++ b/main.js @@ -3270,7 +3270,7 @@ class VwWeconnect extends utils.Adapter { const endpoints = [ { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v3/vehicles/${vin}/warninglights`, - path, + path: "warninglights", }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v5/users/${this.seatcupraUser}/vehicles/${vin}/mycar`, @@ -3319,6 +3319,7 @@ class VwWeconnect extends utils.Adapter { } try { const response = await axios.get(endpoint.url, { headers }); + this.log.debug("Received data for " + endpoint.path); this.log.debug(JSON.stringify(response.data)); this.json2iob.parse(vin + "." + endpoint.path, response.data); if (this.config.rawJson) { From 7c738bea9ba1078eee339c6dbc674b4e744f3476 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 21:08:06 +0100 Subject: [PATCH 662/729] fix seat fetching --- main.js | 65 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/main.js b/main.js index 94a489ed..5dde6883 100644 --- a/main.js +++ b/main.js @@ -404,7 +404,7 @@ class VwWeconnect extends utils.Adapter { } }); } - if (this.config.type !== "skodae") { + if (this.config.type !== "skodae" || this.config.type !== "seatcupra") { this.updateStatus(); } this.updateInterval && clearInterval(this.updateInterval); @@ -3317,37 +3317,40 @@ class VwWeconnect extends utils.Adapter { this.log.debug("Ignored path: " + endpoint.path); continue; } - try { - const response = await axios.get(endpoint.url, { headers }); - this.log.debug("Received data for " + endpoint.path); - this.log.debug(JSON.stringify(response.data)); - this.json2iob.parse(vin + "." + endpoint.path, response.data); - if (this.config.rawJson) { - await this.setObjectNotExistsAsync(vin + "." + endpoint.path + "rawJson", { - type: "state", - common: { - name: vin + "." + endpoint.path + "rawJson", - role: "state", - type: "json", - write: false, - read: true, - }, - native: {}, - }); - this.setState(vin + "." + endpoint.path + "rawJson", JSON.stringify(response.data), true); - } - } catch (error) { - if ((error.response && error.response.status === 400) || error.response.status === 404) { - this.log.info("Vehicle is not supporting: " + endpoint.path); - if (!this.ignoredPaths[vin]) { - this.ignoredPaths[vin] = []; + + await axios + .get(endpoint.url, { headers }) + .then(async (response) => { + this.log.debug("Received data for " + endpoint.path); + this.log.debug(JSON.stringify(response.data)); + this.json2iob.parse(vin + "." + endpoint.path, response.data); + if (this.config.rawJson) { + await this.setObjectNotExistsAsync(vin + "." + endpoint.path + "rawJson", { + type: "state", + common: { + name: vin + "." + endpoint.path + "rawJson", + role: "state", + type: "json", + write: false, + read: true, + }, + native: {}, + }); + this.setState(vin + "." + endpoint.path + "rawJson", JSON.stringify(response.data), true); } - this.ignoredPaths[vin].push(endpoint.path); - return; - } - this.log.error(error); - error.response && this.log.error(JSON.stringify(error.response.data)); - } + }) + .catch((error) => { + if ((error.response && error.response.status === 400) || error.response.status === 404) { + this.log.info("Vehicle is not supporting: " + endpoint.path); + if (!this.ignoredPaths[vin]) { + this.ignoredPaths[vin] = []; + } + this.ignoredPaths[vin].push(endpoint.path); + return; + } + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); } } setSeatCupraStatus(vin, action, state) { From cf32f4cc9db27260c150ab236b46222557463cc6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 21:16:36 +0100 Subject: [PATCH 663/729] skip 0 mileage --- main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 5dde6883..a086aca6 100644 --- a/main.js +++ b/main.js @@ -404,7 +404,7 @@ class VwWeconnect extends utils.Adapter { } }); } - if (this.config.type !== "skodae" || this.config.type !== "seatcupra") { + if (this.config.type !== "skodae" && this.config.type !== "seatcupra") { this.updateStatus(); } this.updateInterval && clearInterval(this.updateInterval); @@ -3323,6 +3323,11 @@ class VwWeconnect extends utils.Adapter { .then(async (response) => { this.log.debug("Received data for " + endpoint.path); this.log.debug(JSON.stringify(response.data)); + if (endpoint.path === "mileage") { + if (response.data && response.data.mileageKm && response.data.mileageKm === 0) { + return; + } + } this.json2iob.parse(vin + "." + endpoint.path, response.data); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + "." + endpoint.path + "rawJson", { From 15f578d7d68bd2f8857b6372969d6fdad7f2cb77 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Feb 2025 21:55:00 +0100 Subject: [PATCH 664/729] fix target --- main.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index a086aca6..a3301137 100644 --- a/main.js +++ b/main.js @@ -3717,6 +3717,15 @@ class VwWeconnect extends utils.Adapter { }; url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/" + vin + "/set-charge-limit"; } + if (action === "targetTemperatureInCelsius") { + body = { + temperatureValue: value, + unitInCar: "CELSIUS", + }; + + url = + "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/settings/target-temperature"; + } const method = "POST"; @@ -5908,12 +5917,10 @@ class VwWeconnect extends utils.Adapter { } if (action === "targetTemperatureInCelsius") { if (this.config.type === "skodae") { - const pre = this.name + "." + this.instance; - this.setState( - pre + "." + vin + ".status.air-conditioning.settings.targetTemperatureInKelvin", - state.val + 273.15, - false, - ); + this.setSkodaESettings(vin, action, state.val).catch(() => { + this.log.error("failed set state " + action); + }); + return; } } if ( From d6619275dc17815fc1db16cbf2f373b08e27cbd4 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 24 Feb 2025 00:16:52 +0100 Subject: [PATCH 665/729] fix check --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index a3301137..4008280e 100644 --- a/main.js +++ b/main.js @@ -3345,7 +3345,7 @@ class VwWeconnect extends utils.Adapter { } }) .catch((error) => { - if ((error.response && error.response.status === 400) || error.response.status === 404) { + if (error.response && (error.response.status === 400 || error.response.status === 404)) { this.log.info("Vehicle is not supporting: " + endpoint.path); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; From fceb012cd84b889237271243ac1f9525dac98d53 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 24 Feb 2025 12:48:02 +0100 Subject: [PATCH 666/729] fix seat pin --- main.js | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 4008280e..0babc707 100644 --- a/main.js +++ b/main.js @@ -1997,7 +1997,7 @@ class VwWeconnect extends utils.Adapter { this.extendObject(vin + ".remote.access", { type: "state", common: { - name: "Lock or Unlock Car", + name: "Lock = True or Unlock = False Car", type: "boolean", role: "boolean", def: false, @@ -2231,7 +2231,7 @@ class VwWeconnect extends utils.Adapter { this.extendObject(vin + ".remote.access", { type: "state", common: { - name: "Lock or Unlock Car", + name: "Lock = True or Unlock = False Car", type: "boolean", role: "boolean", def: false, @@ -2376,7 +2376,7 @@ class VwWeconnect extends utils.Adapter { this.extendObject(vin + ".remote.access", { type: "state", common: { - name: "Lock or Unlock Car", + name: "Lock = True or Unlock = False Car", type: "boolean", role: "boolean", def: false, @@ -3362,6 +3362,7 @@ class VwWeconnect extends utils.Adapter { //eslint-disable-next-line return new Promise(async (resolve, reject) => { let body = {}; + let secureToken; let url = "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state; if (action === "climatisation" && state === "start") { url = "https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/" + vin + "/climatisation/start"; @@ -3383,12 +3384,13 @@ class VwWeconnect extends utils.Adapter { } if (action === "access") { //verify pin first - await this.verifySeatPin(); - body = { - currentSpin: this.config.pin, - }; - - url = "https://ola.prod.code.seat.cloud.vwgroup.com/vehicles/" + vin + "/" + action + "/requests/" + state; + secureToken = await this.verifySeatPin(); + if (!secureToken) { + reject(); + return; + } + body = {}; + url = "https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/" + vin + "/access/" + state; } request.post( @@ -3399,6 +3401,7 @@ class VwWeconnect extends utils.Adapter { "user-agent": this.userAgent, "accept-language": "de-de", authorization: "Bearer " + this.config.atoken, + SecToken: secureToken, }, data: body, followAllRedirects: true, @@ -3407,6 +3410,7 @@ class VwWeconnect extends utils.Adapter { }, (err, resp, body) => { if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Error setting status"); err && this.log.error(err); resp && this.log.error(resp.statusCode.toString()); body && this.log.error(JSON.stringify(body)); @@ -3420,7 +3424,11 @@ class VwWeconnect extends utils.Adapter { }); } async verifySeatPin() { - await axios({ + if (!this.config.pin) { + this.log.error("No pin set, please set pin in configuration"); + return; + } + return await axios({ method: "post", url: "https://ola.prod.code.seat.cloud.vwgroup.com/v2/users/" + this.seatcupraUser + "/spin/verify", headers: { @@ -3428,8 +3436,10 @@ class VwWeconnect extends utils.Adapter { accept: "*/*", authorization: "Bearer " + this.config.atoken, "accept-language": "de-DE,de;q=0.9", - "user-agent": this.userAgent, + "user-agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", "content-version": "1", + "User-ID": this.seatcupraUser, + brand: "seat", }, data: { spin: this.config.pin, @@ -3437,8 +3447,10 @@ class VwWeconnect extends utils.Adapter { }) .then((res) => { this.log.debug(JSON.stringify(res.data)); + return res.data.securityToken; }) .catch((error) => { + this.log.error("Error verifying pin"); this.log.error(error); error.response && this.log.error(JSON.stringify(error.response.data)); }); From 1d1e74d7cc0d4ece6476c7fac5809cf510f2e9bf Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 24 Feb 2025 17:41:25 +0100 Subject: [PATCH 667/729] add trips --- main.js | 65 ++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/main.js b/main.js index 0babc707..44692e10 100644 --- a/main.js +++ b/main.js @@ -340,9 +340,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get id status Failed"); }); } else if (this.config.type === "seatcupra") { - this.getSeatCupraStatus(vin).catch(() => { - this.log.error("get cupra status Failed"); - }); + this.getSeatCupraStatus(vin); } else if (this.config.type === "audidata") { this.getAudiDataStatus(vin).catch(() => { this.log.error("get audi data status Failed"); @@ -1964,10 +1962,9 @@ class VwWeconnect extends utils.Adapter { this.extractKeys(this, vin + ".general", element); this.extendObject(vin + ".remote", { - type: "state", + type: "channel", common: { - name: "Remote controls", - write: true, + name: "Remote Control", }, native: {}, }); @@ -2199,8 +2196,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote", { - type: "state", + this.extendObject(vin + ".remote", { + type: "channel", common: { name: "Remote controls", write: true, @@ -2282,7 +2279,7 @@ class VwWeconnect extends utils.Adapter { await this.extendObject(vin + ".mqtt", { type: "channel", common: { - name: "MQTT status", + name: "Live Events and Operation", role: "indicator", type: "mixed", write: false, @@ -2293,7 +2290,7 @@ class VwWeconnect extends utils.Adapter { await this.extendObject(vin + ".mqtt.events", { type: "channel", common: { - name: "MQTT Events", + name: "Live Events", role: "indicator", type: "mixed", write: false, @@ -2301,8 +2298,8 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - await this.setObjectNotExists(vin + ".remote", { - type: "state", + await this.extendObject(vin + ".remote", { + type: "channel", common: { name: "Remote controls", write: true, @@ -2430,8 +2427,8 @@ class VwWeconnect extends utils.Adapter { }); this.extractKeys(this, vin + ".general", element); - this.setObjectNotExists(vin + ".remote", { - type: "state", + this.extendObject(vin + ".remote", { + type: "channel", common: { name: "Remote controls", write: true, @@ -3298,13 +3295,28 @@ class VwWeconnect extends utils.Adapter { { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/measurements/engines`, path: "range" }, //https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/VSSZZZKM/driving-data/SHORT/last - { - url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/SHORT/last`, - path: "tripLast", - }, + //https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/VSSZZZKM/driving-data/SHORT?from=2023-02-24T13:34:52Z&to=2025-02-23T13:34:52Z ]; + if (this.config.tripShortTerm == true) { + endpoints.push({ + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/SHORT/last`, + path: "tripLast", + }); + } + if (this.config.tripLongTerm == true) { + endpoints.push({ + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/LONG/`, + path: "tripLong", + }); + } + if (this.config.tripCyclic == true) { + endpoints.push({ + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/CYCLIC/`, + path: "tripCyclic", + }); + } const headers = { accept: "*/*", "user-agent": this.userAgent, @@ -3328,7 +3340,19 @@ class VwWeconnect extends utils.Adapter { return; } } - this.json2iob.parse(vin + "." + endpoint.path, response.data); + const options = {}; + if (endpoint.path.startsWith("trip")) { + //reverse data array by tripId + if (!response.data.data) { + return; + } + response.data.data.sort((a, b) => { + return b.tripId - a.tripId; + }); + options.forceIndex = true; + options.reve; + } + this.json2iob.parse(vin + "." + endpoint.path, response.data, options); if (this.config.rawJson) { await this.setObjectNotExistsAsync(vin + "." + endpoint.path + "rawJson", { type: "state", @@ -6328,6 +6352,9 @@ class VwWeconnect extends utils.Adapter { if (id.indexOf("maxChargeCurrent.content") !== -1) { this.setState(vin + ".remote.maxChargeCurrent", state.val, true); } + if (id.indexOf(".statusv2.locked") !== -1) { + this.setState(vin + ".remote.access", state.val, true); + } if (id.indexOf("climatisationStatus.climatisationState") !== -1) { let value = false; if (state.val === "on" || state.val === "heating") { From e275964c7c090f87a6f5b872712cd2d5cb99a80e Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 24 Feb 2025 21:05:14 +0100 Subject: [PATCH 668/729] add checks --- main.js | 118 ++++++++++++++++++++++++++------------------------------ 1 file changed, 54 insertions(+), 64 deletions(-) diff --git a/main.js b/main.js index 44692e10..2969c3b2 100644 --- a/main.js +++ b/main.js @@ -1415,9 +1415,9 @@ class VwWeconnect extends utils.Adapter { if (this.refreshTokenInterval) { clearInterval(this.refreshTokenInterval); } - this.refreshTokenInterval = setInterval(() => { - this.refreshSeatCupraToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours + this.refreshTokenInterval = setInterval(async () => { + await this.refreshSeatCupraToken().catch(() => {}); + }, 0.935 * 60 * 60 * 1000); // 0.9hours resolve(); return; } @@ -3299,23 +3299,29 @@ class VwWeconnect extends utils.Adapter { //https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/VSSZZZKM/driving-data/SHORT?from=2023-02-24T13:34:52Z&to=2025-02-23T13:34:52Z ]; - if (this.config.tripShortTerm == true) { - endpoints.push({ - url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/SHORT/last`, - path: "tripLast", - }); - } - if (this.config.tripLongTerm == true) { - endpoints.push({ - url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/LONG/`, - path: "tripLong", - }); - } - if (this.config.tripCyclic == true) { - endpoints.push({ - url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/CYCLIC/`, - path: "tripCyclic", - }); + //check trip data every 60min + if (Date.now() - this.lastTripCheck > 1000 * 60 * 60) { + this.lastTripCheck = Date.now(); + if (this.config.tripShortTerm == true) { + endpoints.push({ + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/SHORT/last`, + path: "tripLast", + }); + } + if (this.config.tripLongTerm == true) { + endpoints.push({ + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/LONG/`, + path: "tripLong", + }); + } + if (this.config.tripCyclic == true) { + endpoints.push({ + url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/CYCLIC/`, + path: "tripCyclic", + }); + } + } else { + this.log.debug("Skip trip check because of last check was less than 60min ago"); } const headers = { accept: "*/*", @@ -4502,50 +4508,34 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); }); } - refreshSeatCupraToken() { - return new Promise((resolve, reject) => { - this.log.debug("Token Refresh started"); - request.post( - { - url: "https://ola.prod.code.seat.cloud.vwgroup.com/authorization/api/v1/token", - body: "client_id=" + this.clientId + "&grant_type=refresh_token&refresh_token=" + this.config.rtoken, - headers: { - accept: "*/*", - "content-type": "application/x-www-form-urlencoded; charset=utf-8", - "user-agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", - "accept-language": "de-de", - }, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.log.error("Failed refresh token. Relogin"); - - setTimeout(() => { - this.log.error("restart adapter in 10min"); - this.restart(); - }, 10 * 60 * 1000); - reject(); - return; - } - try { - this.log.debug("Token Refresh successful"); - this.config.atoken = body.access_token; - this.config.rtoken = body.refresh_token; - - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - }, - ); - }); + async refreshSeatCupraToken() { + this.log.debug("Token Refresh started"); + axios({ + method: "post", + url: "https://ola.prod.code.seat.cloud.vwgroup.com/authorization/api/v1/token", + data: `client_id=${this.clientId}&grant_type=refresh_token&refresh_token=${this.config.rtoken}`, + headers: { + accept: "*/*", + "content-type": "application/x-www-form-urlencoded; charset=utf-8", + "user-agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", + "accept-language": "de-de", + }, + }) + .then((response) => { + this.log.debug("Token Refresh successful"); + this.config.atoken = response.data.access_token; + this.config.rtoken = response.data.refresh_token; + }) + .catch((error) => { + this.log.error("Failed refresh token. Relogin"); + this.log.error(error); + error.response && this.log.error(error.response.status.toString()); + error.response && this.log.error(JSON.stringify(error.response.data)); + setTimeout(() => { + this.log.error("restart adapter in 10min"); + this.restart(); + }, 10 * 60 * 1000); + }); } getVehicleData(vin) { return new Promise((resolve, reject) => { From 9d36c494170794076612f8c03e0d6757847151b8 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 24 Feb 2025 21:09:19 +0100 Subject: [PATCH 669/729] refactor refresh token --- main.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 2969c3b2..753e313f 100644 --- a/main.js +++ b/main.js @@ -4512,13 +4512,19 @@ class VwWeconnect extends utils.Adapter { this.log.debug("Token Refresh started"); axios({ method: "post", + maxBodyLength: Infinity, url: "https://ola.prod.code.seat.cloud.vwgroup.com/authorization/api/v1/token", - data: `client_id=${this.clientId}&grant_type=refresh_token&refresh_token=${this.config.rtoken}`, headers: { - accept: "*/*", - "content-type": "application/x-www-form-urlencoded; charset=utf-8", - "user-agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", - "accept-language": "de-de", + Accept: "*/*", + "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", + Connection: "keep-alive", + "User-Agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", + "Accept-Language": "de-DE,de;q=0.9", + }, + data: { + client_id: this.clientId, + grant_type: "refresh_token", + refresh_token: this.config.rtoken, }, }) .then((response) => { From bb96bb223964ae02fa236c24bb1e41d2fb489050 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 09:15:09 +0100 Subject: [PATCH 670/729] fix slice number --- main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 753e313f..d3e045e9 100644 --- a/main.js +++ b/main.js @@ -3305,7 +3305,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.tripShortTerm == true) { endpoints.push({ url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/driving-data/SHORT/last`, - path: "tripLast", + path: "tripShort", }); } if (this.config.tripLongTerm == true) { @@ -3356,7 +3356,9 @@ class VwWeconnect extends utils.Adapter { return b.tripId - a.tripId; }); options.forceIndex = true; - options.reve; + if (this.config.numberOfTrips > 0) { + response.data.data = response.data.data.slice(0, this.config.numberOfTrips); + } } this.json2iob.parse(vin + "." + endpoint.path, response.data, options); if (this.config.rawJson) { From 03f9a50a86658eb42deba4203d12695a679cee3f Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 09:46:33 +0100 Subject: [PATCH 671/729] add config options --- io-package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/io-package.json b/io-package.json index 5f80058d..19e129fa 100644 --- a/io-package.json +++ b/io-package.json @@ -180,7 +180,10 @@ "tripType": "none", "numberOfTrips": 1, "lastTrips": true, - "lastTripDays": 30 + "lastTripDays": 30, + "tripShortTerm": false, + "tripLongTerm": false, + "tripCyclic": false }, "objects": [], "instanceObjects": [ From f893b859e94bc9cd68fb3dd0790d9163187d48a6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 11:00:25 +0100 Subject: [PATCH 672/729] fix short trip --- main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index d3e045e9..23fe67b5 100644 --- a/main.js +++ b/main.js @@ -295,13 +295,13 @@ class VwWeconnect extends utils.Adapter { this.log.info("Interval of 0 is not allowed reset to 1"); this.config.interval = 1; } - if (this.config.type === "skodae") { - // this.log.info("Parking Postion is temporary disabled for Skoda E"); - if (this.config.interval < 10) { - this.log.info("Interval under 10min is temporary not allowed for Skoda E reset to 10min"); - this.config.interval = 10; - } - } + // if (this.config.type === "skodae") { + // // this.log.info("Parking Postion is temporary disabled for Skoda E"); + // if (this.config.interval < 10) { + // this.log.info("Interval under 10min is temporary not allowed for Skoda E reset to 10min"); + // this.config.interval = 10; + // } + // } this.tripTypes = []; if (this.config.tripShortTerm == true) { @@ -3347,7 +3347,7 @@ class VwWeconnect extends utils.Adapter { } } const options = {}; - if (endpoint.path.startsWith("trip")) { + if (endpoint.path === "tripLong" || endpoint.path === "tripCyclic") { //reverse data array by tripId if (!response.data.data) { return; From 818f5b811cfd90164ffde29d320ee0ab4a99731f Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 12:41:32 +0100 Subject: [PATCH 673/729] chore: release v0.7.0 - fix for skoda and seat - State structure changed completly please delete old states under Objects --- README.md | 5 + io-package.json | 19 +- package-lock.json | 4470 ++++++--------------------------------------- package.json | 2 +- 4 files changed, 558 insertions(+), 3938 deletions(-) diff --git a/README.md b/README.md index c8d983b2..04263b2f 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,11 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.7.0 (2025-02-25) + +- fix for skoda and seat +- State structure changed completly please delete old states under Objects + ### 0.6.1 (2024-10-01) - fix for skoda login diff --git a/io-package.json b/io-package.json index 19e129fa..8a40f381 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.6.1", + "version": "0.7.0", "news": { + "0.7.0": { + "en": "fix for skoda and seat\nState structure changed completly please delete old states under Objects", + "de": "fix für skoda und seat\nStuktur des states sind komplett geändert bitte löschen Sie alte states unter Objekte", + "ru": "крепление для скоды и сиденья\nСтруктура государства изменена полностью Пожалуйста, удалите старые государства под Объекты", + "pt": "correção para skoda e assento\nEstrutura do estado mudou completamente por favor excluir estados antigos sob objetos", + "nl": "fix voor skoda en stoel\nStaat structuur volledig gewijzigd gelieve oude staten te verwijderen onder Objecten", + "fr": "fixation pour skoda et siège\nModifier complètement la structure de l'État veuillez supprimer les anciens états sous Objets", + "it": "fissaggio per skoda e sedile\nStruttura dello stato modificato completamente si prega di eliminare vecchi stati sotto Oggetti", + "es": "skoda y asiento\nLa estructura del Estado cambió completly por favor elimine viejos estados bajo objetos", + "pl": "fixed for skoda and seat\nProszę usunąć stare stany pod obiektami", + "uk": "кріплення для соди і сидіння\nДержавна структура змінилася комплетально, будь ласка, видаліть старі стани під об'єктами", + "zh-cn": "斯柯达和座位的固定\n国家结构已完全更改, 请删除对象下的旧状态" + }, "0.6.1": { "en": "fix for skoda login", "de": "fix für skoda login", @@ -53,10 +66,6 @@ "0.4.2": { "en": "Fix Volkswagen App status update and improve logging", "de": "Fix für Volkswagen App Status Update und Verbesserung der Logging Ausgabe" - }, - "0.3.6": { - "en": "Improve trip loading and fix windowheating warning", - "de": "Verbesserung der Trip Abfrage und Fix für windowheating Warnung" } }, "title": "VW Connect", diff --git a/package-lock.json b/package-lock.json index c341cb8f..22b2de9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.6.1", - "lockfileVersion": 2, + "version": "0.7.0", + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.6.1", + "version": "0.7.0", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", @@ -39,20 +39,12 @@ "node": ">=10.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.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", @@ -66,6 +58,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", @@ -89,6 +82,7 @@ "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", @@ -117,6 +111,7 @@ "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-3.7.0.tgz", "integrity": "sha512-4np4dBziwX/aNRhS/gpK8bwa0wpLe7oomzJ7YTUXf5bUtV/UTpN2a9tm5Bp7ElnisKj6N3AqHl4lVXRo4L9hYg==", "dev": true, + "license": "MIT", "dependencies": { "execa": "^5.1.1" }, @@ -129,6 +124,7 @@ "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-3.7.0.tgz", "integrity": "sha512-AlLOIjIPP42uBmvcdYkfijYDzolyY6JmfbTmdxQDBLyrgYXnuUr2GaKxbpeWSbvcAuUhNvHCAyI6LI90X3OTEg==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", @@ -143,6 +139,7 @@ "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-3.7.0.tgz", "integrity": "sha512-ZhlKGhxa71mLyYB1/ojzik2RKcSAeIjuwKzlWRd6oUvKoZPe7eAjLYneXx5viQC6tvDJE4dvN1NlkFGWsSlZYA==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1" @@ -156,6 +153,7 @@ "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" @@ -169,6 +167,7 @@ "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.2.tgz", "integrity": "sha512-ezXFyxx2irq7my3BmlBUrzT+QHNsldR9MQYkXs7uyH6lXSkudmqq5EiDW9WckT0Cj9YqIUzoOJhhnZA9M+XTvQ==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", @@ -185,6 +184,7 @@ "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.7.0.tgz", "integrity": "sha512-HLnKHr3pc6NJJ7zAa8S/SdC305oEurnkRa9XNP5F6rgrixsxUiynBVh0tpPsVsOTdndm7fNIBRfR66IGnw0cag==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0", "fs-extra": "^10.1.0", @@ -199,6 +199,7 @@ "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-manual-review/-/release-script-plugin-manual-review-3.7.0.tgz", "integrity": "sha512-lU/KJHQpYhdDcYPxiR3X5BsP9O+bNYfyP8VPE5dF9fwLgTFklbGMOhF9VjdQMiZ8Cyr7fCH7ptw+oHw+UuQutQ==", "dev": true, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0" }, @@ -211,6 +212,7 @@ "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", @@ -227,6 +229,7 @@ "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, + "license": "MIT", "dependencies": { "@alcalzone/release-script-core": "3.7.0", "alcalzone-shared": "^4.0.1", @@ -251,20 +254,37 @@ } }, "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==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "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, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@eslint-community/regexpp": { "version": "4.12.1", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", @@ -417,6 +437,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -494,9 +515,10 @@ } }, "node_modules/@iobroker/types": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-6.0.11.tgz", - "integrity": "sha512-RNDURjtL5Cm9wt6ocCqdRi86Qx1350zBIvvrJ9+Fjgasoi6cWCdoOghkwEeb95TH2j//q/uLqWwL8SZ0vxx6Kw==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-7.0.6.tgz", + "integrity": "sha512-hCAw/ICjxQ48cIAVBvBAkj2NMkBkYILNFsPLH5yhcAH+B57SldS/2uz37+8i+dFzn4GlMXC7X04flJK02kyIdw==", + "license": "MIT", "peer": true, "engines": { "node": ">=12.0.0" @@ -533,31 +555,6 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -575,19 +572,21 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.3.13", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", - "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.15.tgz", + "integrity": "sha512-QPeD8UA8axQREpgR5UTAfu2mqQmm97oUqahDtNdBcfj3qAnoXzFdQW+aNf/tD2WVXF8Fhmftxoj0eMIT++gX2w==", + "license": "MIT", "dependencies": { "asn1js": "^3.0.5", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" + "pvtsutils": "^1.3.6", + "tslib": "^2.8.1" } }, "node_modules/@peculiar/json-schema": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "license": "MIT", "dependencies": { "tslib": "^2.0.0" }, @@ -599,6 +598,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", + "license": "MIT", "dependencies": { "@peculiar/asn1-schema": "^2.3.8", "@peculiar/json-schema": "^1.1.12", @@ -680,7 +680,8 @@ "node_modules/@types/json-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", - "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", + "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", @@ -708,12 +709,6 @@ "safe-buffer": "~5.1.1" } }, - "node_modules/@types/readable-stream/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==", - "license": "MIT" - }, "node_modules/@types/ws": { "version": "8.5.14", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", @@ -753,6 +748,7 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -761,6 +757,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -777,6 +774,7 @@ "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.8.tgz", "integrity": "sha512-Rr0efCjNL9lw7miDvU8exL87Y42ehsLU2jUGNQUphhnlvxnTMrHeApWgoOSGZvsE2PhxC3KO7Z+VpQ/IbuV3aA==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -799,6 +797,7 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -808,6 +807,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -836,7 +836,8 @@ "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 + "dev": true, + "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", @@ -879,6 +880,7 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } @@ -887,6 +889,7 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "license": "BSD-3-Clause", "dependencies": { "pvtsutils": "^1.3.2", "pvutils": "^1.1.3", @@ -899,7 +902,8 @@ "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", "engines": { "node": ">=0.8" } @@ -909,6 +913,7 @@ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -925,7 +930,8 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/available-typed-arrays": { "version": "1.0.7", @@ -945,15 +951,17 @@ "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "license": "MIT" }, "node_modules/axios": { "version": "1.7.9", @@ -966,24 +974,12 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/axios/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==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "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 + "dev": true, + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", @@ -1008,15 +1004,17 @@ "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } }, "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", "engines": { "node": "*" } @@ -1051,6 +1049,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1103,7 +1102,8 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" }, "node_modules/call-bind": { "version": "1.0.8", @@ -1157,6 +1157,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1177,7 +1178,8 @@ "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "license": "Apache-2.0" }, "node_modules/chai": { "version": "4.5.0", @@ -1216,6 +1218,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1227,23 +1230,12 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chalk/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/check-error": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.2" }, @@ -1276,6 +1268,19 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -1291,6 +1296,28 @@ "node": ">=12" } }, + "node_modules/cliui/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, + "license": "MIT" + }, + "node_modules/cliui/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, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -1314,6 +1341,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1325,12 +1353,14 @@ "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 + "dev": true, + "license": "MIT" }, "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==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1347,8 +1377,9 @@ "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 + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" }, "node_modules/concat-stream": { "version": "2.0.0", @@ -1382,7 +1413,8 @@ "node_modules/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=" + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.6", @@ -1402,7 +1434,8 @@ "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -1492,10 +1525,11 @@ } }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -1507,7 +1541,8 @@ "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 + "dev": true, + "license": "MIT" }, "node_modules/define-data-property": { "version": "1.1.4", @@ -1546,7 +1581,8 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -1585,23 +1621,26 @@ "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, "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 + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" }, "node_modules/enquirer": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" @@ -1738,10 +1777,11 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1751,6 +1791,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1855,18 +1896,6 @@ } }, "node_modules/eslint-visitor-keys": { - "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" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", @@ -1879,18 +1908,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/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/espree": { "version": "10.3.0", "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", @@ -1909,19 +1926,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", @@ -1991,6 +1995,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", @@ -2012,31 +2017,36 @@ "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" }, "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "engines": [ "node >=0.6.0" - ] + ], + "license": "MIT" }, "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==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, "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==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-unique-numbers": { "version": "8.0.13", @@ -2082,6 +2092,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -2125,15 +2136,16 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "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" }, @@ -2159,13 +2171,13 @@ } }, "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -2191,22 +2203,25 @@ "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" }, "engines": { - "node": ">= 0.12" + "node": ">= 6" } }, "node_modules/fs-extra": { @@ -2214,6 +2229,7 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -2281,6 +2297,7 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -2290,22 +2307,23 @@ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "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": { - "call-bind-apply-helpers": "^1.0.1", + "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "get-proto": "^1.0.0", + "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", @@ -2336,6 +2354,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" }, @@ -2363,7 +2382,8 @@ "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } @@ -2390,16 +2410,16 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "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, "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/glob/node_modules/brace-expansion": { @@ -2461,13 +2481,15 @@ "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 + "dev": true, + "license": "MIT" }, "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 + "dev": true, + "license": "MIT" }, "node_modules/gopd": { "version": "1.2.0", @@ -2482,15 +2504,17 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "license": "ISC", "engines": { "node": ">=4" } @@ -2500,6 +2524,7 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "deprecated": "this library is no longer supported", + "license": "MIT", "dependencies": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -2525,6 +2550,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2614,7 +2640,8 @@ "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -2630,6 +2657,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" } @@ -2655,19 +2683,21 @@ "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "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==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2682,8 +2712,9 @@ "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -2836,8 +2867,9 @@ "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=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2862,6 +2894,7 @@ "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, + "license": "MIT", "engines": { "node": ">=8" } @@ -2889,6 +2922,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -2994,6 +3028,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" }, @@ -3052,7 +3087,8 @@ "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", @@ -3110,16 +3146,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, "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 + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT" }, "node_modules/jackspeak": { "version": "3.4.3", @@ -3152,6 +3196,7 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -3162,12 +3207,14 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "license": "MIT" }, "node_modules/json-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", "dependencies": { "bignumber.js": "^9.0.0" } @@ -3182,23 +3229,27 @@ "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" }, "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==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" }, "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 + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" }, "node_modules/json2iob": { "version": "2.6.17", @@ -3218,6 +3269,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -3229,6 +3281,7 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -3261,6 +3314,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -3274,6 +3328,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -3296,7 +3351,8 @@ "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 + "dev": true, + "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", @@ -3316,25 +3372,20 @@ } }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, + "license": "MIT", "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "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" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" }, "node_modules/math-intrinsics": { "version": "1.1.0", @@ -3349,12 +3400,14 @@ "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/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3363,6 +3416,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -3375,6 +3429,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" } @@ -3384,6 +3439,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3469,6 +3525,22 @@ "node": ">=10" } }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/mqtt": { "version": "5.10.3", "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.3.tgz", @@ -3512,12 +3584,6 @@ "process-nextick-args": "^2.0.1" } }, - "node_modules/mqtt/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3527,13 +3593,15 @@ "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 + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" }, "node_modules/ngeohash": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==", + "license": "MIT", "engines": { "node": ">=v0.2.0" } @@ -3567,6 +3635,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" }, @@ -3588,6 +3657,7 @@ "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "license": "Apache-2.0", "engines": { "node": "*" } @@ -3638,6 +3708,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" }, @@ -3649,17 +3720,18 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "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" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -3687,6 +3759,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -3702,6 +3775,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -3724,6 +3798,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -3736,6 +3811,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3745,6 +3821,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3766,13 +3843,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, "node_modules/path-to-regexp": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", @@ -3788,6 +3858,7 @@ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -3795,13 +3866,15 @@ "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT" }, "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 + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -3830,6 +3903,7 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -3852,33 +3926,44 @@ "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==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" }, "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } }, "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.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/pvtsutils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", - "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", "dependencies": { - "tslib": "^2.6.1" + "tslib": "^2.8.1" } }, "node_modules/pvutils": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -3996,6 +4081,7 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -4022,10 +4108,25 @@ "node": ">= 6" } }, + "node_modules/request/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "node_modules/request/node_modules/qs": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.6" } @@ -4035,6 +4136,7 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "license": "MIT", "bin": { "uuid": "bin/uuid" } @@ -4042,8 +4144,9 @@ "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=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4053,6 +4156,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -4082,30 +4186,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "license": "MIT" - }, "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" - } - ] + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/safe-push-apply": { "version": "1.0.0", @@ -4123,12 +4208,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-push-apply/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "license": "MIT" - }, "node_modules/safe-regex-test": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", @@ -4149,16 +4228,15 @@ "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.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -4227,6 +4305,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4239,6 +4318,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4319,7 +4399,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/sinon": { "version": "19.0.2", @@ -4345,6 +4426,7 @@ "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", "dev": true, + "license": "(BSD-2-Clause OR WTFPL)", "peerDependencies": { "chai": "^4.0.0", "sinon": ">=4.0.0" @@ -4360,23 +4442,12 @@ "node": ">=0.3.1" } }, - "node_modules/sinon/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/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, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -4386,6 +4457,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -4401,9 +4473,10 @@ } }, "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -4433,18 +4506,42 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string_decoder/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" + } + ], + "license": "MIT" + }, "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==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/string-width-cjs": { @@ -4463,6 +4560,42 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/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, + "license": "MIT" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.10", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", @@ -4524,6 +4657,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -4550,6 +4684,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" } @@ -4559,6 +4694,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -4567,19 +4703,16 @@ } }, "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "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, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=8" } }, "node_modules/tiny-glob": { @@ -4587,6 +4720,7 @@ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", "dev": true, + "license": "MIT", "dependencies": { "globalyzer": "0.1.0", "globrex": "^0.1.2" @@ -4609,6 +4743,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -4635,14 +4770,16 @@ } }, "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -4653,13 +4790,15 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" }, "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, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -4818,10 +4957,11 @@ "license": "MIT" }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10.0.0" } @@ -4830,6 +4970,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -4856,10 +4997,11 @@ "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -4867,15 +5009,16 @@ } }, "node_modules/webcrypto-core": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", - "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.1.tgz", + "integrity": "sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A==", + "license": "MIT", "dependencies": { - "@peculiar/asn1-schema": "^2.3.8", + "@peculiar/asn1-schema": "^2.3.13", "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.1", + "asn1js": "^3.0.5", "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" + "tslib": "^2.7.0" } }, "node_modules/which": { @@ -4883,6 +5026,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -4939,12 +5083,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-builtin-type/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "license": "MIT" - }, "node_modules/which-collection": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", @@ -4983,6 +5121,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/worker-timers": { "version": "7.1.8", "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-7.1.8.tgz", @@ -5061,6 +5209,28 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/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, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/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, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", @@ -5087,31 +5257,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/wrap-ansi/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -5154,16 +5299,11 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "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.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -5209,11 +5349,34 @@ "node": ">=10" } }, + "node_modules/yargs/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, + "license": "MIT" + }, + "node_modules/yargs/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, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "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, + "license": "MIT", "engines": { "node": ">=10" }, @@ -5221,3562 +5384,5 @@ "url": "https://github.com/sponsors/sindresorhus" } } - }, - "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.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", - "execa": "~5.0.1", - "fs-extra": "^10.1.0", - "semver": "^7.3.7", - "tiny-glob": "^0.2.9" - }, - "dependencies": { - "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": { - "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.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.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", - "enquirer": "^2.3.6", - "fs-extra": "^10.1.0", - "picocolors": "1.0.0", - "semver": "^7.5.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==", - "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==", - "dev": true, - "requires": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", - "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==", - "dev": true, - "requires": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1" - } - }, - "@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==", - "dev": true, - "requires": { - "@alcalzone/release-script-core": "3.7.0", - "fs-extra": "^10.1.0" - } - }, - "@alcalzone/release-script-plugin-iobroker": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-3.7.2.tgz", - "integrity": "sha512-ezXFyxx2irq7my3BmlBUrzT+QHNsldR9MQYkXs7uyH6lXSkudmqq5EiDW9WckT0Cj9YqIUzoOJhhnZA9M+XTvQ==", - "dev": true, - "requires": { - "@alcalzone/release-script-core": "3.7.0", - "alcalzone-shared": "^4.0.1", - "axios": "^1.6.2", - "fs-extra": "^10.1.0", - "semver": "^7.5.2" - } - }, - "@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==", - "dev": true, - "requires": { - "@alcalzone/release-script-core": "3.7.0", - "fs-extra": "^10.1.0", - "tiny-glob": "^0.2.9" - } - }, - "@alcalzone/release-script-plugin-manual-review": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-manual-review/-/release-script-plugin-manual-review-3.7.0.tgz", - "integrity": "sha512-lU/KJHQpYhdDcYPxiR3X5BsP9O+bNYfyP8VPE5dF9fwLgTFklbGMOhF9VjdQMiZ8Cyr7fCH7ptw+oHw+UuQutQ==", - "dev": true, - "requires": { - "@alcalzone/release-script-core": "3.7.0" - } - }, - "@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==", - "dev": true, - "requires": { - "@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.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.7.0", - "alcalzone-shared": "^4.0.1", - "fs-extra": "^10.1.0", - "semver": "^7.5.2", - "tiny-glob": "^0.2.9" - } - }, - "@babel/runtime": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", - "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", - "requires": { - "regenerator-runtime": "^0.14.0" - } - }, - "@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.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true - }, - "@eslint/config-array": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", - "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", - "dev": true, - "requires": { - "@eslint/object-schema": "^2.1.6", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - } - }, - "@eslint/core": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", - "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.15" - } - }, - "@eslint/eslintrc": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz", - "integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true - } - } - }, - "@eslint/js": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", - "integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", - "dev": true - }, - "@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", - "dev": true - }, - "@eslint/plugin-kit": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", - "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", - "dev": true, - "requires": { - "@eslint/core": "^0.12.0", - "levn": "^0.4.1" - } - }, - "@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true - }, - "@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, - "requires": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "dependencies": { - "@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true - } - } - }, - "@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/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", - "dev": true - }, - "@iobroker/adapter-core": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.3.tgz", - "integrity": "sha512-ktk2KGexzOAbUZpkv/9JATJvO2DUHIfQAWhtpRjLxcR3+hs5/73hvt46XPSqwSpY/wnw5+E7kM7BqkfN7G19IQ==", - "requires": {} - }, - "@iobroker/testing": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-5.0.3.tgz", - "integrity": "sha512-vPEtxVzOFTcgNKGGsInzV5Q61OHuKst7iJWN7vnr5jETk1l5W4lRnSI/AoiaSO34vINknyyOiXm7ZRcDjoy7ag==", - "dev": true, - "requires": { - "alcalzone-shared": "~5.0.0", - "chai": "^4.5.0", - "chai-as-promised": "^7.1.2", - "debug": "^4.4.0", - "fs-extra": "^11.3.0", - "mocha": "^11.0.1", - "sinon": "^19.0.2", - "sinon-chai": "^3.7.0" - }, - "dependencies": { - "alcalzone-shared": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-5.0.0.tgz", - "integrity": "sha512-X73hgVWcrIKUUB6jZgHj5flRbTft8AAoJ2MqRKEcAX1whW3OeGkxsQ6ol4nd4/rKxd1eoCRXUGW3cIhXrXU4Sg==", - "dev": true - }, - "fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - } - } - }, - "@iobroker/types": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-6.0.11.tgz", - "integrity": "sha512-RNDURjtL5Cm9wt6ocCqdRi86Qx1350zBIvvrJ9+Fjgasoi6cWCdoOghkwEeb95TH2j//q/uLqWwL8SZ0vxx6Kw==", - "peer": true - }, - "@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "requires": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "@peculiar/asn1-schema": { - "version": "2.3.13", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", - "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", - "requires": { - "asn1js": "^3.0.5", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" - } - }, - "@peculiar/json-schema": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", - "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", - "requires": { - "tslib": "^2.0.0" - } - }, - "@peculiar/webcrypto": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", - "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", - "requires": { - "@peculiar/asn1-schema": "^2.3.8", - "@peculiar/json-schema": "^1.1.12", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2", - "webcrypto-core": "^1.8.0" - } - }, - "@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true - }, - "@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - }, - "dependencies": { - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - } - } - }, - "@sinonjs/fake-timers": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", - "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^3.0.1" - } - }, - "@sinonjs/samsam": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz", - "integrity": "sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^3.0.1", - "lodash.get": "^4.4.2", - "type-detect": "^4.1.0" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", - "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", - "dev": true - }, - "@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "@types/json-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", - "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==" - }, - "@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "@types/node": { - "version": "22.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", - "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", - "requires": { - "undici-types": "~6.20.0" - } - }, - "@types/readable-stream": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz", - "integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==", - "requires": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "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==" - } - } - }, - "@types/ws": { - "version": "8.5.14", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", - "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", - "requires": { - "@types/node": "*" - } - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "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, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "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.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" - } - }, - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - }, - "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 - }, - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "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-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "requires": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - } - }, - "arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "requires": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - } - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "requires": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "requires": { - "possible-typed-array-names": "^1.0.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", - "requires": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - }, - "dependencies": { - "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==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "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 - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" - }, - "binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true - }, - "bl": { - "version": "6.0.19", - "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.19.tgz", - "integrity": "sha512-4Ay3A3oDfGg3GGirhl4s62ebtnk0pJZA5mLp672MPKOQXsWvXjEF4dqdXySjJIs7b9OVr/O8aOo0Lm+xdjo2JA==", - "requires": { - "@types/readable-stream": "^4.0.0", - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^4.2.0" - } - }, - "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.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "requires": { - "fill-range": "^7.1.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "requires": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - } - }, - "call-bind-apply-helpers": { - "version": "1.0.2", - "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": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - } - }, - "call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", - "requires": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chai": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.1.0" - } - }, - "chai-as-promised": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", - "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", - "dev": true, - "requires": { - "check-error": "^1.0.2" - } - }, - "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" - }, - "dependencies": { - "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" - } - } - } - }, - "check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "requires": { - "get-func-name": "^2.0.2" - } - }, - "chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "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, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.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 - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commist": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/commist/-/commist-3.2.0.tgz", - "integrity": "sha512-4PIMoPniho+LqXmpS5d3NuGYncG6XWlkBSVGiWycL22dd42OYdUGil2CWuzklaJoNxyxUSpO4MKIBU94viWNAw==" - }, - "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": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "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=" - }, - "cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - } - }, - "data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - } - }, - "data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "requires": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - } - }, - "debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "requires": { - "ms": "^2.1.3" - } - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "requires": { - "type-detect": "^4.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 - }, - "define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "requires": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - } - }, - "define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "requires": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true - }, - "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" - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "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 - }, - "enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - } - }, - "es-abstract": { - "version": "1.23.9", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", - "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", - "requires": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.0", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-regex": "^1.2.1", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.0", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.18" - } - }, - "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" - } - }, - "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==", - "requires": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - } - }, - "es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", - "requires": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "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": "9.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", - "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.2", - "@eslint/core": "^0.12.0", - "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "9.21.0", - "@eslint/plugin-kit": "^0.2.7", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true - }, - "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" - } - } - } - }, - "eslint-plugin-promise": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz", - "integrity": "sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.4.0" - } - }, - "eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-visitor-keys": { - "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": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", - "dev": true, - "requires": { - "acorn": "^8.14.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true - } - } - }, - "esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "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 - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" - }, - "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" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "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==" - }, - "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==" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fast-unique-numbers": { - "version": "8.0.13", - "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-8.0.13.tgz", - "integrity": "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g==", - "requires": { - "@babel/runtime": "^7.23.8", - "tslib": "^2.6.2" - } - }, - "file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "requires": { - "flat-cache": "^4.0.0" - } - }, - "fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "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": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "requires": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - } - }, - "flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true - }, - "follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" - }, - "for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "requires": { - "is-callable": "^1.2.7" - } - }, - "foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "dependencies": { - "signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true - } - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs-extra": { - "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", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" - }, - "function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - } - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" - }, - "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-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true - }, - "get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "requires": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "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": { - "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 - }, - "get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "requires": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", - "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", - "dev": true - }, - "globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "requires": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - } - }, - "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 - }, - "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.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==" - }, - "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-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "requires": { - "es-define-property": "^1.0.0" - } - }, - "has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "requires": { - "dunder-proto": "^1.0.0" - } - }, - "has-symbols": { - "version": "1.1.0", - "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==", - "requires": { - "has-symbols": "^1.0.3" - } - }, - "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" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "help-me": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", - "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "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 - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "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": { - "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 - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "requires": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - } - }, - "is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - } - }, - "is-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "requires": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - } - }, - "is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "requires": { - "has-bigints": "^1.0.2" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "requires": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - } - }, - "is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" - }, - "is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "requires": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - } - }, - "is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "requires": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "requires": { - "call-bound": "^1.0.3" - } - }, - "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-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", - "requires": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - } - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "requires": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - } - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "requires": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - } - }, - "is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==" - }, - "is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "requires": { - "call-bound": "^1.0.3" - } - }, - "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 - }, - "is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "requires": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - } - }, - "is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "requires": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - } - }, - "is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "requires": { - "which-typed-array": "^1.1.16" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==" - }, - "is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "requires": { - "call-bound": "^1.0.3" - } - }, - "is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "requires": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "requires": { - "@isaacs/cliui": "^8.0.2", - "@pkgjs/parseargs": "^0.11.0" - } - }, - "js-sdsl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", - "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==" - }, - "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" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "requires": { - "bignumber.js": "^9.0.0" - } - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "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==" - }, - "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 - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json2iob": { - "version": "2.6.17", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.17.tgz", - "integrity": "sha512-6TUZaIgNyrQ+NvfMXu3i3JanjWtps0AHNFWJmx2LsC/2q1Zxfw9RS+D363fx5rL4v1FXBREaLWQ/dGWnaQ7MFg==", - "requires": { - "@types/json-bigint": "^1.0.4", - "json-bigint": "^1.0.0" - } - }, - "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" - } - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "just-extend": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", - "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", - "dev": true - }, - "keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "requires": { - "json-buffer": "3.0.1" - } - }, - "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" - } - }, - "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.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, - "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 - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } - }, - "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", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" - }, - "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 - }, - "mime-db": { - "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.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.52.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 - }, - "minimatch": { - "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" - } - }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" - }, - "minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true - }, - "mocha": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.1.0.tgz", - "integrity": "sha512-8uJR5RTC2NgpY3GrYcgpZrsEd9zKbPDpob1RezyR2upGHRQtHWofmzTMzTMSV6dru3tj5Ukt0+Vnq1qhFEEwAg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.3", - "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", - "debug": "^4.3.5", - "diff": "^5.2.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", - "ms": "^2.1.3", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^6.5.1", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1", - "yargs-unparser": "^2.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "mqtt": { - "version": "5.10.3", - "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.3.tgz", - "integrity": "sha512-hA/6YrUS4fywhBGCjH/XXUuLeueJiPqruVVWjK2A24Ma4KcWfZ/x8x07aoesBV+HXDWBC08tbT4IWfSXNW0Jtw==", - "requires": { - "@types/readable-stream": "^4.0.5", - "@types/ws": "^8.5.9", - "commist": "^3.2.0", - "concat-stream": "^2.0.0", - "debug": "^4.3.4", - "help-me": "^5.0.0", - "lru-cache": "^10.0.1", - "minimist": "^1.2.8", - "mqtt-packet": "^9.0.1", - "number-allocator": "^1.0.14", - "readable-stream": "^4.4.2", - "reinterval": "^1.1.0", - "rfdc": "^1.3.0", - "split2": "^4.2.0", - "worker-timers": "^7.1.4", - "ws": "^8.17.1" - }, - "dependencies": { - "lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" - } - } - }, - "mqtt-packet": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.1.tgz", - "integrity": "sha512-koZF1V/X2RZUI6uD9wN5OK1JxxcG1ofAR4H3LjCw1FkeKzruZQ26aAA6v2m1lZyWONZIR5wMMJFrZJDRNzbiQw==", - "requires": { - "bl": "^6.0.8", - "debug": "^4.3.4", - "process-nextick-args": "^2.0.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "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 - }, - "ngeohash": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/ngeohash/-/ngeohash-0.6.3.tgz", - "integrity": "sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw==" - }, - "nise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", - "integrity": "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g==", - "dev": true, - "requires": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.1", - "@sinonjs/text-encoding": "^0.7.3", - "just-extend": "^6.2.0", - "path-to-regexp": "^8.1.0" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "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" - } - }, - "number-allocator": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/number-allocator/-/number-allocator-1.0.14.tgz", - "integrity": "sha512-OrL44UTVAvkKdOdRQZIJpLkAdjXGTRda052sN4sO77bKEzYYqWKMBjQvrJFzqygI99gL6Z4u2xctPW1tB8ErvA==", - "requires": { - "debug": "^4.3.1", - "js-sdsl": "4.3.0" - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^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" - } - }, - "optionator": { - "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" - } - }, - "own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "requires": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - } - }, - "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" - } - }, - "package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true - }, - "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" - } - }, - "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-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-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "requires": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true - } - } - }, - "path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", - "dev": true - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "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.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==" - }, - "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": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" - }, - "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-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==" - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "pvtsutils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", - "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", - "requires": { - "tslib": "^2.6.1" - } - }, - "pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" - }, - "qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "requires": { - "side-channel": "^1.1.0" - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "readable-stream": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", - "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", - "requires": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "requires": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - } - }, - "regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" - }, - "regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "requires": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - } - }, - "reinterval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", - "integrity": "sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ==" - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, - "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 - }, - "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 - }, - "rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==" - }, - "safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - } - } - }, - "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==" - }, - "safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "requires": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - } - } - }, - "safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "requires": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "requires": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - } - }, - "set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "requires": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - } - }, - "set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "requires": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - } - }, - "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 - }, - "side-channel": { - "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": { - "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": { - "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 - }, - "sinon": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-19.0.2.tgz", - "integrity": "sha512-euuToqM+PjO4UgXeLETsfQiuoyPXlqFezr6YZDFwHR3t4qaX0fZUe1MfPMznTL5f8BWrVS89KduLdMUsxFCO6g==", - "dev": true, - "requires": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.2", - "@sinonjs/samsam": "^8.0.1", - "diff": "^7.0.0", - "nise": "^6.1.1", - "supports-color": "^7.2.0" - }, - "dependencies": { - "diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "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" - } - } - } - }, - "sinon-chai": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", - "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", - "dev": true, - "requires": {} - }, - "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.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", - "source-map": "^0.6.0" - } - }, - "split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==" - }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "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, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "string-width-cjs": { - "version": "npm:string-width@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.1" - } - }, - "string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - } - }, - "string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", - "requires": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - } - }, - "string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "requires": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - } - }, - "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, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-ansi-cjs": { - "version": "npm:strip-ansi@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.1" - } - }, - "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 - }, - "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": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "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", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "traverse": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.11.tgz", - "integrity": "sha512-vxXDZg8/+p3gblxB6BhhG5yWVn1kGRlaL8O78UDXc3wRnPizB5g83dcvWV1jpDMIPnjZjOFuxlMmE82XJ4407w==", - "requires": { - "gopd": "^1.2.0", - "typedarray.prototype.slice": "^1.0.5", - "which-typed-array": "^1.1.18" - } - }, - "tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "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-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true - }, - "typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "requires": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - } - }, - "typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "requires": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - } - }, - "typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "requires": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - } - }, - "typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", - "requires": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" - }, - "typedarray.prototype.slice": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.5.tgz", - "integrity": "sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==", - "requires": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "math-intrinsics": "^1.1.0", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-offset": "^1.0.4" - } - }, - "typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "dev": true - }, - "unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "requires": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - } - }, - "undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "uuid": { - "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==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "webcrypto-core": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", - "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", - "requires": { - "@peculiar/asn1-schema": "^2.3.8", - "@peculiar/json-schema": "^1.1.12", - "asn1js": "^3.0.1", - "pvtsutils": "^1.3.5", - "tslib": "^2.6.2" - } - }, - "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" - } - }, - "which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "requires": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - } - }, - "which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "requires": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - } - } - }, - "which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "requires": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - } - }, - "which-typed-array": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", - "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", - "requires": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - } - }, - "worker-timers": { - "version": "7.1.8", - "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-7.1.8.tgz", - "integrity": "sha512-R54psRKYVLuzff7c1OTFcq/4Hue5Vlz4bFtNEIarpSiCYhpifHU3aIQI29S84o1j87ePCYqbmEJPqwBTf+3sfw==", - "requires": { - "@babel/runtime": "^7.24.5", - "tslib": "^2.6.2", - "worker-timers-broker": "^6.1.8", - "worker-timers-worker": "^7.0.71" - } - }, - "worker-timers-broker": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-6.1.8.tgz", - "integrity": "sha512-FUCJu9jlK3A8WqLTKXM9E6kAmI/dR1vAJ8dHYLMisLNB/n3GuaFIjJ7pn16ZcD1zCOf7P6H62lWIEBi+yz/zQQ==", - "requires": { - "@babel/runtime": "^7.24.5", - "fast-unique-numbers": "^8.0.13", - "tslib": "^2.6.2", - "worker-timers-worker": "^7.0.71" - } - }, - "worker-timers-worker": { - "version": "7.0.71", - "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-7.0.71.tgz", - "integrity": "sha512-ks/5YKwZsto1c2vmljroppOKCivB/ma97g9y77MAAz2TBBjPPgpoOiS1qYQKIgvGTr2QYPT3XhJWIB6Rj2MVPQ==", - "requires": { - "@babel/runtime": "^7.24.5", - "tslib": "^2.6.2" - } - }, - "workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true - }, - "wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true - }, - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "wrap-ansi-cjs": { - "version": "npm:wrap-ansi@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", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", - "requires": {} - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "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.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "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.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - } - }, - "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 59746ce1..ba4195fc 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.6.1" + "version": "0.7.0" } From 5726dde999051553d4573c330a7c1f489077ef3c Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 13:00:06 +0100 Subject: [PATCH 674/729] test is moving --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index 23fe67b5..85a2fa0b 100644 --- a/main.js +++ b/main.js @@ -3648,6 +3648,9 @@ class VwWeconnect extends utils.Adapter { path += "." + status.postfix.replace("/", ""); } } + if (path === "position") { + this.setIsCarMoving(vin, res.response.status === 204); + } this.log.debug(path); this.extractKeys(this, path, res.data); this.etags[url] = res.headers.etag; From f3116027066f9e5db85ae9957e38e849ca71e95d Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 13:02:34 +0100 Subject: [PATCH 675/729] add is car moving --- main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 85a2fa0b..fded45d7 100644 --- a/main.js +++ b/main.js @@ -3639,6 +3639,7 @@ class VwWeconnect extends utils.Adapter { }) .then(async (res) => { this.log.debug(JSON.stringify(res.data)); + let path; if (status.name) { path = vin + ".status." + status.name; @@ -3648,10 +3649,12 @@ class VwWeconnect extends utils.Adapter { path += "." + status.postfix.replace("/", ""); } } + + this.log.debug(path); + this.log.debug(res.status); if (path === "position") { - this.setIsCarMoving(vin, res.response.status === 204); + this.setIsCarMoving(vin, res.status === 204); } - this.log.debug(path); this.extractKeys(this, path, res.data); this.etags[url] = res.headers.etag; if (this.config.rawJson) { From d0ab4a5077b60ebbf344924488bc72a2e9ec97a8 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 13:04:07 +0100 Subject: [PATCH 676/729] add refresh remote --- main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.js b/main.js index fded45d7..4cffbecf 100644 --- a/main.js +++ b/main.js @@ -2306,6 +2306,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.refresh", { + type: "state", + common: { + name: "Refresh Data from Server", + type: "boolean", + role: "boolean", + write: true, + }, + native: {}, + }); this.setObjectNotExists(vin + ".remote.charging", { type: "state", common: { From 11877635b55a0dbfdaa1b2764a424544c3d4ae7f Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 14:30:22 +0100 Subject: [PATCH 677/729] fix folder --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 4cffbecf..634aea91 100644 --- a/main.js +++ b/main.js @@ -3663,7 +3663,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(path); this.log.debug(res.status); if (path === "position") { - this.setIsCarMoving(vin, res.status === 204); + this.setIsCarMoving(vin, res.status === 204, ".status"); } this.extractKeys(this, path, res.data); this.etags[url] = res.headers.etag; @@ -5156,8 +5156,8 @@ class VwWeconnect extends utils.Adapter { } } - async setIsCarMoving(vin, isMoving) { - await this.setObjectNotExistsAsync(vin + ".position.isMoving", { + async setIsCarMoving(vin, isMoving, statusFolder) { + await this.setObjectNotExistsAsync(vin + statusFolder + ".position.isMoving", { type: "state", common: { name: "is car moving", From cab9b4493463314452f2f5dc5da2125559710d7c Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 16:33:10 +0100 Subject: [PATCH 678/729] update error --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 634aea91..f485253d 100644 --- a/main.js +++ b/main.js @@ -796,7 +796,7 @@ class VwWeconnect extends utils.Adapter { } else { this.log.debug(body); this.log.warn( - "No Token received visiting url and accept the permissions or login and accept", + "No Token received visiting url and accept the permissions or login in the App and accept manually", ); this.log.info(getRequest.uri.href); const form = this.extractHidden(body); @@ -824,7 +824,7 @@ class VwWeconnect extends utils.Adapter { this.getTokens(getRequest, code_verifier, reject, resolve); } else { this.log.error( - "No Token received. Please try to logout and login in the VW app or select type VWv2 in the settings", + "No Token received. Please try to logout and login in the latest MySkoda or MySeat App", ); try { this.log.debug(JSON.stringify(body)); From 3591812655a9b9d8d868bc77d14c673bdc250668 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 17:28:46 +0100 Subject: [PATCH 679/729] add target temp --- main.js | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index f485253d..c4c76ff7 100644 --- a/main.js +++ b/main.js @@ -864,7 +864,6 @@ class VwWeconnect extends utils.Adapter { }); } async cleanObjects(vin) { - //vw-connect.0.WVWZZZAUZL8908723.general.systemId let remoteState = await this.getObjectAsync(vin + ".general.systemId"); if (remoteState) { this.log.info("clean old states" + vin); @@ -875,6 +874,13 @@ class VwWeconnect extends utils.Adapter { this.log.info("clean old states" + vin); await this.delObjectAsync(vin, { recursive: true }); } + if (this.config.type === "seatcupra") { + remoteState = await this.getObjectAsync(vin + ".remote.targetTemperatureInCelsius"); + if (!remoteState) { + this.log.info("clean old states" + vin); + await this.delObjectAsync(vin, { recursive: true }); + } + } } updateStatus() { if (this.config.type === "go") { @@ -2175,7 +2181,7 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "seatcupra") { this.log.info("Found " + body.vehicles.length + " vehicles"); - + await this.cleanObjects(vin); for (const element of body.vehicles) { const vin = element.vin; if (!vin) { @@ -2247,6 +2253,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.setObjectNotExists(vin + ".remote.targetTemperatureInCelsius", { + type: "state", + common: { + name: "Air-conditioning Temp in Celsius", + type: "number", + role: "value.temperature", + write: true, + }, + native: {}, + }); } resolve(); return; @@ -3435,6 +3451,15 @@ class VwWeconnect extends utils.Adapter { url = "https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/" + vin + "/access/" + state; } + if (action === "targetTemperatureInCelsius") { + body = { + targetTemperatureUnit: "celsius", + climatisationWithoutExternalPower: true, + targetTemperature: state, + }; + + url = `https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/${vin}/climatisation/settings`; + } request.post( { url: url, @@ -5972,6 +5997,12 @@ class VwWeconnect extends utils.Adapter { }); return; } + if (this.config.type === "seatcupra") { + this.setSeatCupraStatus(vin, action, state.val).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } } if ( action === "climatisation" || From eb077eaf88325db1d31d6217b86157b0fb9dec13 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 17:30:20 +0100 Subject: [PATCH 680/729] fix typo --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index c4c76ff7..f15d1260 100644 --- a/main.js +++ b/main.js @@ -2181,9 +2181,10 @@ class VwWeconnect extends utils.Adapter { } if (this.config.type === "seatcupra") { this.log.info("Found " + body.vehicles.length + " vehicles"); - await this.cleanObjects(vin); + for (const element of body.vehicles) { const vin = element.vin; + await this.cleanObjects(vin); if (!vin) { this.log.info("No vin found for:" + JSON.stringify(element)); return; From f7bf1d465124f0b594f021a6f2bce4f2e0917530 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Feb 2025 21:01:02 +0100 Subject: [PATCH 681/729] fix unlock --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index f15d1260..14f45693 100644 --- a/main.js +++ b/main.js @@ -3794,7 +3794,7 @@ class VwWeconnect extends utils.Adapter { body = { currentSpin: this.config.pin, }; - url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/" + vin + "/" + action; + url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/" + vin + "/" + value; } if (action === "maxChargeCurrent") { From 1e0d840fe135efe9a62c58113ffd239ee6805d76 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 26 Feb 2025 09:35:49 +0100 Subject: [PATCH 682/729] chore: release v0.7.1 - fix for seat setTemperature - fix for Skoda unlock lock --- README.md | 6 ++++++ io-package.json | 19 ++++++++++++----- main.js | 52 +++++++++++++++++++++++------------------------ package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 48 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 04263b2f..7e094b13 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ You can set climatisaton temperature in ``` ## Changelog + +### 0.7.1 (2025-02-26) + +- fix for set setTemperature +- fix for Skoda unlock lock + ### 0.7.0 (2025-02-25) - fix for skoda and seat diff --git a/io-package.json b/io-package.json index 8a40f381..47ea96b5 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.0", + "version": "0.7.1", "news": { + "0.7.1": { + "en": "fix for set setTemperature\nfix for Skoda unlock lock", + "de": "Fix für setzen setTemperature\nFix für Skoda unlock lock", + "ru": "фиксация для установки сиденья Температура\nобсуждение Skoda unlock lock", + "pt": "correção para setTemperature\ncorreção para bloqueio de desbloqueio Skoda", + "nl": "fix voor stoelsetTemperatuur\nfix voor Skoda ontgrendelen slot", + "fr": "fixation pour le jeu de sièges\ncorrection pour le verrouillage Skoda", + "it": "fissaggio per set sedile\nfissaggio per blocco Skoda sbloccaggio", + "es": "fijado para el asientoTemperatura\nfijado para Skoda desbloquear", + "pl": "fix for seat Temperatura\nfix dla blokady odblokowania Skoda", + "uk": "кріплення для сидіння SetTemperature\nзамка для розблокування Skoda", + "zh-cn": "固定座位设置\n修复 Skoda 解锁" + }, "0.7.0": { "en": "fix for skoda and seat\nState structure changed completly please delete old states under Objects", "de": "fix für skoda und seat\nStuktur des states sind komplett geändert bitte löschen Sie alte states unter Objekte", @@ -62,10 +75,6 @@ "0.5.1": { "en": "Fix for SkodaE. Temporary disabled parking position and set min interval to 10min", "de": "Fix für SkodaE. Parking Position und ein Update Interval unter 10min ist zur Zeit deaktiviert für SkodaE" - }, - "0.4.2": { - "en": "Fix Volkswagen App status update and improve logging", - "de": "Fix für Volkswagen App Status Update und Verbesserung der Logging Ausgabe" } }, "title": "VW Connect", diff --git a/main.js b/main.js index 14f45693..60e7d4a2 100644 --- a/main.js +++ b/main.js @@ -3461,34 +3461,32 @@ class VwWeconnect extends utils.Adapter { url = `https://ola.prod.code.seat.cloud.vwgroup.com/v2/vehicles/${vin}/climatisation/settings`; } - request.post( - { - url: url, - headers: { - accept: "*/*", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - SecToken: secureToken, - }, - data: body, - followAllRedirects: true, - gzip: true, - json: true, + axios({ + method: "post", + url: url, + headers: { + accept: "*/*", + "user-agent": "SEATApp/2.5.0 (com.seat.myseat.ola; build:202410171614; iOS 15.8.3) Alamofire/5.7.0 Mobile", + "accept-language": "de-de", + authorization: "Bearer " + this.config.atoken, + "content-type": "application/json", + "User-ID": this.seatcupraUser, + SecToken: secureToken, + "app-brand": "seat", }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Error setting status"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - reject(); - return; - } - this.log.info(JSON.stringify(body)); + data: body, + }) + .then((response) => { + this.log.info(JSON.stringify(response.data)); resolve(); - }, - ); + }) + .catch((error) => { + this.log.error("Error setting status"); + this.log.error(error); + error.response && this.log.error(error.response.status.toString()); + error.response && this.log.error(JSON.stringify(error.response.data)); + reject(); + }); }); } async verifySeatPin() { @@ -3794,7 +3792,7 @@ class VwWeconnect extends utils.Adapter { body = { currentSpin: this.config.pin, }; - url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/" + vin + "/" + value; + url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/" + vin + "/" + action; } if (action === "maxChargeCurrent") { diff --git a/package-lock.json b/package-lock.json index 22b2de9a..df353d77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.0", + "version": "0.7.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.0", + "version": "0.7.1", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index ba4195fc..a67f2e53 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.0" + "version": "0.7.1" } From 651db79ab6ebd5773e3d97e83f4db8880de42469 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 26 Feb 2025 11:29:47 +0100 Subject: [PATCH 683/729] fix status name test --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 60e7d4a2..e385b0d4 100644 --- a/main.js +++ b/main.js @@ -3686,7 +3686,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug(path); this.log.debug(res.status); - if (path === "position") { + if (status.name === "position") { this.setIsCarMoving(vin, res.status === 204, ".status"); } this.extractKeys(this, path, res.data); From 0208db3e6303353a0ad477ad77fc72df6973d9b0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 26 Feb 2025 13:37:02 +0100 Subject: [PATCH 684/729] fix for ismoving --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index e385b0d4..66a4fab8 100644 --- a/main.js +++ b/main.js @@ -5181,6 +5181,9 @@ class VwWeconnect extends utils.Adapter { } async setIsCarMoving(vin, isMoving, statusFolder) { + if (!statusFolder) { + statusFolder = ""; + } await this.setObjectNotExistsAsync(vin + statusFolder + ".position.isMoving", { type: "state", common: { From 8c823db7ea5882fa040106d6c8efbb77b4f073d1 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 26 Feb 2025 13:37:55 +0100 Subject: [PATCH 685/729] chore: release v0.7.2 - fix for set setTemperature - fix for Skoda unlock lock --- README.md | 3 +-- io-package.json | 26 +++++++++++--------------- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 7e094b13..1ad558e9 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,7 @@ You can set climatisaton temperature in ``` ## Changelog - -### 0.7.1 (2025-02-26) +### 0.7.2 (2025-02-26) - fix for set setTemperature - fix for Skoda unlock lock diff --git a/io-package.json b/io-package.json index 47ea96b5..c9a13e6d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,20 +1,20 @@ { "common": { "name": "vw-connect", - "version": "0.7.1", + "version": "0.7.2", "news": { - "0.7.1": { + "0.7.2": { "en": "fix for set setTemperature\nfix for Skoda unlock lock", - "de": "Fix für setzen setTemperature\nFix für Skoda unlock lock", - "ru": "фиксация для установки сиденья Температура\nобсуждение Skoda unlock lock", + "de": "Fix für set setTemperature\nFix für Skoda unlock lock", + "ru": "фиксация для set set Температура\nобсуждение Skoda unlock lock", "pt": "correção para setTemperature\ncorreção para bloqueio de desbloqueio Skoda", - "nl": "fix voor stoelsetTemperatuur\nfix voor Skoda ontgrendelen slot", - "fr": "fixation pour le jeu de sièges\ncorrection pour le verrouillage Skoda", - "it": "fissaggio per set sedile\nfissaggio per blocco Skoda sbloccaggio", - "es": "fijado para el asientoTemperatura\nfijado para Skoda desbloquear", - "pl": "fix for seat Temperatura\nfix dla blokady odblokowania Skoda", - "uk": "кріплення для сидіння SetTemperature\nзамка для розблокування Skoda", - "zh-cn": "固定座位设置\n修复 Skoda 解锁" + "nl": "fix voor setTemperatuur\nfix voor Skoda ontgrendelen slot", + "fr": "fix pour setTemperature\ncorrection pour le verrouillage Skoda", + "it": "fix per setTemperature\nfissaggio per blocco Skoda sbloccaggio", + "es": "fijado para el setTemperatura\nfijado para Skoda desbloquear", + "pl": "fix for set setTemperatura\nfix dla blokady odblokowania Skoda", + "uk": "кріплення для комплектуTemperature\nзамка для розблокування Skoda", + "zh-cn": "设定的固定\n修复 Skoda 解锁" }, "0.7.0": { "en": "fix for skoda and seat\nState structure changed completly please delete old states under Objects", @@ -71,10 +71,6 @@ "0.5.3": { "en": "Fix for SkodaE update", "de": "Fix für SkodaE Update" - }, - "0.5.1": { - "en": "Fix for SkodaE. Temporary disabled parking position and set min interval to 10min", - "de": "Fix für SkodaE. Parking Position und ein Update Interval unter 10min ist zur Zeit deaktiviert für SkodaE" } }, "title": "VW Connect", diff --git a/package-lock.json b/package-lock.json index df353d77..050e5fea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.1", + "version": "0.7.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.1", + "version": "0.7.2", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index a67f2e53..c061be20 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.1" + "version": "0.7.2" } From 31b4c46723e0273822550fa9053437c731866082 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 26 Feb 2025 15:07:53 +0100 Subject: [PATCH 686/729] fix path --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 66a4fab8..b98a6a4a 100644 --- a/main.js +++ b/main.js @@ -5195,7 +5195,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - await this.setStateAsync(vin + ".position.isMoving", isMoving, true); + await this.setStateAsync(vin + statusFolder + ".position.isMoving", isMoving, true); } async setIsCarLocked(vin, value) { From d9c88bc74ab019c76473b9b29ccd71c01a87d4ec Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 26 Feb 2025 15:08:27 +0100 Subject: [PATCH 687/729] chore: release v0.7.3 - fix for set setTemperature - fix for Skoda unlock lock --- README.md | 2 +- io-package.json | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1ad558e9..afb325d2 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ You can set climatisaton temperature in ``` ## Changelog -### 0.7.2 (2025-02-26) +### 0.7.3 (2025-02-26) - fix for set setTemperature - fix for Skoda unlock lock diff --git a/io-package.json b/io-package.json index c9a13e6d..416add3f 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.7.2", + "version": "0.7.3", "news": { - "0.7.2": { + "0.7.3": { "en": "fix for set setTemperature\nfix for Skoda unlock lock", "de": "Fix für set setTemperature\nFix für Skoda unlock lock", "ru": "фиксация для set set Температура\nобсуждение Skoda unlock lock", diff --git a/package-lock.json b/package-lock.json index 050e5fea..5ed2c739 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.2", + "version": "0.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.2", + "version": "0.7.3", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index c061be20..7640ffda 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.2" + "version": "0.7.3" } From f8e9ca25a66c795eac878223ac726e01ea134d87 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Feb 2025 01:08:38 +0100 Subject: [PATCH 688/729] remov etag --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index b98a6a4a..ada17d0b 100644 --- a/main.js +++ b/main.js @@ -3661,7 +3661,6 @@ class VwWeconnect extends utils.Adapter { accept: "application/json", "user-agent": this.skodaUserAgent, "accept-language": "de-de", - "If-None-Match": this.etags[url] || "", authorization: "Bearer " + this.config.atoken, }; From 93ac041a02280823bed8deb0b8d64a8ba508d27f Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Feb 2025 10:53:52 +0100 Subject: [PATCH 689/729] move to json2iob --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index ada17d0b..e3f84b15 100644 --- a/main.js +++ b/main.js @@ -2863,7 +2863,7 @@ class VwWeconnect extends utils.Adapter { try { const options = { forceIndex: true, - deleteBeforeUpdate: true, + // deleteBeforeUpdate: true, }; const data = JSON.parse(message.toString()); const formattedData = data; @@ -3688,7 +3688,7 @@ class VwWeconnect extends utils.Adapter { if (status.name === "position") { this.setIsCarMoving(vin, res.status === 204, ".status"); } - this.extractKeys(this, path, res.data); + this.json2iob.parse(path, res.data); this.etags[url] = res.headers.etag; if (this.config.rawJson) { await this.setObjectNotExistsAsync(path + "rawJson", { @@ -3727,7 +3727,7 @@ class VwWeconnect extends utils.Adapter { return; } if (error.response.status === 404 || error.response.status === 403) { - this.log.info("Vehicle is not supporting " + status.path + " " + status.postfix); + this.log.debug("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; } From 722d6da2746da833b5128bdd830f62cad8fcc537 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Feb 2025 13:43:49 +0100 Subject: [PATCH 690/729] fix is moving --- main.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index e3f84b15..7e0e8d27 100644 --- a/main.js +++ b/main.js @@ -3686,10 +3686,23 @@ class VwWeconnect extends utils.Adapter { this.log.debug(path); this.log.debug(res.status); if (status.name === "position") { - this.setIsCarMoving(vin, res.status === 204, ".status"); + //{"errors":["VEHICLE_IN_MOTION"]} + if ( + res.data && + res.data.errors && + res.data.errors.includes && + res.data.errors.includes("VEHICLE_IN_MOTION") + ) { + this.setIsCarMoving(vin, true, ".status"); + } else { + this.setIsCarMoving(vin, false, ".status"); + } + } + if (res.data && res.data.errors) { + this.log.warn(JSON.stringify(res.data)); + return; } this.json2iob.parse(path, res.data); - this.etags[url] = res.headers.etag; if (this.config.rawJson) { await this.setObjectNotExistsAsync(path + "rawJson", { type: "state", From f85c96de2dd6d0c1827363c9c6d3120df246f811 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Feb 2025 13:50:40 +0100 Subject: [PATCH 691/729] chore: release v0.7.4 - fix for charging status updates only at startup - fix for skoda ismoving state --- README.md | 5 +++++ io-package.json | 15 ++++++++++++++- main.js | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index afb325d2..9d5198bc 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,11 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.7.4 (2025-02-28) + +- fix for charging status updates only at startup +- fix for skoda ismoving state + ### 0.7.3 (2025-02-26) - fix for set setTemperature diff --git a/io-package.json b/io-package.json index 416add3f..20dcb9eb 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.3", + "version": "0.7.4", "news": { + "0.7.4": { + "en": "fix for charging status updates only at startup\nfix for skoda ismoving state", + "de": "Fix für charging.status aktualisierungen nur beim Start\nFix für Skoda ismoving state", + "ru": "исправление для зарядки обновлений статуса только при запуске\nобсуждение skoda ismoving state", + "pt": "corrigir para carregar atualizações de status apenas na inicialização\ncorreção para skoda ismoving estado", + "nl": "fix voor het opladen status updates alleen bij opstarten\nfix voor skoda verplaatst toestand", + "fr": "correction pour les mises à jour d'état de chargement uniquement au démarrage\ncorrection pour l'état de déplacement de skoda", + "it": "correzione per la ricarica degli aggiornamenti di stato solo all'avvio\ncorrezione per skoda ismoving stato", + "es": "fijado para actualizaciones de estado de carga sólo al inicio\nskoda ismoving state", + "pl": "ustawienie do ładowania aktualizacji statusu tylko przy starcie\nfix for skoda ismoving state", + "uk": "виправити оновлення стану зарядки тільки при запуску\nфіксація для skoda ізмовляючого стану", + "zh-cn": "仅在启动时更新充电状态的固定\n斯柯达状态的修复" + }, "0.7.3": { "en": "fix for set setTemperature\nfix for Skoda unlock lock", "de": "Fix für set setTemperature\nFix für Skoda unlock lock", diff --git a/main.js b/main.js index 7e0e8d27..3d3dd754 100644 --- a/main.js +++ b/main.js @@ -3644,8 +3644,8 @@ class VwWeconnect extends utils.Adapter { ]; for (const status of statusArray) { - if (this.ignoredPaths[vin] && this.ignoredPaths[vin].includes(status.path)) { - this.log.debug("Path ignored: " + status.path); + if (this.ignoredPaths[vin] && this.ignoredPaths[vin].includes(status.path + status.postfix)) { + this.log.debug("Path ignored: " + status.path + status.postfix); continue; } const url = @@ -3744,7 +3744,7 @@ class VwWeconnect extends utils.Adapter { if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; } - this.ignoredPaths[vin].push(status.path); + this.ignoredPaths[vin].push(status.path + status.postfix); return; } if (error.response.status >= 500) { diff --git a/package-lock.json b/package-lock.json index 5ed2c739..1ad7976c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.3", + "version": "0.7.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.3", + "version": "0.7.4", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index 7640ffda..ed05b1fa 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.3" + "version": "0.7.4" } From 3cc54a808ff5fc7cf75f8b96c204c8555677e3ec Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Feb 2025 15:07:05 +0100 Subject: [PATCH 692/729] fix error message --- README.md | 3 ++- io-package.json | 4 ++-- main.js | 4 +++- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9d5198bc..b99cf807 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,8 @@ You can set climatisaton temperature in ``` ## Changelog -### 0.7.4 (2025-02-28) + +### 0.7.5 (2025-02-28) - fix for charging status updates only at startup - fix for skoda ismoving state diff --git a/io-package.json b/io-package.json index 20dcb9eb..eee2ee5f 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.7.4", + "version": "0.7.5", "news": { - "0.7.4": { + "0.7.5": { "en": "fix for charging status updates only at startup\nfix for skoda ismoving state", "de": "Fix für charging.status aktualisierungen nur beim Start\nFix für Skoda ismoving state", "ru": "исправление для зарядки обновлений статуса только при запуске\nобсуждение skoda ismoving state", diff --git a/main.js b/main.js index 3d3dd754..15d02c6e 100644 --- a/main.js +++ b/main.js @@ -3698,7 +3698,9 @@ class VwWeconnect extends utils.Adapter { this.setIsCarMoving(vin, false, ".status"); } } - if (res.data && res.data.errors) { + //not empty error array + + if (res.data && res.data.errors && res.data.errors.length > 0) { this.log.warn(JSON.stringify(res.data)); return; } diff --git a/package-lock.json b/package-lock.json index 1ad7976c..66f4851a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.4", + "version": "0.7.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.4", + "version": "0.7.5", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index ed05b1fa..5cae9e30 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.4" + "version": "0.7.5" } From 8162d589821fd3ecc09dbbd34716ddadd57e3b1e Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 28 Feb 2025 15:10:19 +0100 Subject: [PATCH 693/729] 0.7.6 --- README.md | 2 +- io-package.json | 4 ++-- main.js | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b99cf807..520b24db 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ You can set climatisaton temperature in ## Changelog -### 0.7.5 (2025-02-28) +### 0.7.6 (2025-02-28) - fix for charging status updates only at startup - fix for skoda ismoving state diff --git a/io-package.json b/io-package.json index eee2ee5f..261850cc 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.7.5", + "version": "0.7.6", "news": { - "0.7.5": { + "0.7.6": { "en": "fix for charging status updates only at startup\nfix for skoda ismoving state", "de": "Fix für charging.status aktualisierungen nur beim Start\nFix für Skoda ismoving state", "ru": "исправление для зарядки обновлений статуса только при запуске\nобсуждение skoda ismoving state", diff --git a/main.js b/main.js index 15d02c6e..85bc887c 100644 --- a/main.js +++ b/main.js @@ -3701,8 +3701,7 @@ class VwWeconnect extends utils.Adapter { //not empty error array if (res.data && res.data.errors && res.data.errors.length > 0) { - this.log.warn(JSON.stringify(res.data)); - return; + this.log.debug(JSON.stringify(res.data.errors)); } this.json2iob.parse(path, res.data); if (this.config.rawJson) { diff --git a/package-lock.json b/package-lock.json index 66f4851a..15f49bad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.5", + "version": "0.7.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.5", + "version": "0.7.6", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index 5cae9e30..abe91abf 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.5" + "version": "0.7.6" } From c502196ed13a50964176d02c5e5df115c4cfdd38 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 1 Mar 2025 13:07:42 +0100 Subject: [PATCH 694/729] add logs --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 85bc887c..6c334f30 100644 --- a/main.js +++ b/main.js @@ -5197,6 +5197,7 @@ class VwWeconnect extends utils.Adapter { if (!statusFolder) { statusFolder = ""; } + this.log.debug("Set is car moving to " + isMoving); await this.setObjectNotExistsAsync(vin + statusFolder + ".position.isMoving", { type: "state", common: { From df6c00baa422c5efea2224b2c1658dbe9dcc0180 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 2 Mar 2025 12:39:46 +0100 Subject: [PATCH 695/729] fix auxheating --- main.js | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index 6c334f30..bb21629d 100644 --- a/main.js +++ b/main.js @@ -2343,14 +2343,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".remote.auxiliaryheating", { type: "state", common: { - name: "Standheizung Aux Heating", - type: "boolean", - role: "boolean", - def: false, + name: "Standheizung Aux Heating. Duration in seconds", + type: "number", + role: "level.timer", + write: true, + def: 2400, }, native: {}, }); @@ -2865,7 +2867,9 @@ class VwWeconnect extends utils.Adapter { forceIndex: true, // deleteBeforeUpdate: true, }; + const data = JSON.parse(message.toString()); + const formattedData = data; if (data.operation) { options.channelName = "Last Operation"; @@ -3789,9 +3793,34 @@ class VwWeconnect extends utils.Adapter { } } if (action === "auxiliaryheating") { + const duration = value; + if (duration === 0) { + value = "stop"; + } else { + value = "start"; + } + url = "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/auxiliary-heating/" + value; if (value === "start") { - body = { spin: this.config.pin }; + body = { + spin: "9669", + durationInSeconds: duration, + targetTemperature: { + temperatureValue: 23.0, + unitInCar: "CELSIUS", + }, + }; + const targetTemperatureState = await this.getStateAsync( + vin + ".status.auxiliary-heating.targetTemperature.temperatureValue", + ); + + if (targetTemperatureState) { + body.targetTemperature.temperatureValue = targetTemperatureState.val; + } + const remoteTarget = await this.getStateAsync(vin + ".remote.targetTemperatureInCelsius"); + if (remoteTarget) { + body.targetTemperature.temperatureValue = remoteTarget.val; + } } } if (action === "windowheating") { @@ -3805,7 +3834,7 @@ class VwWeconnect extends utils.Adapter { body = { currentSpin: this.config.pin, }; - url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/" + vin + "/" + action; + url = "https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/" + vin + "/" + value; } if (action === "maxChargeCurrent") { @@ -5948,8 +5977,7 @@ class VwWeconnect extends utils.Adapter { }); return; } else if (this.config.type === "skodae") { - const value = state.val ? "start" : "stop"; - this.setSkodaESettings(vin, action, value).catch(() => { + this.setSkodaESettings(vin, action, state.val).catch(() => { this.log.error("failed set state " + action); }); return; From 551cdab82b4888a14072bf8ca7688eaecc952390 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 2 Mar 2025 12:57:45 +0100 Subject: [PATCH 696/729] chore: release v0.7.7 - fix for skoda auxiliaryheating and duration - fix for skoda lock/unlock --- README.md | 4 ++++ io-package.json | 19 ++++++++++++++----- main.js | 14 ++++++++++---- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 520b24db..cd734e5e 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.7.7 (2025-03-02) + +- fix for skoda auxiliaryheating and duration +- fix for skoda lock/unlock ### 0.7.6 (2025-02-28) diff --git a/io-package.json b/io-package.json index 261850cc..d95eccf4 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.6", + "version": "0.7.7", "news": { + "0.7.7": { + "en": "fix for skoda auxiliaryheating and duration\nfix for skoda lock/unlock", + "de": "Fix für Skoda Standheizung und Dauer\nFix für Skoda Verriegeln/Entriegeln", + "ru": "фиксация для skoda вспомогательного нагрева и продолжительности\nобсуждение skoda lock/unlock", + "pt": "correção para auxiliar de skoda e duração\ncorreção para skoda bloqueio / desbloqueio", + "nl": "fix voor skoda hulpverwarming en duur\nfix voor skoda slot/ontgrendeling", + "fr": "fix pour le chauffage auxiliaire de skoda et la durée\ncorrection pour verrouillage/déverrouillage skoda", + "it": "fissaggio per skoda ausiliare riscaldamento e durata\nfissaggio per blocco skoda / sbloccaggio", + "es": "fijación para skoda auxiliar y duración\nskoda lock/unlock", + "pl": "fix for skoda expliliaryheration and timing\nfix for skoda lock / odblokuj", + "uk": "фіксація для допоміжного підігріву та тривалості\nфіксація для замка скода/розблокування", + "zh-cn": "斯柯达辅助加热和持续时间\nskoda 锁/ 解锁的固定" + }, "0.7.6": { "en": "fix for charging status updates only at startup\nfix for skoda ismoving state", "de": "Fix für charging.status aktualisierungen nur beim Start\nFix für Skoda ismoving state", @@ -80,10 +93,6 @@ "pl": "stan okna drzwi", "uk": "виправити дверні стани", "zh-cn": "修复门窗状态" - }, - "0.5.3": { - "en": "Fix for SkodaE update", - "de": "Fix für SkodaE Update" } }, "title": "VW Connect", diff --git a/main.js b/main.js index bb21629d..25f27b84 100644 --- a/main.js +++ b/main.js @@ -2347,7 +2347,7 @@ class VwWeconnect extends utils.Adapter { this.extendObject(vin + ".remote.auxiliaryheating", { type: "state", common: { - name: "Standheizung Aux Heating. Duration in seconds", + name: "Standheizung Stop = 0, Start = Duration in seconds", type: "number", role: "level.timer", @@ -3630,8 +3630,8 @@ class VwWeconnect extends utils.Adapter { }, { path: "vehicle-maintenance/vehicles", version: "v3", postfix: "" }, { path: "air-conditioning", version: "v2", postfix: "" }, - // { path: "air-conditioning", version: "v2", postfix: "/active-ventilation" }, - // { path: "air-conditioning", version: "v2", postfix: "/auxiliary-heating" }, + { path: "air-conditioning", version: "v2", postfix: "/active-ventilation" }, + { path: "air-conditioning", version: "v2", postfix: "/auxiliary-heating", name: "auxiliary-heating" }, { path: "air-conditioning", version: "v1", postfix: "/settings" }, // { path: "air-conditioning", version: "v1", postfix: "/timers" }, { path: "charging", version: "v1", postfix: "" }, @@ -3753,7 +3753,13 @@ class VwWeconnect extends utils.Adapter { return; } if (error.response.status >= 500) { - this.log.info("Server not available. Please try again later:" + JSON.stringify(error.response.data)); + this.log.info( + "Server not available. For endpoint " + + status.path + + status.postfix + + " Please try again later:" + + JSON.stringify(error.response.data), + ); return; } this.log.error(JSON.stringify(error.response.data)); diff --git a/package-lock.json b/package-lock.json index 15f49bad..82c4ef2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.6", + "version": "0.7.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.6", + "version": "0.7.7", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index abe91abf..3f973943 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.6" + "version": "0.7.7" } From bb3080ddcfeae8b108ea47e83d844f31b3a1f238 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 15 Mar 2025 23:39:58 +0100 Subject: [PATCH 697/729] fix vw token --- main.js | 402 ++++++++++++++++++++++++-------------------------------- 1 file changed, 174 insertions(+), 228 deletions(-) diff --git a/main.js b/main.js index 25f27b84..14dd7afe 100644 --- a/main.js +++ b/main.js @@ -1344,7 +1344,7 @@ class VwWeconnect extends utils.Adapter { ); } - getVWToken(tokens, jwtid_token, reject, resolve) { + async getVWToken(tokens, jwtid_token, reject, resolve) { if (this.config.type !== "audi" && this.config.type !== "audietron") { if (this.config.type === "id") { if (this.type === "Wc") { @@ -1371,29 +1371,45 @@ class VwWeconnect extends utils.Adapter { resolve(); return; } - this.log.info("Start Wallcharging login"); - - //this.config.type === "wc" - this.type = "Wc"; - this.country = "DE"; - this.clientId = "0fa5ae01-ebc0-4901-a2aa-4dd60572ea0e@apps_vw-dilab_com"; - this.xclientId = ""; - this.scope = "openid profile address email"; - this.redirect = "wecharge://authenticated"; - this.xrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - this.xappversion = ""; - this.xappname = ""; - this.login() - .then(() => { - this.log.info("Wallcharging login was successfull"); - this.log.info("Minimum update interval is 15min for Wallcharging data, to prevent blocking"); + //check paired wallbox + await axios({ + method: "get", + maxBodyLength: Infinity, + url: "https://prod.emea.mobile.charging.cariad.digital/headless/charging_stations/check_paired", + headers: { + "X-Api-Version": "1", + traceparent: "00-96318317ce184ee8b7e9528586f4ffec-2b2afd705c4a4a58-01", + Authorization: "Bearer " + this.config.atoken, + Host: "prod.emea.mobile.charging.cariad.digital", + Connection: "Keep-Alive", + "User-Agent": "okhttp/4.12.0", + "X-Debug-Log": "true", + "Content-Type": "application/json", + "Accept-Language": "de-DE", + "X-Brand": "volkswagen", + "X-Platform": "android", + "X-Device-Timezone": "Europe/Berlin", + "X-Sdk-Version": "4.5.4-(2025.18.0)", + "X-Use-BffError-V2": "true", + "X-Device-Manufacturer": "google", + "X-Device-Name": "Pixel 4a", + "X-Device-OS-Name": "13", + "X-Device-OS-Version": "33", + }, + }) + .then((response) => { + if (response.data && response.data.hasPairedChargingStation) { + this.log.info("Wallbox is paired"); + this.pairedWallbox = true; + } else { + this.log.info("Wallbox is not paired"); + } }) - .catch(() => { - this.log.warn("Failled wall charger login"); + .catch((error) => { + this.log.error("Error while checking paired wallbox"); + this.log.error(error); }); resolve(); - return; } if (this.clientId != "7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com") { @@ -4055,223 +4071,153 @@ class VwWeconnect extends utils.Adapter { }); } - getWcData(limit) { + async getWcData(limit) { if (this.config.historyLimit == -1) { this.log.debug("WC disabled in config"); return; } - this.log.debug("Get WC Data with history limit: " + this.config.historyLimit); - //check if latest fetching is minimum 15 minutes ago - if (this.lastWcFetch && this.lastWcFetch + 15 * 60 * 1000 > Date.now()) { - this.log.debug("We Charge data already fetched in last 15 minutes"); - return; - } - if (!this.config.wc_access_token) { - this.log.debug("We Charge access token not set"); - return; - } - this.lastWcFetch = Date.now(); - if (limit == -1) { - this.log.debug("We Charge disabled in config"); - return; - } - if (!limit) { - limit = 25; - } - this.setObjectNotExists("wecharge", { - type: "state", - common: { - name: "WeCharge Data", - write: false, - }, - native: {}, - }); - const header = { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.atoken, - wc_access_token: this.config.wc_access_token, - }; - this.genericRequest( - "https://prod.emea.cbs.charging.cariad.digital/charge-and-pay/v1/user/subscriptions", - header, - "wecharge.chargeandpay.subscriptions", - [404], - "result", - ) - .then((body) => { - body.forEach((subs) => { - this.genericRequest( - "https://prod.emea.cbs.charging.cariad.digital/charge-and-pay/v1/user/tariffs/" + subs.tariff_id, - header, - "wecharge.chargeandpay.tariffs." + subs.tariff_id, - [404], - ).catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get tariff"); - return; - } - this.log.error("Failed to get tariff"); - }); - }); - }) - .catch((hideError, err) => { - if (hideError) { - this.log.debug("Failed to get subscription"); - return; - } - - this.log.error("Failed to get subscription"); - if (err && (err.statusCode === 401 || err.statusCode === 403)) { - this.config.wc_access_token = null; - } + if (this.pairedWallbox) { + this.log.debug("Get WC Data with history limit: " + this.config.historyLimit); + //check if latest fetching is minimum 15 minutes ago + if (this.lastWcFetch && this.lastWcFetch + 15 * 60 * 1000 > Date.now()) { + this.log.debug("We Charge data already fetched in last 15 minutes"); + return; + } + if (!this.config.wc_access_token) { + this.log.debug("We Charge access token not set"); + return; + } + this.lastWcFetch = Date.now(); + if (limit == -1) { + this.log.debug("We Charge disabled in config"); + return; + } + if (!limit) { + limit = 25; + } + this.setObjectNotExists("wecharge", { + type: "state", + common: { + name: "WeCharge Data", + write: false, + }, + native: {}, }); - this.genericRequest( - "https://prod.emea.cbs.charging.cariad.digital/charge-and-pay/v1/charging/records?limit=" + limit + "&offset=0", - header, - "wecharge.chargeandpay.records", - [404, 500], - "result", - ) - .then((body) => { - this.setObjectNotExistsAsync("wecharge.chargeandpay.recordsJson", { - type: "state", - common: { - name: "Raw Json Last 100", - role: "indicator", - type: "string", - write: true, - read: true, + + // Common headers for all requests + const commonHeaders = { + "X-Api-Version": "3", + traceparent: "00-1d499197dd7f48bda994a890fa11fe15-xxxxxxxxxxxxxxxx-01", + Authorization: + "Bearer eyJrawQioiO0ODEyODgzZi05Y2FiLTQwMWMtYTI5OC0wZmE2c2N1YwI0OTJlZTU4YzQiLCJhdWQiOiJhMjE1MDE...", + Connection: "Keep-Alive", + "Accept-Encoding": "gzip", + "User-Agent": "okhttp/4.12.0", + "X-Cookie": "4olkEx88/5FdWgb95AnxwEwm6Rwp1YOxD6NkObBr", + "X-Debug-Log": "true", + "Content-Type": "application/json", + "Accept-Language": "de-DE", + "X-Brand": "volkswagen", + "X-Platform": "android", + "X-Device-Timezone": "Europe/Berlin", + "X-Sdk-Version": "4.5.4-(2025.18.0)", + "X-Use-BffError-V2": "true", + "X-Device-Manufacturer": "google", + "X-Device-Name": "Pixel 4a", + "X-Device-OS-Name": "13", + "X-Device-OS-Version": "33", + }; + + try { + let response; + + // 2) GET: Headless subscription + response = await axios({ + method: "GET", + url: "https://prod.emea.mobile.charging.cariad.digital/headless/subscription", + headers: { + ...commonHeaders, + Host: "prod.emea.mobile.charging.cariad.digital", }, - native: {}, - }) - .then(() => { - this.setState("wecharge.chargeandpay.recordsJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - this.extractKeys(this, "wecharge.chargeandpay.records.latestItem", body[0]); - }) - .catch((hideError, err) => { - if (hideError) { - this.log.debug("Failed to get chargeandpay records"); - return; - } - this.log.error("Failed to get chargeandpay records"); - if (err && (err.statusCode === 401 || err.statusCode === 403)) { - this.config.wc_access_token = null; - } - }); - this.genericRequest( - "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/stations?limit=" + limit, - header, - "wecharge.homecharging.stations", - [404], - "result", - "stations", - ) - .then((body) => { - body.forEach((station) => { - this.genericRequest( - "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/sessions?station_id=" + - station.id + - "&limit=" + - limit, - header, - "wecharge.homecharging.stations." + station.name + ".sessions", - [404], - "charging_sessions", - ) - .then((body) => { - this.setObjectNotExistsAsync("wecharge.homecharging.stations." + station.name + ".sessionsJson", { - type: "state", - common: { - name: "Raw Json Last 100", - role: "indicator", - type: "string", - write: true, - read: true, - }, - native: {}, - }) - .then(() => { - this.setState( - "wecharge.homecharging.stations." + station.name + ".sessionsJson", - JSON.stringify(body), - true, - ); - }) - .catch((error) => { - this.log.error(error); - }); + }); + this.json2iob.parse("wecharge.subscription", response.data); - this.extractKeys( - this, - "wecharge.homecharging.stations." + station.name + ".sessions.latestItem", - body[0], - ); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get sessions"); - return; - } - this.log.error("Failed to get sessions"); - }); + // 4) GET: Market configuration with fallbackCountry=DE + response = await axios({ + method: "GET", + url: "https://prod.emea.mobile.charging.cariad.digital/headless/marketConfiguration?fallbackCountry=DE", + headers: commonHeaders, }); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get stations"); - return; - } - this.log.error("Failed to get stations"); - }); - const dt = new Date(); - this.genericRequest( - "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/records?start_date_time_after=2020-05-01T00:00:00.000Z&start_date_time_before=" + - dt.toISOString() + - "&limit=" + - limit, - header, - "wecharge.homecharging.records", - [404], - "charging_records", - ) - .then((body) => { - this.setObjectNotExistsAsync("wecharge.homecharging.recordsJson", { - type: "state", - common: { - name: "Raw Json Last 100", - role: "indicator", - type: "string", - write: true, - read: true, + this.json2iob.parse("wecharge.configuration", response.data); + + // 5) GET: Charging history public + response = await axios({ + method: "GET", + url: "https://prod.emea.mobile.charging.cariad.digital/charging_history/public", + headers: commonHeaders, + }); + this.json2iob.parse("wecharge.history.public", response.data); + + // 6) POST: Charging history home with data payload + response = await axios({ + method: "POST", + url: "https://prod.emea.mobile.charging.cariad.digital/charging_history/home", + headers: commonHeaders, + data: { + filteredBy: {}, + retrieveFilters: true, }, - native: {}, - }) - .then(() => { - this.setState("wecharge.homecharging.recordsJson", JSON.stringify(body), true); - }) - .catch((error) => { - this.log.error(error); - }); - this.extractKeys(this, "wecharge.homecharging.records.latestItem", body[0]); - }) - .catch((hideError) => { - if (hideError) { - this.log.debug("Failed to get records"); - return; + }); + this.json2iob.parse("wecharge.history.home", response.data); + + // 7) GET: Charging stations + response = await axios({ + method: "GET", + url: "https://prod.emea.mobile.charging.cariad.digital/charging_stations", + headers: commonHeaders, + }); + this.json2iob.parse("wecharge.stations", response.data); + + // // 8) GET: Charging station image + // response = await axios({ + // method: "GET", + // url: "https://prod.emea.mobile.charging.cariad.digital/resources/charging-station-image?imageId=volkswagen%2Felli%2F...", + // headers: commonHeaders, + // }); + // this.json2iob.parse("wecharge.ChargingStationImage", response.data); + + // // 9) GET: Specific charging station + // response = await axios({ + // method: "GET", + // url: "https://prod.emea.mobile.charging.cariad.digital/charging_stations/057e738d-9ff0-4cfd-99c1-37fde366d613", + // headers: commonHeaders, + // }); + // this.json2iob.parse("wecharge.SpecificChargingStation", response.data); + + // // 10) GET: Plug and charge overview + // response = await axios({ + // method: "GET", + // url: "https://prod.emea.mobile.charging.cariad.digital/plug-and-charge/overview?vin=WVGZZZE2ZPP517569", + // headers: commonHeaders, + // }); + // this.json2iob.parse("wecharge.PlugAndChargeOverview", response.data); + + // 11) GET: Subscriptions + // response = await axios({ + // method: "GET", + // url: "https://prod.emea.mobile.charging.cariad.digital/subscriptions?vin=WVGZZZE2ZPP517569", + // headers: commonHeaders, + // }); + // this.json2iob.parse("wecharge.Subscriptions", response.data); + } catch (error) { + this.log.error("Failed ...."); + this.log.error(error); + if (error.response) { + this.log.error(error.response.status.toString()); + this.log.error(JSON.stringify(error.response.data)); } - this.log.error("Failed to get records"); - }); - //Pay - //Home + } + } } genericRequest(url, header, path, codesToIgnoreArray, selector1, selector2) { //eslint-disable-next-line From 28784773129089944ac74ad3f9dd70d28b14a571 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 16 Mar 2025 14:22:54 +0100 Subject: [PATCH 698/729] fix vwecharge --- main.js | 124 +++++++++++++++++--------------------------------------- 1 file changed, 37 insertions(+), 87 deletions(-) diff --git a/main.js b/main.js index 14dd7afe..91cea238 100644 --- a/main.js +++ b/main.js @@ -902,7 +902,7 @@ class VwWeconnect extends utils.Adapter { this.log.error("get id status Failed"); this.refreshIDToken().catch(() => {}); }); - if (this.config.type === "id" && this.config.wc_access_token) { + if (this.config.type === "id" && this.pairedWallbox) { this.getWcData(this.config.historyLimit); } }); @@ -1347,15 +1347,6 @@ class VwWeconnect extends utils.Adapter { async getVWToken(tokens, jwtid_token, reject, resolve) { if (this.config.type !== "audi" && this.config.type !== "audietron") { if (this.config.type === "id") { - if (this.type === "Wc") { - this.config.wc_access_token = tokens.wc_access_token; - this.config.wc_refresh_token = tokens.refresh_token; - this.log.info("Wallcharging login successfull"); - this.getWcData(this.config.historyLimit); - resolve(); - return; - } - this.config.atoken = tokens.accessToken; this.config.rtoken = tokens.refreshToken; @@ -1401,6 +1392,7 @@ class VwWeconnect extends utils.Adapter { if (response.data && response.data.hasPairedChargingStation) { this.log.info("Wallbox is paired"); this.pairedWallbox = true; + this.getWcData(this.config.historyLimit); } else { this.log.info("Wallbox is not paired"); } @@ -4083,10 +4075,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug("We Charge data already fetched in last 15 minutes"); return; } - if (!this.config.wc_access_token) { - this.log.debug("We Charge access token not set"); - return; - } + this.lastWcFetch = Date.now(); if (limit == -1) { this.log.debug("We Charge disabled in config"); @@ -4095,8 +4084,8 @@ class VwWeconnect extends utils.Adapter { if (!limit) { limit = 25; } - this.setObjectNotExists("wecharge", { - type: "state", + this.extendObject("wecharge", { + type: "channel", common: { name: "WeCharge Data", write: false, @@ -4106,10 +4095,9 @@ class VwWeconnect extends utils.Adapter { // Common headers for all requests const commonHeaders = { - "X-Api-Version": "3", + "X-Api-Version": "1", traceparent: "00-1d499197dd7f48bda994a890fa11fe15-xxxxxxxxxxxxxxxx-01", - Authorization: - "Bearer eyJrawQioiO0ODEyODgzZi05Y2FiLTQwMWMtYTI5OC0wZmE2c2N1YwI0OTJlZTU4YzQiLCJhdWQiOiJhMjE1MDE...", + Authorization: "Bearer " + this.config.atoken, Connection: "Keep-Alive", "Accept-Encoding": "gzip", "User-Agent": "okhttp/4.12.0", @@ -4128,38 +4116,29 @@ class VwWeconnect extends utils.Adapter { "X-Device-OS-Version": "33", }; - try { - let response; - - // 2) GET: Headless subscription - response = await axios({ + const requests = [ + { method: "GET", url: "https://prod.emea.mobile.charging.cariad.digital/headless/subscription", headers: { ...commonHeaders, Host: "prod.emea.mobile.charging.cariad.digital", }, - }); - this.json2iob.parse("wecharge.subscription", response.data); - - // 4) GET: Market configuration with fallbackCountry=DE - response = await axios({ + path: "wecharge.subscription", + }, + { method: "GET", url: "https://prod.emea.mobile.charging.cariad.digital/headless/marketConfiguration?fallbackCountry=DE", headers: commonHeaders, - }); - this.json2iob.parse("wecharge.configuration", response.data); - - // 5) GET: Charging history public - response = await axios({ + path: "wecharge.configuration", + }, + { method: "GET", url: "https://prod.emea.mobile.charging.cariad.digital/charging_history/public", - headers: commonHeaders, - }); - this.json2iob.parse("wecharge.history.public", response.data); - - // 6) POST: Charging history home with data payload - response = await axios({ + headers: { ...commonHeaders, "X-Api-Version": "2" }, + path: "wecharge.history.public", + }, + { method: "POST", url: "https://prod.emea.mobile.charging.cariad.digital/charging_history/home", headers: commonHeaders, @@ -4167,55 +4146,26 @@ class VwWeconnect extends utils.Adapter { filteredBy: {}, retrieveFilters: true, }, - }); - this.json2iob.parse("wecharge.history.home", response.data); - - // 7) GET: Charging stations - response = await axios({ + path: "wecharge.history.home", + }, + { method: "GET", url: "https://prod.emea.mobile.charging.cariad.digital/charging_stations", - headers: commonHeaders, - }); - this.json2iob.parse("wecharge.stations", response.data); - - // // 8) GET: Charging station image - // response = await axios({ - // method: "GET", - // url: "https://prod.emea.mobile.charging.cariad.digital/resources/charging-station-image?imageId=volkswagen%2Felli%2F...", - // headers: commonHeaders, - // }); - // this.json2iob.parse("wecharge.ChargingStationImage", response.data); - - // // 9) GET: Specific charging station - // response = await axios({ - // method: "GET", - // url: "https://prod.emea.mobile.charging.cariad.digital/charging_stations/057e738d-9ff0-4cfd-99c1-37fde366d613", - // headers: commonHeaders, - // }); - // this.json2iob.parse("wecharge.SpecificChargingStation", response.data); - - // // 10) GET: Plug and charge overview - // response = await axios({ - // method: "GET", - // url: "https://prod.emea.mobile.charging.cariad.digital/plug-and-charge/overview?vin=WVGZZZE2ZPP517569", - // headers: commonHeaders, - // }); - // this.json2iob.parse("wecharge.PlugAndChargeOverview", response.data); - - // 11) GET: Subscriptions - // response = await axios({ - // method: "GET", - // url: "https://prod.emea.mobile.charging.cariad.digital/subscriptions?vin=WVGZZZE2ZPP517569", - // headers: commonHeaders, - // }); - // this.json2iob.parse("wecharge.Subscriptions", response.data); - } catch (error) { - this.log.error("Failed ...."); - this.log.error(error); - if (error.response) { - this.log.error(error.response.status.toString()); - this.log.error(JSON.stringify(error.response.data)); - } + headers: { ...commonHeaders, "X-Api-Version": "3" }, + path: "wecharge.stations", + }, + ]; + + for (const request of requests) { + await axios(request) + .then((response) => { + this.json2iob.parse(request.path, response.data, { forceIndex: true }); + }) + .catch((error) => { + this.log.error(`Failed to get data for ${request.path}`); + this.log.error(error); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); } } } From b62a3bd75e9730fd2089b446c86cd8bfb54c35ec Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 16 Mar 2025 14:26:15 +0100 Subject: [PATCH 699/729] delete old states --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 91cea238..e29729c6 100644 --- a/main.js +++ b/main.js @@ -4084,7 +4084,13 @@ class VwWeconnect extends utils.Adapter { if (!limit) { limit = 25; } - this.extendObject("wecharge", { + const wechargeState = await this.getObjectAsync("wecharge"); + if (wechargeState) { + if (wechargeState.type !== "channel") { + await this.delObjectAsync("wecharge", { recursive: true }); + } + } + await this.extendObject("wecharge", { type: "channel", common: { name: "WeCharge Data", From 4a84479bbe5981b7d5274eb7fa34ea06aea5ad2d Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 17 Mar 2025 14:55:01 +0100 Subject: [PATCH 700/729] fix refresh --- main.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index e29729c6..cbdc2d8d 100644 --- a/main.js +++ b/main.js @@ -1354,7 +1354,7 @@ class VwWeconnect extends utils.Adapter { this.refreshTokenInterval = setInterval(() => { this.refreshIDToken().catch(() => {}); - }, 0.9 * 60 * 60 * 1000); // 0.9hours + }, 0.89 * 60 * 60 * 1000); // 0.9hours this.log.info("ID login successfull"); this.log.info(`History limit: ${this.config.historyLimit}, set to -1 to disable wallcharging login`); if (this.config.historyLimit == -1) { @@ -1402,6 +1402,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); }); resolve(); + return; } if (this.clientId != "7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com") { @@ -4457,12 +4458,7 @@ class VwWeconnect extends utils.Adapter { this.log.debug("Token Refresh successful"); this.config.atoken = body.accessToken; this.config.rtoken = body.refreshToken; - if (this.type === "Wc") { - //wallcharging relogin no refresh token available - this.login().catch(() => { - this.log.debug("No able to Login in WeCharge"); - }); - } + resolve(); } catch (err) { this.log.error(err); From 7c8856acd031772fc619cd1ed50fc15294c6f5fb Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 17 Mar 2025 14:56:11 +0100 Subject: [PATCH 701/729] add info --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index cbdc2d8d..e10dca13 100644 --- a/main.js +++ b/main.js @@ -1398,8 +1398,8 @@ class VwWeconnect extends utils.Adapter { } }) .catch((error) => { - this.log.error("Error while checking paired wallbox"); - this.log.error(error); + this.log.info('No wallbox found code: "' + error.response.status + '"'); + this.log.debug(error); }); resolve(); return; From e812746a386f4bb1d724a5d8c4cb440f7399bb3b Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 20 Mar 2025 08:40:35 +0100 Subject: [PATCH 702/729] cleanup chargings states --- main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.js b/main.js index e10dca13..901c550c 100644 --- a/main.js +++ b/main.js @@ -4166,6 +4166,20 @@ class VwWeconnect extends utils.Adapter { for (const request of requests) { await axios(request) .then((response) => { + if (response.data.items) { + //remove all items with type 'section' + response.data.items = response.data.items.filter((item) => item.type !== "section"); + //remove all items with type 'header' + response.data.items = response.data.items.filter((item) => item.type !== "header"); + + //put type 'month' in seperate array + response.data.months = response.data.items.filter((item) => item.type === "month"); + //remove all items with type 'month' + response.data.items = response.data.items.filter((item) => item.type !== "month"); + response.data.years = response.data.items.filter((item) => item.type === "year"); + //remove all items with type 'year' + response.data.items = response.data.items.filter((item) => item.type !== "year"); + } this.json2iob.parse(request.path, response.data, { forceIndex: true }); }) .catch((error) => { From ae4ac0a5b2303631d19c4e7eb3b9afe27c69f557 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 20 Mar 2025 08:41:26 +0100 Subject: [PATCH 703/729] chore: release v0.7.8 - fix for id wall charger --- README.md | 4 +++ io-package.json | 28 +++++++-------- package-lock.json | 89 ++++++++++++++++++++++++++--------------------- package.json | 14 ++++---- 4 files changed, 75 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index cd734e5e..789fb547 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.7.8 (2025-03-20) + +- fix for id wall charger + ### 0.7.7 (2025-03-02) - fix for skoda auxiliaryheating and duration diff --git a/io-package.json b/io-package.json index d95eccf4..6e8102ef 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.7", + "version": "0.7.8", "news": { + "0.7.8": { + "en": "fix for id wall charger", + "de": "Fix für id wall charger", + "ru": "зарядное устройство id wall", + "pt": "correção para carregador de parede id", + "nl": "fix voor id wandlader", + "fr": "fixation pour chargeur mural id", + "it": "fissaggio per caricatore da parete id", + "es": "fijación para el cargador de pared id", + "pl": "fix for id wall charger", + "uk": "фіксатор для зарядного пристрою для стін", + "zh-cn": "id 墙壁充电器的修复" + }, "0.7.7": { "en": "fix for skoda auxiliaryheating and duration\nfix for skoda lock/unlock", "de": "Fix für Skoda Standheizung und Dauer\nFix für Skoda Verriegeln/Entriegeln", @@ -80,19 +93,6 @@ "pl": "additonal cupra states", "uk": "additonal cupra стани", "zh-cn": "添加额外 cupra 状态" - }, - "0.5.4": { - "en": "fix door window states", - "de": "Fix für door und window States", - "ru": "положение окна двери", - "pt": "corrigir os estados da janela da porta", - "nl": "fix deur venster statussen", - "fr": "fixer les états de la fenêtre de porte", - "it": "fissare gli stati della finestra della porta", - "es": "fijar puerta ventana estados", - "pl": "stan okna drzwi", - "uk": "виправити дверні стани", - "zh-cn": "修复门窗状态" } }, "title": "VW Connect", diff --git a/package-lock.json b/package-lock.json index 82c4ef2b..35285435 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "iobroker.vw-connect", - "version": "0.7.7", + "version": "0.7.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.7", + "version": "0.7.8", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", "@peculiar/webcrypto": "^1.5.0", - "axios": "^1.7.9", + "axios": "^1.8.4", "json-bigint": "^1.0.0", "json2iob": "^2.6.17", - "mqtt": "^5.10.3", + "mqtt": "^5.10.4", "ngeohash": "^0.6.3", "qs": "^6.14.0", "request": "^2.88.2", @@ -27,13 +27,13 @@ "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "^9.21.0", + "@eslint/js": "^9.22.0", "@iobroker/testing": "^5.0.3", - "@types/node": "^22.13.5", - "eslint": "^9.21.0", + "@types/node": "^22.13.10", + "eslint": "^9.22.0", "eslint-plugin-promise": "^7.2.1", "globals": "^16.0.0", - "typescript": "~5.7.3" + "typescript": "~5.8.2" }, "engines": { "node": ">=10.0.0" @@ -310,6 +310,16 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/config-helpers": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.1.0.tgz", + "integrity": "sha512-kLrdPDJE1ckPo94kmPPf9Hfd0DU0Jw6oKYrhe+pwSC0iTUInmTa+w6fw8sGgcfkFJGNdWOUeOaDM4quW4a7OkA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/core": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", @@ -361,9 +371,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", - "integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", + "version": "9.22.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.22.0.tgz", + "integrity": "sha512-vLFajx9o8d1/oL2ZkpMYbkLv8nDB6yaIwFNt7nI4+I80U/z03SxmfOMsLbvWr3p7C+Wnoh//aOu2pQW8cS0HCQ==", "dev": true, "license": "MIT", "engines": { @@ -691,9 +701,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", - "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", + "version": "22.13.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz", + "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" @@ -964,9 +974,9 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -1800,18 +1810,19 @@ } }, "node_modules/eslint": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", - "integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", + "version": "9.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.22.0.tgz", + "integrity": "sha512-9V/QURhsRN40xuHXWjV64yvrzMjcz7ZyNoF2jJFmy9j/SLk0u1OLSZgXi28MrXjymnjEGSR80WCdab3RGMDveQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.2", + "@eslint/config-helpers": "^0.1.0", "@eslint/core": "^0.12.0", "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "9.21.0", + "@eslint/js": "9.22.0", "@eslint/plugin-kit": "^0.2.7", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -1823,7 +1834,7 @@ "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", + "eslint-scope": "^8.3.0", "eslint-visitor-keys": "^4.2.0", "espree": "^10.3.0", "esquery": "^1.5.0", @@ -1879,9 +1890,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -3542,27 +3553,27 @@ } }, "node_modules/mqtt": { - "version": "5.10.3", - "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.3.tgz", - "integrity": "sha512-hA/6YrUS4fywhBGCjH/XXUuLeueJiPqruVVWjK2A24Ma4KcWfZ/x8x07aoesBV+HXDWBC08tbT4IWfSXNW0Jtw==", + "version": "5.10.4", + "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.4.tgz", + "integrity": "sha512-wN+SuhT2/ZaG6NPxca0N6YtRivnMxk6VflxQUEeqDH4erKdj+wPAGhHmcTLzvqfE4sJRxrEJ+XJxUc0No0E7eQ==", "license": "MIT", "dependencies": { - "@types/readable-stream": "^4.0.5", - "@types/ws": "^8.5.9", + "@types/readable-stream": "^4.0.18", + "@types/ws": "^8.5.14", "commist": "^3.2.0", "concat-stream": "^2.0.0", - "debug": "^4.3.4", + "debug": "^4.4.0", "help-me": "^5.0.0", - "lru-cache": "^10.0.1", + "lru-cache": "^10.4.3", "minimist": "^1.2.8", "mqtt-packet": "^9.0.1", "number-allocator": "^1.0.14", - "readable-stream": "^4.4.2", + "readable-stream": "^4.7.0", "reinterval": "^1.1.0", - "rfdc": "^1.3.0", + "rfdc": "^1.4.1", "split2": "^4.2.0", - "worker-timers": "^7.1.4", - "ws": "^8.17.1" + "worker-timers": "^7.1.8", + "ws": "^8.18.0" }, "bin": { "mqtt": "build/bin/mqtt.js", @@ -4919,9 +4930,9 @@ } }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 3f973943..5cdfc976 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ "dependencies": { "@iobroker/adapter-core": "^3.2.3", "@peculiar/webcrypto": "^1.5.0", - "axios": "^1.7.9", + "axios": "^1.8.4", "json-bigint": "^1.0.0", "json2iob": "^2.6.17", - "mqtt": "^5.10.3", + "mqtt": "^5.10.4", "ngeohash": "^0.6.3", "qs": "^6.14.0", "request": "^2.88.2", @@ -38,13 +38,13 @@ "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "^9.21.0", + "@eslint/js": "^9.22.0", "@iobroker/testing": "^5.0.3", - "@types/node": "^22.13.5", - "eslint": "^9.21.0", + "@types/node": "^22.13.10", + "eslint": "^9.22.0", "eslint-plugin-promise": "^7.2.1", "globals": "^16.0.0", - "typescript": "~5.7.3" + "typescript": "~5.8.2" }, "engines": { "node": ">=10.0.0" @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.7" + "version": "0.7.8" } From 55ef576595f95e2003859211e998bb3ebf14fe63 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 20 Mar 2025 09:35:42 +0100 Subject: [PATCH 704/729] add start charging --- README.md | 3 +- io-package.json | 4 +- main.js | 168 +++++++++++++++++++++++++--------------------- package-lock.json | 4 +- package.json | 2 +- 5 files changed, 99 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 789fb547..62930914 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,8 @@ You can set climatisaton temperature in ``` ## Changelog -### 0.7.8 (2025-03-20) + +### 0.7.9 (2025-03-20) - fix for id wall charger diff --git a/io-package.json b/io-package.json index 6e8102ef..b7012aa3 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "vw-connect", - "version": "0.7.8", + "version": "0.7.9", "news": { - "0.7.8": { + "0.7.9": { "en": "fix for id wall charger", "de": "Fix für id wall charger", "ru": "зарядное устройство id wall", diff --git a/main.js b/main.js index 901c550c..44ebe2da 100644 --- a/main.js +++ b/main.js @@ -4165,7 +4165,8 @@ class VwWeconnect extends utils.Adapter { for (const request of requests) { await axios(request) - .then((response) => { + .then(async (response) => { + let options = { forceIndex: true }; if (response.data.items) { //remove all items with type 'section' response.data.items = response.data.items.filter((item) => item.type !== "section"); @@ -4180,7 +4181,25 @@ class VwWeconnect extends utils.Adapter { //remove all items with type 'year' response.data.items = response.data.items.filter((item) => item.type !== "year"); } - this.json2iob.parse(request.path, response.data, { forceIndex: true }); + if (request.path === "wecharge.stations") { + options = { preferedArrayName: "id", preferedArrayDesc: "name" }; + } + await this.json2iob.parse(request.path, response.data, options); + if (request.path === "wecharge.stations") { + for (const stations of response.data.result) { + this.extendObject("wecharge.stations." + stations.id + ".startCharging", { + type: "state", + common: { + name: "Start Charging", + type: "boolean", + role: "button", + read: false, + write: true, + }, + native: {}, + }); + } + } }) .catch((error) => { this.log.error(`Failed to get data for ${request.path}`); @@ -5659,88 +5678,84 @@ class VwWeconnect extends utils.Adapter { const idArray = id.split("."); idArray.pop(); idArray.push("id"); - const stationID = (await this.getStateAsync(idArray.join("."))).val; - this.log.info("Start charging for id: " + stationID); - request( - { - method: "POST", - url: "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/sessions/start", - headers: { - Host: "prod.emea.cbs.charging.cariad.digital", - accept: "application/json", - wc_access_token: this.config.wc_access_token, - authorization: "Bearer " + this.config.atoken, - "user-agent": this.userAgent, - "content-type": "application/json", - origin: "https://web-home-mobile.apps.emea.vwapps.io", - "x-requested-with": "com.volkswagen.weconnect", - "sec-fetch-site": "same-site", - "sec-fetch-mode": "cors", - "sec-fetch-dest": "empty", - referer: "https://web-home-mobile.apps.emea.vwapps.io/", - "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", - }, - gzip: true, - json: true, - body: { - station_id: stationID, - }, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to start Charging"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - - return; - } - body && this.log.info(JSON.stringify(body)); + const stationId = (await this.getStateAsync(idArray.join("."))).val; + // this.log.info("Start charging for id: " + stationID); + axios({ + method: "post", + maxBodyLength: Infinity, + url: "https://prod.emea.mobile.charging.cariad.digital/charging_stations/start", + headers: { + "X-Api-Version": "2", + traceparent: "00-91bf3a6b198647bda6368a0be4626811-xxxxxxxx-01", + Authorization: "Bearer " + this.config.atoken, + Connection: "Keep-Alive", + "User-Agent": "okhttp/4.12.0", + "X-Cookie": "4olkEx88/5FdWgb95anxwEwm6Rwp1YOxD6NKoBM4nw5j0ZmxxxxxxP+QLA==", + "X-Debug-Log": "true", + "Content-Type": "application/json", + "Accept-Language": "de-DE", + "X-Brand": "volkswagen", + "X-Platform": "android", + "X-Device-Timezone": "Europe/Berlin", + "X-Sdk-Version": "4.5.4-(2025.18.0)", + "X-Use-BffError-V2": "true", + "X-Device-Manufacturer": "google", + "X-Device-Name": "Pixel 4a", + "X-Device-OS-Name": "13", + "X-Device-OS-Version": "33", }, - ); + data: { stationId }, + }) + .then((response) => { + this.log.info(JSON.stringify(response.data)); + }) + .catch((error) => { + this.log.error("Failed to start Charging"); + this.log.error(error); + error.response && this.log.error(error.response.status.toString()); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); } if (id.indexOf("stopCharging") !== -1) { const idArray = id.split("."); idArray.pop(); idArray.push("id"); const sessionId = (await this.getStateAsync(idArray.join("."))).val; - request( - { - method: "POST", - url: - "https://prod.emea.cbs.charging.cariad.digital/home-charging/v1/charging/sessions/" + - sessionId + - "/stop", - headers: { - Host: "prod.emea.cbs.charging.cariad.digital", - accept: "application/json", - wc_access_token: this.config.wc_access_token, - authorization: "Bearer " + this.config.atoken, - "user-agent": this.userAgent, - "content-type": "application/json", - origin: "https://web-home-mobile.apps.emea.vwapps.io", - "x-requested-with": "com.volkswagen.weconnect", - "sec-fetch-site": "same-site", - "sec-fetch-mode": "cors", - "sec-fetch-dest": "empty", - referer: "https://web-home-mobile.apps.emea.vwapps.io/", - "accept-language": "de-DE,de;q=0.9,en-DE;q=0.8,en-US;q=0.7,en;q=0.6", - }, - gzip: true, - json: true, + axios({ + method: "post", + maxBodyLength: Infinity, + url: "https://prod.emea.mobile.charging.cariad.digital/charging_stations/stop", + headers: { + "X-Api-Version": "2", + traceparent: "00-91bf3a6b198647bda6368a0be4626811-xxxxxxxx-01", + Authorization: "Bearer " + this.config.atoken, + Connection: "Keep-Alive", + "User-Agent": "okhttp/4.12.0", + "X-Cookie": "4olkEx88/5FdWgb95anxwEwm6Rwp1YOxD6NKoBM4nw5j0ZmxxxxxxP+QLA==", + "X-Debug-Log": "true", + "Content-Type": "application/json", + "Accept-Language": "de-DE", + "X-Brand": "volkswagen", + "X-Platform": "android", + "X-Device-Timezone": "Europe/Berlin", + "X-Sdk-Version": "4.5.4-(2025.18.0)", + "X-Use-BffError-V2": "true", + "X-Device-Manufacturer": "google", + "X-Device-Name": "Pixel 4a", + "X-Device-OS-Name": "13", + "X-Device-OS-Version": "33", }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - this.log.error("Failed to stop Charging"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - - return; - } - body && this.log.info(JSON.stringify(body)); - }, - ); + data: { sessionId }, + }) + .then((response) => { + this.log.info(JSON.stringify(response.data)); + }) + .catch((error) => { + this.log.error("Failed to stop Charging"); + this.log.error(error); + error.response && this.log.error(error.response.status.toString()); + error.response && this.log.error(JSON.stringify(error.response.data)); + }); } if (id.indexOf("Settings.") != -1) { if (this.config.type === "id" || this.config.type === "audietron") { @@ -6430,6 +6445,7 @@ class VwWeconnect extends utils.Adapter { } } catch (err) { this.log.error("Error in OnStateChange: " + err); + this.log.error(err.stack); } } diff --git a/package-lock.json b/package-lock.json index 35285435..ca8afdc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.8", + "version": "0.7.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.8", + "version": "0.7.9", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index 5cdfc976..b6cad9dc 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.8" + "version": "0.7.9" } From ec77a76eb3b151494ad383acf41f83fa3326be36 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 23 Mar 2025 09:33:48 +0100 Subject: [PATCH 705/729] add skoda wecharge --- main.js | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/main.js b/main.js index 44ebe2da..f9b23764 100644 --- a/main.js +++ b/main.js @@ -158,6 +158,7 @@ class VwWeconnect extends utils.Adapter { this.responseType = "code id_token"; this.xappversion = "8.0.0"; this.xappname = "cz.skodaauto.connect"; + this.xbrand = "skoda"; } if (this.config.type === "seat") { this.type = "Seat"; @@ -218,6 +219,7 @@ class VwWeconnect extends utils.Adapter { this.responseType = "code id_token token"; this.xappversion = ""; this.xappname = ""; + this.xbrand = "volkswagen"; } if (this.config.type === "audi") { this.log.info("Login in with audi as audietron"); @@ -890,6 +892,9 @@ class VwWeconnect extends utils.Adapter { this.vinArray.forEach((vin) => { this.getSkodaEStatus(vin); }); + if (this.pairedWallbox) { + this.getWcData(this.config.historyLimit); + } } else if (this.config.type === "audidata") { this.vinArray.forEach((vin) => { this.getAudiDataStatus(vin).catch(() => { @@ -1346,16 +1351,11 @@ class VwWeconnect extends utils.Adapter { async getVWToken(tokens, jwtid_token, reject, resolve) { if (this.config.type !== "audi" && this.config.type !== "audietron") { - if (this.config.type === "id") { - this.config.atoken = tokens.accessToken; - this.config.rtoken = tokens.refreshToken; - - //configure for wallcharging login - - this.refreshTokenInterval = setInterval(() => { - this.refreshIDToken().catch(() => {}); - }, 0.89 * 60 * 60 * 1000); // 0.9hours - this.log.info("ID login successfull"); + if (Object.keys(tokens).length > 0) { + this.config.atoken = tokens.access_token || tokens.accessToken; + this.config.rtoken = tokens.refresh_token || tokens.refreshToken; + } + if (this.config.type === "id" || this.config.type === "skodae") { this.log.info(`History limit: ${this.config.historyLimit}, set to -1 to disable wallcharging login`); if (this.config.historyLimit == -1) { this.log.info("History limit is set to -1, no wall charging login"); @@ -1377,7 +1377,7 @@ class VwWeconnect extends utils.Adapter { "X-Debug-Log": "true", "Content-Type": "application/json", "Accept-Language": "de-DE", - "X-Brand": "volkswagen", + "X-Brand": this.xbrand, "X-Platform": "android", "X-Device-Timezone": "Europe/Berlin", "X-Sdk-Version": "4.5.4-(2025.18.0)", @@ -1401,6 +1401,18 @@ class VwWeconnect extends utils.Adapter { this.log.info('No wallbox found code: "' + error.response.status + '"'); this.log.debug(error); }); + } + if (this.config.type === "id") { + this.config.atoken = tokens.accessToken; + this.config.rtoken = tokens.refreshToken; + + //configure for wallcharging login + + this.refreshTokenInterval = setInterval(() => { + this.refreshIDToken().catch(() => {}); + }, 0.89 * 60 * 60 * 1000); // 0.9hours + this.log.info("ID login successfull"); + resolve(); return; } @@ -1409,10 +1421,7 @@ class VwWeconnect extends utils.Adapter { this.secondAccessToken = tokens.accessToken; this.secondRefreshToken = tokens.refreshToken; } - if (Object.keys(tokens).length > 0) { - this.config.atoken = tokens.access_token || tokens.accessToken; - this.config.rtoken = tokens.refresh_token || tokens.refreshToken; - } + if (this.config.type === "seatelli" || this.config.type === "skodapower") { this.config.atoken = tokens.token; } @@ -4112,7 +4121,7 @@ class VwWeconnect extends utils.Adapter { "X-Debug-Log": "true", "Content-Type": "application/json", "Accept-Language": "de-DE", - "X-Brand": "volkswagen", + "X-Brand": this.xbrand, "X-Platform": "android", "X-Device-Timezone": "Europe/Berlin", "X-Sdk-Version": "4.5.4-(2025.18.0)", @@ -5694,7 +5703,7 @@ class VwWeconnect extends utils.Adapter { "X-Debug-Log": "true", "Content-Type": "application/json", "Accept-Language": "de-DE", - "X-Brand": "volkswagen", + "X-Brand": this.xbrand, "X-Platform": "android", "X-Device-Timezone": "Europe/Berlin", "X-Sdk-Version": "4.5.4-(2025.18.0)", @@ -5735,7 +5744,7 @@ class VwWeconnect extends utils.Adapter { "X-Debug-Log": "true", "Content-Type": "application/json", "Accept-Language": "de-DE", - "X-Brand": "volkswagen", + "X-Brand": this.xbrand, "X-Platform": "android", "X-Device-Timezone": "Europe/Berlin", "X-Sdk-Version": "4.5.4-(2025.18.0)", From 2016fd566615d92168d20afae1794f237209e569 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 14 Apr 2025 16:26:23 +0200 Subject: [PATCH 706/729] add debug logs --- main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.js b/main.js index f9b23764..99c71fab 100644 --- a/main.js +++ b/main.js @@ -2823,8 +2823,10 @@ class VwWeconnect extends utils.Adapter { this.reconnectCount = 0; if (this.mqttClient) { this.mqttClient.end(); + await this.sleep(1000); } + this.log.debug("Connecting to MQTT"); const fixedUUID = ".I3f23ae47-2eb0-43d4-b2c9-aa35c7b8cd2c"; this.mqttClient = mqtt.connect("mqtts://mqtt.messagehub.de:8883", { username: "android-app", @@ -4512,6 +4514,7 @@ class VwWeconnect extends utils.Adapter { } async refreshSkodaEToken() { + this.log.debug("Token Refresh started"); await axios({ method: "post", url: "https://mysmob.api.connect.skoda-auto.cz/api/v1/authentication/refresh-token?tokenType=CONNECT", @@ -4526,8 +4529,10 @@ class VwWeconnect extends utils.Adapter { }, }) .then((res) => { + this.log.debug("Token Refresh successful"); this.config.atoken = res.data.accessToken; this.config.rtoken = res.data.refreshToken; + this.log.debug("Start new mqtt connection"); this.connectMqtt(); }) .catch((error) => { From ef5ccb7d8d6b5cee01f2614933454d41cb8b5378 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 16 Apr 2025 15:20:20 +0200 Subject: [PATCH 707/729] add check for state not null --- main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 99c71fab..4f7278d5 100644 --- a/main.js +++ b/main.js @@ -3780,7 +3780,14 @@ class VwWeconnect extends utils.Adapter { " Please try again later:" + JSON.stringify(error.response.data), ); - return; + if (error.response && error.response.data.includes("state must not be null")) { + this.log.debug("Vehicle is not supporting " + status.path + " " + status.postfix); + if (!this.ignoredPaths[vin]) { + this.ignoredPaths[vin] = []; + } + this.ignoredPaths[vin].push(status.path + status.postfix); + return; + } this.log.error(JSON.stringify(error.response.data)); } From 1304068fd9186b8bd03329906878149cc7535443 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 16 Apr 2025 15:32:54 +0200 Subject: [PATCH 708/729] add return --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index 4f7278d5..01cc4f3e 100644 --- a/main.js +++ b/main.js @@ -3780,6 +3780,7 @@ class VwWeconnect extends utils.Adapter { " Please try again later:" + JSON.stringify(error.response.data), ); + if (error.response && error.response.data.includes("state must not be null")) { this.log.debug("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { @@ -3789,6 +3790,7 @@ class VwWeconnect extends utils.Adapter { return; } + return this.log.error(JSON.stringify(error.response.data)); } From 4bbf389fc557d66c17250862db6331b2a59d6c16 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 16 Apr 2025 15:34:22 +0200 Subject: [PATCH 709/729] fix typo --- main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 01cc4f3e..95cb394a 100644 --- a/main.js +++ b/main.js @@ -3780,7 +3780,6 @@ class VwWeconnect extends utils.Adapter { " Please try again later:" + JSON.stringify(error.response.data), ); - if (error.response && error.response.data.includes("state must not be null")) { this.log.debug("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { @@ -3788,9 +3787,9 @@ class VwWeconnect extends utils.Adapter { } this.ignoredPaths[vin].push(status.path + status.postfix); return; - + } + return; } - return this.log.error(JSON.stringify(error.response.data)); } From 6648be6fe05126a44e71355d454cd7c183b043e0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 16 Apr 2025 16:46:51 +0200 Subject: [PATCH 710/729] fix detection --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 95cb394a..54ea5d97 100644 --- a/main.js +++ b/main.js @@ -3780,7 +3780,7 @@ class VwWeconnect extends utils.Adapter { " Please try again later:" + JSON.stringify(error.response.data), ); - if (error.response && error.response.data.includes("state must not be null")) { + if (error.response && JSON.stringify(error.response.data).includes("state must not be null")) { this.log.debug("Vehicle is not supporting " + status.path + " " + status.postfix); if (!this.ignoredPaths[vin]) { this.ignoredPaths[vin] = []; From 2187cb547af1f3414f2ee12675ed39e8a552caf0 Mon Sep 17 00:00:00 2001 From: TA2k Date: Fri, 18 Apr 2025 09:43:55 +0200 Subject: [PATCH 711/729] move roles to buttons --- main.js | 174 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/main.js b/main.js index 54ea5d97..b55cc9a9 100644 --- a/main.js +++ b/main.js @@ -320,12 +320,12 @@ class VwWeconnect extends utils.Adapter { .then(() => { this.log.info("Login successful"); this.setState("info.connection", true, true); - this.setObjectNotExists("refresh", { + this.extendObject("refresh", { type: "state", common: { name: "Refresh All States", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, @@ -1972,7 +1972,7 @@ class VwWeconnect extends utils.Adapter { return; } this.vinArray.push(vin); - this.setObjectNotExists(element.vin, { + this.extendObject(element.vin, { type: "device", common: { name: element.nickname, @@ -1997,7 +1997,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Start/Stop Battery Charge", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2009,7 +2009,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Start/Stop Climatisation Target Temp => status.climatisationSettings", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2020,7 +2020,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Lock = True or Unlock = False Car", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2031,7 +2031,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Standheizung Aux Heating", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2042,7 +2042,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Scheibenheizung Window Heating", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2053,7 +2053,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Refresh Data", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2064,7 +2064,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Wake up car and refresh data only every 15min allowed", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2075,7 +2075,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Hupen und Licht Honk and Flash", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2086,13 +2086,13 @@ class VwWeconnect extends utils.Adapter { common: { name: "Licht Flash", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.lock", { + this.extendObject(vin + ".remote.lock", { type: "state", common: { name: "Lock ", @@ -2103,7 +2103,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); - this.setObjectNotExists(vin + ".remote.lockv2", { + this.extendObject(vin + ".remote.lockv2", { type: "state", common: { name: "Lock v2", @@ -2120,7 +2120,7 @@ class VwWeconnect extends utils.Adapter { if (this.config.type === "go") { body.forEach((element) => { const vin = element.vehicle.vin; - this.setObjectNotExists(element.vehicle.vin, { + this.extendObject(element.vehicle.vin, { type: "device", common: { name: element.licencePlate, @@ -2182,7 +2182,7 @@ class VwWeconnect extends utils.Adapter { body.forEach(async (element) => { const vin = element.vehicle.vin; this.vinArray.push(vin); - await this.setObjectNotExistsAsync(vin, { + await this.extendObjectAsync(vin, { type: "device", common: { name: vin, @@ -2229,23 +2229,23 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.charging", { + this.extendObject(vin + ".remote.charging", { type: "state", common: { name: "Start/Stop Battery Charge", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.climatisation", { + this.extendObject(vin + ".remote.climatisation", { type: "state", common: { name: "Start/Stop Climatisation", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, @@ -2255,7 +2255,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Lock = True or Unlock = False Car", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2266,13 +2266,13 @@ class VwWeconnect extends utils.Adapter { common: { name: "Scheibenheizung Window Heating", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.targetTemperatureInCelsius", { + this.extendObject(vin + ".remote.targetTemperatureInCelsius", { type: "state", common: { name: "Air-conditioning Temp in Celsius", @@ -2341,22 +2341,22 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.refresh", { + this.extendObject(vin + ".remote.refresh", { type: "state", common: { name: "Refresh Data from Server", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.charging", { + this.extendObject(vin + ".remote.charging", { type: "state", common: { name: "Start/Stop Battery Charge", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, @@ -2379,24 +2379,24 @@ class VwWeconnect extends utils.Adapter { common: { name: "Scheibenheizung Window Heating", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.air-conditioning", { + this.extendObject(vin + ".remote.air-conditioning", { type: "state", common: { name: "Start/Stop Air-conditioning", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.targetTemperatureInCelsius", { + this.extendObject(vin + ".remote.targetTemperatureInCelsius", { type: "state", common: { name: "Air-conditioning Temp in Celsius", @@ -2406,7 +2406,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.maxChargeCurrent", { + this.extendObject(vin + ".remote.maxChargeCurrent", { type: "state", common: { name: "Set maxChargeCurrent", @@ -2422,7 +2422,7 @@ class VwWeconnect extends utils.Adapter { common: { name: "Lock = True or Unlock = False Car", type: "boolean", - role: "boolean", + role: "button", def: false, write: true, }, @@ -2444,7 +2444,7 @@ class VwWeconnect extends utils.Adapter { body.data.userVehicles.forEach(async (element) => { const vin = element.vin; this.vinArray.push(vin); - await this.setObjectNotExistsAsync(element.vin, { + await this.extendObjectAsync(element.vin, { type: "device", common: { name: element.nickname, @@ -2461,7 +2461,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); }); - this.setObjectNotExists(element.vin, { + this.extendObject(element.vin, { type: "device", common: { name: element.nickname, @@ -2482,38 +2482,38 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.charging", { + this.extendObject(vin + ".remote.charging", { type: "state", common: { name: "Start/Stop Battery Charge", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.refresh", { + this.extendObject(vin + ".remote.refresh", { type: "state", common: { name: "Refresh", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.climatisation", { + this.extendObject(vin + ".remote.climatisation", { type: "state", common: { name: "Start/Stop Climatisation", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.climatisationv2", { + this.extendObject(vin + ".remote.climatisationv2", { type: "state", common: { name: "Start/Stop Climatisation v2", @@ -2523,17 +2523,17 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.climatisationv3", { + this.extendObject(vin + ".remote.climatisationv3", { type: "state", common: { name: "Start/Stop Climatisation", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vin + ".remote.maxChargeCurrent", { + this.extendObject(vin + ".remote.maxChargeCurrent", { type: "state", common: { name: "Set maxChargeCurrent", @@ -2543,7 +2543,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.chargeMinLimit", { + this.extendObject(vin + ".remote.chargeMinLimit", { type: "state", common: { name: "Set chargeMinLimit", @@ -2553,7 +2553,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vin + ".remote.windowheating", { + this.extendObject(vin + ".remote.windowheating", { type: "state", common: { name: "Start Windowheating", @@ -2581,7 +2581,7 @@ class VwWeconnect extends utils.Adapter { } this.vinArray.push(vehicle); - this.setObjectNotExists(vehicle, { + this.extendObject(vehicle, { type: "device", common: { name: vehicle.title, @@ -2592,7 +2592,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote", { + this.extendObject(vehicle + ".remote", { type: "state", common: { name: "Remote controls", @@ -2600,17 +2600,17 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.forceRefresh", { + this.extendObject(vehicle + ".remote.forceRefresh", { type: "state", common: { name: "force Refresh", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.batterycharge", { + this.extendObject(vehicle + ".remote.batterycharge", { type: "state", common: { name: "Start Battery Charge", @@ -2620,7 +2620,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.maxChargeCurrent", { + this.extendObject(vehicle + ".remote.maxChargeCurrent", { type: "state", common: { name: "Set maxChargeCurrent", @@ -2630,7 +2630,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.chargeMinLimit", { + this.extendObject(vehicle + ".remote.chargeMinLimit", { type: "state", common: { name: "Set chargeMinLimit", @@ -2640,7 +2640,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.climatisation", { + this.extendObject(vehicle + ".remote.climatisation", { type: "state", common: { name: "Start/Stop Climatisation", @@ -2650,7 +2650,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.climatisationv2", { + this.extendObject(vehicle + ".remote.climatisationv2", { type: "state", common: { name: "Start/Stop Climatisation v2", @@ -2660,7 +2660,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.climatisationv3", { + this.extendObject(vehicle + ".remote.climatisationv3", { type: "state", common: { name: "Start/Stop Climatisation v3", @@ -2670,7 +2670,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.climatisationTemperature", { + this.extendObject(vehicle + ".remote.climatisationTemperature", { type: "state", common: { name: "Temperature in °C", @@ -2680,7 +2680,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.windowheating", { + this.extendObject(vehicle + ".remote.windowheating", { type: "state", common: { name: "Start Windowheating", @@ -2690,7 +2690,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.honk", { + this.extendObject(vehicle + ".remote.honk", { type: "state", common: { name: "Start Honk", @@ -2700,7 +2700,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.flash", { + this.extendObject(vehicle + ".remote.flash", { type: "state", common: { name: "Start Flash", @@ -2710,7 +2710,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.standheizung", { + this.extendObject(vehicle + ".remote.standheizung", { type: "state", common: { name: "Standheizung aktiviert", @@ -2720,7 +2720,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.lock", { + this.extendObject(vehicle + ".remote.lock", { type: "state", common: { name: "Verriegeln (true) / Entriegeln (false)", @@ -2731,7 +2731,7 @@ class VwWeconnect extends utils.Adapter { native: {}, }); this.hasRemoteLock = true; - this.setObjectNotExists(vehicle + ".remote.ventilationv2", { + this.extendObject(vehicle + ".remote.ventilationv2", { type: "state", common: { name: "Ventilation aktiviert/deaktivieren", @@ -2741,7 +2741,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.ventilationv3", { + this.extendObject(vehicle + ".remote.ventilationv3", { type: "state", common: { name: "Ventilation/Standheizung Audi aktiviert/deaktivieren", @@ -2751,7 +2751,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.standheizungv2", { + this.extendObject(vehicle + ".remote.standheizungv2", { type: "state", common: { name: "Standheizung aktiviert/deaktivieren", @@ -2761,17 +2761,17 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.standheizungv3", { + this.extendObject(vehicle + ".remote.standheizungv3", { type: "state", common: { name: "Start/Stop Standheizung", type: "boolean", - role: "boolean", + role: "button", write: true, }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.lockv2", { + this.extendObject(vehicle + ".remote.lockv2", { type: "state", common: { name: "Verriegeln (true) / Entriegeln (false)", @@ -2781,7 +2781,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.ventilation", { + this.extendObject(vehicle + ".remote.ventilation", { type: "state", common: { name: "Start Ventilation", @@ -2791,7 +2791,7 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); - this.setObjectNotExists(vehicle + ".remote.ventilationDuration", { + this.extendObject(vehicle + ".remote.ventilationDuration", { type: "state", common: { name: "Dauer Lüftung in min", @@ -2974,7 +2974,7 @@ class VwWeconnect extends utils.Adapter { this.setOtherStatesInChannelNull(vin + ".status.accessStatus", timestamp - 1000); if (this.config.rawJson) { - await this.setObjectNotExistsAsync(vin + ".status" + "rawJson", { + await this.extendObjectAsync(vin + ".status" + "rawJson", { type: "state", common: { name: vin + ".status" + "rawJson", @@ -3413,7 +3413,7 @@ class VwWeconnect extends utils.Adapter { } this.json2iob.parse(vin + "." + endpoint.path, response.data, options); if (this.config.rawJson) { - await this.setObjectNotExistsAsync(vin + "." + endpoint.path + "rawJson", { + await this.extendObjectAsync(vin + "." + endpoint.path + "rawJson", { type: "state", common: { name: vin + "." + endpoint.path + "rawJson", @@ -3729,7 +3729,7 @@ class VwWeconnect extends utils.Adapter { } this.json2iob.parse(path, res.data); if (this.config.rawJson) { - await this.setObjectNotExistsAsync(path + "rawJson", { + await this.extendObjectAsync(path + "rawJson", { type: "state", common: { name: status.path + "rawJson", @@ -3977,7 +3977,7 @@ class VwWeconnect extends utils.Adapter { "Accept-Language": "de-DE", Authorization: "Bearer " + this.config.atoken, }; - await this.setObjectNotExistsAsync(path, { + await this.extendObjectAsync(path, { type: "device", common: { name: name, @@ -4272,7 +4272,7 @@ class VwWeconnect extends utils.Adapter { } } if (this.config.rawJson) { - this.setObjectNotExistsAsync(path + "rawJson", { + this.extendObjectAsync(path + "rawJson", { type: "state", common: { name: path + "rawJson", @@ -4978,7 +4978,7 @@ class VwWeconnect extends utils.Adapter { }); if (this.config.numberOfTrips > 0) result.tripData = result.tripData.slice(0, this.config.numberOfTrips); - this.setObjectNotExistsAsync(vin + ".tripdata" + tripType + ".rawJson", { + this.extendObjectAsync(vin + ".tripdata" + tripType + ".rawJson", { type: "state", common: { name: "Raw Json", @@ -4996,7 +4996,7 @@ class VwWeconnect extends utils.Adapter { this.log.error(error); }); - this.setObjectNotExistsAsync(vin + ".tripdata" + tripType + ".lastTrip", { + this.extendObjectAsync(vin + ".tripdata" + tripType + ".lastTrip", { type: "state", common: { name: "indexOfOldestTrip", @@ -5186,7 +5186,7 @@ class VwWeconnect extends utils.Adapter { statusFolder = ""; } this.log.debug("Set is car moving to " + isMoving); - await this.setObjectNotExistsAsync(vin + statusFolder + ".position.isMoving", { + await this.extendObjectAsync(vin + statusFolder + ".position.isMoving", { type: "state", common: { name: "is car moving", @@ -5201,7 +5201,7 @@ class VwWeconnect extends utils.Adapter { } async setIsCarLocked(vin, value) { - await this.setObjectNotExistsAsync(vin + ".status.isCarLocked", { + await this.extendObjectAsync(vin + ".status.isCarLocked", { type: "state", common: { name: "is car locked", @@ -5216,7 +5216,7 @@ class VwWeconnect extends utils.Adapter { } async setOutsideTemperature(vin, value) { - await this.setObjectNotExistsAsync(vin + ".status.outsideTemperature", { + await this.extendObjectAsync(vin + ".status.outsideTemperature", { type: "state", common: { name: "outside temperature", @@ -6472,7 +6472,7 @@ class VwWeconnect extends utils.Adapter { } async setPositionChanel(vin) { - await this.setObjectNotExistsAsync(vin + ".position", { + await this.extendObjectAsync(vin + ".position", { type: "channel", common: { name: "Position", @@ -6483,7 +6483,7 @@ class VwWeconnect extends utils.Adapter { async setLatitude(vin, value) { await this.setPositionChanel(vin); - await this.setObjectNotExistsAsync(vin + ".position.latitudeConv", { + await this.extendObjectAsync(vin + ".position.latitudeConv", { type: "state", common: { name: "latitude converted", @@ -6500,7 +6500,7 @@ class VwWeconnect extends utils.Adapter { async setLongitude(vin, value) { await this.setPositionChanel(); - await this.setObjectNotExistsAsync(vin + ".position.longitudeConv", { + await this.extendObjectAsync(vin + ".position.longitudeConv", { type: "state", common: { name: "longitude converted", @@ -6552,7 +6552,7 @@ class VwWeconnect extends utils.Adapter { const latitudeValue = latitude.val; const longitudeValue = longitude.val; - await this.setObjectNotExistsAsync(vin + ".position.geohash", { + await this.extendObjectAsync(vin + ".position.geohash", { type: "state", common: { name: "Geohash", @@ -6616,7 +6616,7 @@ class VwWeconnect extends utils.Adapter { city + ", " + body.address.country; - await this.setObjectNotExistsAsync(vin + ".position.address.displayName", { + await this.extendObjectAsync(vin + ".position.address.displayName", { type: "state", common: { name: "displayName", @@ -6631,7 +6631,7 @@ class VwWeconnect extends utils.Adapter { const keys = Object.keys(body.address); for (const keyIndex in keys) { const key = keys[keyIndex]; - await this.setObjectNotExistsAsync(vin + ".position.address." + key, { + await this.extendObjectAsync(vin + ".position.address." + key, { type: "state", common: { name: key, From 7603ea646354e33f284623a68a7de7c061886da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ublein?= Date: Fri, 2 May 2025 19:50:56 +0200 Subject: [PATCH 712/729] add ventilation --- main.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index b55cc9a9..dc3c9a51 100644 --- a/main.js +++ b/main.js @@ -2395,6 +2395,16 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".remote.ventilation", { + type: "state", + common: { + name: "Start/Stop ventilation", + type: "boolean", + role: "button", + write: true, + }, + native: {}, + }); this.extendObject(vin + ".remote.targetTemperatureInCelsius", { type: "state", @@ -3650,7 +3660,7 @@ class VwWeconnect extends utils.Adapter { }, { path: "vehicle-maintenance/vehicles", version: "v3", postfix: "" }, { path: "air-conditioning", version: "v2", postfix: "" }, - { path: "air-conditioning", version: "v2", postfix: "/active-ventilation" }, + { path: "air-conditioning", version: "v2", postfix: "/active-ventilation", name: "ventilation" }, { path: "air-conditioning", version: "v2", postfix: "/auxiliary-heating", name: "auxiliary-heating" }, { path: "air-conditioning", version: "v1", postfix: "/settings" }, // { path: "air-conditioning", version: "v1", postfix: "/timers" }, @@ -5989,6 +5999,15 @@ class VwWeconnect extends utils.Adapter { return; } } + if (action === "ventilation") { + if (this.config.type === "skodae") { + const value = state.val ? "start" : "stop"; + this.setSkodaESettings(vin, action, value).catch(() => { + this.log.error("failed set state " + action); + }); + return; + } + } if (action === "targetTemperatureInCelsius") { if (this.config.type === "skodae") { this.setSkodaESettings(vin, action, state.val).catch(() => { @@ -6423,6 +6442,11 @@ class VwWeconnect extends utils.Adapter { this.setState(vin + ".remote.air-conditioning", state.val === "On" ? true : false, true); } } + if (id.indexOf("ventilation.status.state") !== -1) { + if (this.config.type === "skodae") { + this.setState(vin + ".remote.ventilation", state.val === "On" ? true : false, true); + } + } if (id.indexOf("settings.targetTemperatureInKelvin") !== -1) { if (this.config.type === "skodae") { this.setState(vin + ".remote.targetTemperatureInCelsius", state.val - 273.15, true); From 65b09763cf9fe3a1f548a72120a8ca55cdcd7da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ublein?= Date: Fri, 2 May 2025 20:52:33 +0200 Subject: [PATCH 713/729] fix url for active ventilation --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index dc3c9a51..53d6bf51 100644 --- a/main.js +++ b/main.js @@ -3896,6 +3896,9 @@ class VwWeconnect extends utils.Adapter { url = "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/settings/target-temperature"; } + if (action === "ventilation") { + url = "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/active-ventilation/" + value; + } const method = "POST"; From 3d50386550feada66e90887a594e6db0bbbb098b Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 5 May 2025 15:11:27 +0200 Subject: [PATCH 714/729] chore: release v0.7.10 - fix for skoda refresh toke --- README.md | 4 +++ io-package.json | 28 ++++++++-------- main.js | 81 +++++++++++++++++++++++------------------------ package-lock.json | 4 +-- package.json | 2 +- 5 files changed, 61 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 62930914..041e0c25 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ You can set climatisaton temperature in ## Changelog +### 0.7.10 (2025-05-05) + +- fix for skoda refresh token + ### 0.7.9 (2025-03-20) - fix for id wall charger diff --git a/io-package.json b/io-package.json index b7012aa3..873de086 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.9", + "version": "0.7.10", "news": { + "0.7.10": { + "en": "fix for skoda refresh token", + "de": "fix für skoda refresh token", + "ru": "обновление skoda refresh toke", + "pt": "corrigir para skoda refrescar toke", + "nl": "fix voor skoda refresh toke", + "fr": "fix pour skoda rafraîchissement toke", + "it": "correzione per skoda rinfrescare toke", + "es": "fijado para skoda refresco toke", + "pl": "fix for skoda refresh toke", + "uk": "закріпити для skoda освіжаючий токе", + "zh-cn": "用于 skoda 刷新脚趾" + }, "0.7.9": { "en": "fix for id wall charger", "de": "Fix für id wall charger", @@ -80,19 +93,6 @@ "pl": "fix for skoda logowanie", "uk": "виправлення для входу в скоду", "zh-cn": "用于 skoda 登录的修复" - }, - "0.6.0": { - "en": "add additonal cupra states", - "de": "Zusätzliche Cupra States hinzugefügt", - "ru": "добавочные состояния", - "pt": "additonal cupra estados", - "nl": "additunal cupra states toevoegen", - "fr": "ajouter les états cupra additonal", - "it": "aggiungere stati cupra additonali", - "es": "añadir estados de cúpula", - "pl": "additonal cupra states", - "uk": "additonal cupra стани", - "zh-cn": "添加额外 cupra 状态" } }, "title": "VW Connect", diff --git a/main.js b/main.js index b55cc9a9..5892f8a2 100644 --- a/main.js +++ b/main.js @@ -1359,48 +1359,47 @@ class VwWeconnect extends utils.Adapter { this.log.info(`History limit: ${this.config.historyLimit}, set to -1 to disable wallcharging login`); if (this.config.historyLimit == -1) { this.log.info("History limit is set to -1, no wall charging login"); - resolve(); - return; - } - //check paired wallbox - await axios({ - method: "get", - maxBodyLength: Infinity, - url: "https://prod.emea.mobile.charging.cariad.digital/headless/charging_stations/check_paired", - headers: { - "X-Api-Version": "1", - traceparent: "00-96318317ce184ee8b7e9528586f4ffec-2b2afd705c4a4a58-01", - Authorization: "Bearer " + this.config.atoken, - Host: "prod.emea.mobile.charging.cariad.digital", - Connection: "Keep-Alive", - "User-Agent": "okhttp/4.12.0", - "X-Debug-Log": "true", - "Content-Type": "application/json", - "Accept-Language": "de-DE", - "X-Brand": this.xbrand, - "X-Platform": "android", - "X-Device-Timezone": "Europe/Berlin", - "X-Sdk-Version": "4.5.4-(2025.18.0)", - "X-Use-BffError-V2": "true", - "X-Device-Manufacturer": "google", - "X-Device-Name": "Pixel 4a", - "X-Device-OS-Name": "13", - "X-Device-OS-Version": "33", - }, - }) - .then((response) => { - if (response.data && response.data.hasPairedChargingStation) { - this.log.info("Wallbox is paired"); - this.pairedWallbox = true; - this.getWcData(this.config.historyLimit); - } else { - this.log.info("Wallbox is not paired"); - } + } else { + //check paired wallbox + await axios({ + method: "get", + maxBodyLength: Infinity, + url: "https://prod.emea.mobile.charging.cariad.digital/headless/charging_stations/check_paired", + headers: { + "X-Api-Version": "1", + traceparent: "00-96318317ce184ee8b7e9528586f4ffec-2b2afd705c4a4a58-01", + Authorization: "Bearer " + this.config.atoken, + Host: "prod.emea.mobile.charging.cariad.digital", + Connection: "Keep-Alive", + "User-Agent": "okhttp/4.12.0", + "X-Debug-Log": "true", + "Content-Type": "application/json", + "Accept-Language": "de-DE", + "X-Brand": this.xbrand, + "X-Platform": "android", + "X-Device-Timezone": "Europe/Berlin", + "X-Sdk-Version": "4.5.4-(2025.18.0)", + "X-Use-BffError-V2": "true", + "X-Device-Manufacturer": "google", + "X-Device-Name": "Pixel 4a", + "X-Device-OS-Name": "13", + "X-Device-OS-Version": "33", + }, }) - .catch((error) => { - this.log.info('No wallbox found code: "' + error.response.status + '"'); - this.log.debug(error); - }); + .then((response) => { + if (response.data && response.data.hasPairedChargingStation) { + this.log.info("Wallbox is paired"); + this.pairedWallbox = true; + this.getWcData(this.config.historyLimit); + } else { + this.log.info("Wallbox is not paired"); + } + }) + .catch((error) => { + this.log.info('No wallbox found code: "' + error.response.status + '"'); + this.log.debug(error); + }); + } } if (this.config.type === "id") { this.config.atoken = tokens.accessToken; diff --git a/package-lock.json b/package-lock.json index ca8afdc3..f93df3ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.9", + "version": "0.7.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.9", + "version": "0.7.10", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index b6cad9dc..45b57db1 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.9" + "version": "0.7.10" } From d3b5636f34b3f2b61ab61519d7b787753873e844 Mon Sep 17 00:00:00 2001 From: TA2k Date: Mon, 5 May 2025 15:14:07 +0200 Subject: [PATCH 715/729] 0.7.11 --- README.md | 3 ++- io-package.json | 8 ++++---- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 041e0c25..1f137cb4 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,10 @@ You can set climatisaton temperature in ## Changelog -### 0.7.10 (2025-05-05) +### 0.7.11 (2025-05-05) - fix for skoda refresh token +- fix for ventilation activation ### 0.7.9 (2025-03-20) diff --git a/io-package.json b/io-package.json index 873de086..22e94b4b 100644 --- a/io-package.json +++ b/io-package.json @@ -1,11 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.7.10", + "version": "0.7.11", "news": { - "0.7.10": { - "en": "fix for skoda refresh token", - "de": "fix für skoda refresh token", + "0.7.11": { + "en": "fix for skoda refresh token and ventilation activation", + "de": "fix für skoda refresh token und Lüftungsaktivierung", "ru": "обновление skoda refresh toke", "pt": "corrigir para skoda refrescar toke", "nl": "fix voor skoda refresh toke", diff --git a/package-lock.json b/package-lock.json index f93df3ea..055ed34b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.10", + "version": "0.7.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.10", + "version": "0.7.11", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index 45b57db1..a6376ede 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.10" + "version": "0.7.11" } From 517928eca97e7a68ee7247ac9bb8e4bcafec3474 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 6 May 2025 22:13:17 +0200 Subject: [PATCH 716/729] 0.7.12 --- README.md | 3 ++- io-package.json | 8 ++++---- main.js | 15 ++++++++++++++- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1f137cb4..8366feff 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,11 @@ You can set climatisaton temperature in ## Changelog -### 0.7.11 (2025-05-05) +### 0.7.12 (2025-05-05) - fix for skoda refresh token - fix for ventilation activation +- add new not supported endpoints ### 0.7.9 (2025-03-20) diff --git a/io-package.json b/io-package.json index 22e94b4b..11a619ff 100644 --- a/io-package.json +++ b/io-package.json @@ -1,11 +1,11 @@ { "common": { "name": "vw-connect", - "version": "0.7.11", + "version": "0.7.12", "news": { - "0.7.11": { - "en": "fix for skoda refresh token and ventilation activation", - "de": "fix für skoda refresh token und Lüftungsaktivierung", + "0.7.12": { + "en": "fix for skoda refresh token and ventilation activation and add new ignored endpoints", + "de": "fix für skoda refresh token und Lüftungsaktivierung und neue ignorierte Endpunkte hinzufügen", "ru": "обновление skoda refresh toke", "pt": "corrigir para skoda refrescar toke", "nl": "fix voor skoda refresh toke", diff --git a/main.js b/main.js index 90630930..ed5ca22b 100644 --- a/main.js +++ b/main.js @@ -3797,6 +3797,18 @@ class VwWeconnect extends utils.Adapter { this.ignoredPaths[vin].push(status.path + status.postfix); return; } + if ( + error.response && + JSON.stringify(error.response.data).includes("Internal server error") && + status.path === "air-conditioning" + ) { + this.log.debug("Vehicle is not supporting " + status.path + " " + status.postfix); + if (!this.ignoredPaths[vin]) { + this.ignoredPaths[vin] = []; + } + this.ignoredPaths[vin].push(status.path + status.postfix); + return; + } return; } this.log.error(JSON.stringify(error.response.data)); @@ -3896,7 +3908,8 @@ class VwWeconnect extends utils.Adapter { "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/settings/target-temperature"; } if (action === "ventilation") { - url = "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/active-ventilation/" + value; + url = + "https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/" + vin + "/active-ventilation/" + value; } const method = "POST"; diff --git a/package-lock.json b/package-lock.json index 055ed34b..36403c54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.11", + "version": "0.7.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.11", + "version": "0.7.12", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.2.3", diff --git a/package.json b/package.json index a6376ede..f93851a8 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.11" + "version": "0.7.12" } From d59d3f600b8fc35deb9a82ca1da66a285d02ea42 Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 7 May 2025 19:26:11 +0200 Subject: [PATCH 717/729] forceindex --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index ed5ca22b..b5e31cde 100644 --- a/main.js +++ b/main.js @@ -3328,6 +3328,7 @@ class VwWeconnect extends utils.Adapter { { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v3/vehicles/${vin}/warninglights`, path: "warninglights", + options: { forceIndex: true }, }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v5/users/${this.seatcupraUser}/vehicles/${vin}/mycar`, @@ -3406,7 +3407,7 @@ class VwWeconnect extends utils.Adapter { return; } } - const options = {}; + const options = endpoint.options || {}; if (endpoint.path === "tripLong" || endpoint.path === "tripCyclic") { //reverse data array by tripId if (!response.data.data) { From 38519cc704f9c3837f5b900e0dddab8dea2b2dea Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 9 Nov 2025 18:22:59 +0100 Subject: [PATCH 718/729] fix skoda login --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index b5e31cde..b4995e47 100644 --- a/main.js +++ b/main.js @@ -155,7 +155,7 @@ class VwWeconnect extends utils.Adapter { "address badge birthdate cars driversLicense dealers email mileage mbb nationalIdentifier openid phone profession profile vin"; this.redirect = "myskoda%3A%2F%2Fredirect%2Flogin%2F"; this.xrequest = "cz.skodaauto.connect"; - this.responseType = "code id_token"; + this.responseType = "code"; this.xappversion = "8.0.0"; this.xappname = "cz.skodaauto.connect"; this.xbrand = "skoda"; @@ -1199,7 +1199,8 @@ class VwWeconnect extends utils.Adapter { body += "&code_verifier=" + code_verifier; } if (this.config.type === "skodae") { - const parsedParameters = qs.parse(hash); + // Parse query parameters instead of hash (VW/Skoda changed the login flow) + const parsedParameters = qs.parse(getRequest.uri.query || hash); // this.config.atoken = parsedParameters.access_token; let systemId = "TECHNICAL"; if (this.clientId === "7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com") { From 975fcd6d5a5ec234559394c2ac5e3373a5e8ee11 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 9 Nov 2025 19:06:55 +0100 Subject: [PATCH 719/729] chore: release v0.7.13 - fix for skoda login --- README.md | 2 + io-package.json | 43 ++- package-lock.json | 829 ++++++++++++++++++++++------------------------ package.json | 24 +- 4 files changed, 443 insertions(+), 455 deletions(-) diff --git a/README.md b/README.md index 8366feff..1c1c27e7 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.7.13 (2025-11-09) +- fix for skoda login ### 0.7.12 (2025-05-05) diff --git a/io-package.json b/io-package.json index 11a619ff..bd4cac8e 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.12", + "version": "0.7.13", "news": { + "0.7.13": { + "en": "fix for skoda login", + "de": "fix für skoda login", + "ru": "обсуждение skoda login", + "pt": "correção para o login do skoda", + "nl": "fix voor skoda login", + "fr": "correction pour la connexion skoda", + "it": "correzione per skoda login", + "es": "fix for skoda login", + "pl": "fix for skoda logowanie", + "uk": "виправлення для входу в скоду", + "zh-cn": "用于 skoda 登录的修复" + }, "0.7.12": { "en": "fix for skoda refresh token and ventilation activation and add new ignored endpoints", "de": "fix für skoda refresh token und Lüftungsaktivierung und neue ignorierte Endpunkte hinzufügen", @@ -80,19 +93,6 @@ "pl": "fixed for skoda and seat\nProszę usunąć stare stany pod obiektami", "uk": "кріплення для соди і сидіння\nДержавна структура змінилася комплетально, будь ласка, видаліть старі стани під об'єктами", "zh-cn": "斯柯达和座位的固定\n国家结构已完全更改, 请删除对象下的旧状态" - }, - "0.6.1": { - "en": "fix for skoda login", - "de": "fix für skoda login", - "ru": "исправить для skoda login", - "pt": "correção para o login skoda", - "nl": "fix voor skoda login", - "fr": "correction pour la connexion skoda", - "it": "correzione per skoda login", - "es": "fix for skoda login", - "pl": "fix for skoda logowanie", - "uk": "виправлення для входу в скоду", - "zh-cn": "用于 skoda 登录的修复" } }, "title": "VW Connect", @@ -120,7 +120,10 @@ "pl": "Adapter do VW Connect", "zh-cn": "大众我们连接的适配器" }, - "authors": ["ta2k ", "Sneak-L8 "], + "authors": [ + "ta2k ", + "Sneak-L8 " + ], "keywords": [ "VW", "Connect", @@ -163,7 +166,10 @@ { "condition": { "operand": "and", - "rules": ["oldVersion<0.7.0", "newVersion>=0.7.0"] + "rules": [ + "oldVersion<0.7.0", + "newVersion>=0.7.0" + ] }, "title": { "en": "Adapter Change for Skoda and Seat", @@ -192,7 +198,10 @@ "zh-cn": "适配器已完全更改为 Skoda 和 Seat。请删除旧状态,并将您的 vis 和脚本调整为新状态。" }, "level": "warn", - "buttons": ["agree", "cancel"] + "buttons": [ + "agree", + "cancel" + ] } ], "native": { diff --git a/package-lock.json b/package-lock.json index 36403c54..caed6125 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "iobroker.vw-connect", - "version": "0.7.12", + "version": "0.7.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.12", + "version": "0.7.13", "license": "MIT", "dependencies": { - "@iobroker/adapter-core": "^3.2.3", + "@iobroker/adapter-core": "^3.3.2", "@peculiar/webcrypto": "^1.5.0", - "axios": "^1.8.4", + "axios": "^1.13.2", "json-bigint": "^1.0.0", - "json2iob": "^2.6.17", - "mqtt": "^5.10.4", + "json2iob": "^2.6.21", + "mqtt": "^5.14.1", "ngeohash": "^0.6.3", "qs": "^6.14.0", "request": "^2.88.2", @@ -26,19 +26,30 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "^9.22.0", - "@iobroker/testing": "^5.0.3", - "@types/node": "^22.13.10", - "eslint": "^9.22.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "^9.39.1", + "@iobroker/testing": "^5.2.2", + "@types/node": "^22.19.0", + "eslint": "^9.39.1", "eslint-plugin-promise": "^7.2.1", - "globals": "^16.0.0", - "typescript": "~5.8.2" + "globals": "^16.5.0", + "typescript": "~5.9.3" }, "engines": { "node": ">=10.0.0" } }, + "node_modules/@alcalzone/esbuild-register": { + "version": "2.5.1-1", + "resolved": "https://registry.npmjs.org/@alcalzone/esbuild-register/-/esbuild-register-2.5.1-1.tgz", + "integrity": "sha512-u19/K/ZaiWQhYIQZeF2FImUeJDiMD4i2h7qPdU0HVFCxoQynye59N4oy6EvjxeXaxLnGkppcb5KKeiYD4cT1iQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.11.5", + "jsonc-parser": "^3.0.0" + } + }, "node_modules/@alcalzone/pak": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.10.2.tgz", @@ -242,21 +253,18 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", - "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "dependencies": { @@ -296,13 +304,13 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", - "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.6", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -311,19 +319,22 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.1.0.tgz", - "integrity": "sha512-kLrdPDJE1ckPo94kmPPf9Hfd0DU0Jw6oKYrhe+pwSC0iTUInmTa+w6fw8sGgcfkFJGNdWOUeOaDM4quW4a7OkA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", - "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -334,9 +345,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz", - "integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { @@ -371,19 +382,22 @@ } }, "node_modules/@eslint/js": { - "version": "9.22.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.22.0.tgz", - "integrity": "sha512-vLFajx9o8d1/oL2ZkpMYbkLv8nDB6yaIwFNt7nI4+I80U/z03SxmfOMsLbvWr3p7C+Wnoh//aOu2pQW8cS0HCQ==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -391,13 +405,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", - "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.12.0", + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { @@ -471,9 +485,9 @@ } }, "node_modules/@iobroker/adapter-core": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.2.3.tgz", - "integrity": "sha512-ktk2KGexzOAbUZpkv/9JATJvO2DUHIfQAWhtpRjLxcR3+hs5/73hvt46XPSqwSpY/wnw5+E7kM7BqkfN7G19IQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.3.2.tgz", + "integrity": "sha512-knuCX6F1JUTnY1OdHzDhwNtOoe9/RZgBziDKSzCO3E4koteY/KRqZ7gtzmoavcAokejG68S5osbEnIb4MYT3VA==", "license": "MIT", "engines": { "node": ">=16" @@ -483,19 +497,26 @@ } }, "node_modules/@iobroker/testing": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-5.0.3.tgz", - "integrity": "sha512-vPEtxVzOFTcgNKGGsInzV5Q61OHuKst7iJWN7vnr5jETk1l5W4lRnSI/AoiaSO34vINknyyOiXm7ZRcDjoy7ag==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-5.2.2.tgz", + "integrity": "sha512-AiYi9qziPLiNDcwZJa3tcgdSjIq9lq7z4QFvWY9w099chmKOWyvUgWzDy3S/R3L7lJ0yviOeNEdpOHtX4wTf6g==", "dev": true, "license": "MIT", "dependencies": { + "@alcalzone/esbuild-register": "^2.5.1-1", + "@types/chai": "^4.3.20", + "@types/chai-as-promised": "^7.1.8", + "@types/mocha": "^10.0.10", + "@types/sinon": "^17.0.4", + "@types/sinon-chai": "^3.2.12", "alcalzone-shared": "~5.0.0", "chai": "^4.5.0", "chai-as-promised": "^7.1.2", - "debug": "^4.4.0", - "fs-extra": "^11.3.0", - "mocha": "^11.0.1", - "sinon": "^19.0.2", + "debug": "^4.4.3", + "fs-extra": "^11.3.2", + "json5": "^2.2.3", + "mocha": "^11.7.3", + "sinon": "^21.0.0", "sinon-chai": "^3.7.0" } }, @@ -510,9 +531,9 @@ } }, "node_modules/@iobroker/testing/node_modules/fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", "dev": true, "license": "MIT", "dependencies": { @@ -553,9 +574,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -566,9 +587,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -673,12 +694,22 @@ "type-detect": "^4.1.0" } }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", - "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", "dev": true, - "license": "(Unlicense OR Apache-2.0)" + "license": "MIT", + "dependencies": { + "@types/chai": "*" + } }, "node_modules/@types/estree": { "version": "1.0.6", @@ -700,29 +731,63 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { - "version": "22.13.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz", - "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", + "version": "22.19.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.0.tgz", + "integrity": "sha512-xpr/lmLPQEj+TUnHmR+Ab91/glhJvsqcjB+yY0Ix9GO70H6Lb4FHH5GeqdOE5btAx7eIMwuHkp4H2MSkLcqWbA==", "license": "MIT", "dependencies": { - "undici-types": "~6.20.0" + "undici-types": "~6.21.0" } }, "node_modules/@types/readable-stream": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz", - "integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==", + "version": "4.0.22", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.22.tgz", + "integrity": "sha512-/FFhJpfCLAPwAcN3mFycNUa77ddnr8jTgF5VmSNetaemWB2cIlfCA9t0YTM3JAT0wOcv8D4tjPo7pkDhK3EJIg==", "license": "MIT", "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" + "@types/node": "*" } }, + "node_modules/@types/sinon": { + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", + "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/sinonjs__fake-timers": "*" + } + }, + "node_modules/@types/sinon-chai": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", + "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "*", + "@types/sinon": "*" + } + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-15.0.1.tgz", + "integrity": "sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/ws": { - "version": "8.5.14", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", - "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -741,11 +806,12 @@ } }, "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -828,20 +894,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -974,13 +1026,13 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", - "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -1029,23 +1081,10 @@ "node": "*" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bl": { - "version": "6.0.19", - "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.19.tgz", - "integrity": "sha512-4Ay3A3oDfGg3GGirhl4s62ebtnk0pJZA5mLp672MPKOQXsWvXjEF4dqdXySjJIs7b9OVr/O8aOo0Lm+xdjo2JA==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/bl/-/bl-6.1.4.tgz", + "integrity": "sha512-ZV/9asSuknOExbM/zPPA8z00lc1ihPKWaStHkkQrxHNeYx+yY+TmF+v80dpv2G0mv3HVXBu7ryoAsxbFFhf4eg==", "license": "MIT", "dependencies": { "@types/readable-stream": "^4.0.0", @@ -1065,17 +1104,16 @@ "concat-map": "0.0.1" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "node_modules/broker-factory": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/broker-factory/-/broker-factory-3.1.10.tgz", + "integrity": "sha512-BzqK5GYFhvVFvO13uzPN0SCiOsOQuhMUbsGvTXDJMA2/N4GvIlFdxEuueE+60Zk841bBU5G3+fl2cqYEo0wgGg==", "license": "MIT", "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" + "@babel/runtime": "^7.28.4", + "fast-unique-numbers": "^9.0.24", + "tslib": "^2.8.1", + "worker-factory": "^7.0.46" } }, "node_modules/browser-stdout": { @@ -1197,6 +1235,7 @@ "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -1254,41 +1293,19 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" } }, "node_modules/cliui": { @@ -1505,9 +1522,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1598,9 +1615,9 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -1786,6 +1803,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esbuild": { + "version": "0.11.23", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.23.tgz", + "integrity": "sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -1810,33 +1838,33 @@ } }, "node_modules/eslint": { - "version": "9.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.22.0.tgz", - "integrity": "sha512-9V/QURhsRN40xuHXWjV64yvrzMjcz7ZyNoF2jJFmy9j/SLk0u1OLSZgXi28MrXjymnjEGSR80WCdab3RGMDveQ==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.2", - "@eslint/config-helpers": "^0.1.0", - "@eslint/core": "^0.12.0", - "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "9.22.0", - "@eslint/plugin-kit": "^0.2.7", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1890,9 +1918,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", - "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -1907,9 +1935,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1920,15 +1948,15 @@ } }, "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.14.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2060,16 +2088,16 @@ "license": "MIT" }, "node_modules/fast-unique-numbers": { - "version": "8.0.13", - "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-8.0.13.tgz", - "integrity": "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g==", + "version": "9.0.24", + "resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-9.0.24.tgz", + "integrity": "sha512-Dv0BYn4waOWse94j16rsZ5w/0zoaCa74O3q6IZjMqaXbtT92Q+Sb6pPk+phGzD8Xh+nueQmSRI3tSCaHKidzKw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.8", - "tslib": "^2.6.2" + "@babel/runtime": "^7.28.4", + "tslib": "^2.8.1" }, "engines": { - "node": ">=16.1.0" + "node": ">=18.2.0" } }, "node_modules/file-entry-cache": { @@ -2085,19 +2113,6 @@ "node": ">=16.0.0" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2221,14 +2236,15 @@ } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "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": { @@ -2250,21 +2266,6 @@ "node": ">=12" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2434,9 +2435,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2460,9 +2461,9 @@ } }, "node_modules/globals": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", - "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", "dev": true, "license": "MIT", "engines": { @@ -2750,6 +2751,15 @@ "node": ">= 0.4" } }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, "node_modules/is-array-buffer": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", @@ -2801,19 +2811,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-boolean-object": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", @@ -2953,16 +2950,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/is-number-object": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", @@ -2979,6 +2966,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -3263,9 +3260,9 @@ "license": "ISC" }, "node_modules/json2iob": { - "version": "2.6.17", - "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.17.tgz", - "integrity": "sha512-6TUZaIgNyrQ+NvfMXu3i3JanjWtps0AHNFWJmx2LsC/2q1Zxfw9RS+D363fx5rL4v1FXBREaLWQ/dGWnaQ7MFg==", + "version": "2.6.21", + "resolved": "https://registry.npmjs.org/json2iob/-/json2iob-2.6.21.tgz", + "integrity": "sha512-BPXkq9a8oWDdYFxt9pA7GrBGrH+Q7ZzYiJhIKNpdAaFfiFAvkeqVnMWro+cbC+SNVhVJR5nvfmMR8rvTKnDJyA==", "license": "MIT", "dependencies": { "@types/json-bigint": "^1.0.4", @@ -3275,6 +3272,26 @@ "node": ">=16" } }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -3303,13 +3320,6 @@ "node": ">=0.6.0" } }, - "node_modules/just-extend": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", - "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", - "dev": true, - "license": "MIT" - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -3478,29 +3488,30 @@ } }, "node_modules/mocha": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.1.0.tgz", - "integrity": "sha512-8uJR5RTC2NgpY3GrYcgpZrsEd9zKbPDpob1RezyR2upGHRQtHWofmzTMzTMSV6dru3tj5Ukt0+Vnq1qhFEEwAg==", + "version": "11.7.5", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz", + "integrity": "sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig==", "dev": true, "license": "MIT", "dependencies": { - "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", + "chokidar": "^4.0.1", "debug": "^4.3.5", - "diff": "^5.2.0", + "diff": "^7.0.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", "glob": "^10.4.5", "he": "^1.2.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", + "minimatch": "^9.0.5", "ms": "^2.1.3", + "picocolors": "^1.1.1", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", - "workerpool": "^6.5.1", + "workerpool": "^9.2.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1", "yargs-unparser": "^2.0.0" @@ -3514,9 +3525,9 @@ } }, "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3524,18 +3535,28 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/mocha/node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3553,27 +3574,27 @@ } }, "node_modules/mqtt": { - "version": "5.10.4", - "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.4.tgz", - "integrity": "sha512-wN+SuhT2/ZaG6NPxca0N6YtRivnMxk6VflxQUEeqDH4erKdj+wPAGhHmcTLzvqfE4sJRxrEJ+XJxUc0No0E7eQ==", + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.14.1.tgz", + "integrity": "sha512-NxkPxE70Uq3Ph7goefQa7ggSsVzHrayCD0OyxlJgITN/EbzlZN+JEPmaAZdxP1LsIT5FamDyILoQTF72W7Nnbw==", "license": "MIT", "dependencies": { - "@types/readable-stream": "^4.0.18", - "@types/ws": "^8.5.14", + "@types/readable-stream": "^4.0.21", + "@types/ws": "^8.18.1", "commist": "^3.2.0", "concat-stream": "^2.0.0", - "debug": "^4.4.0", + "debug": "^4.4.1", "help-me": "^5.0.0", "lru-cache": "^10.4.3", "minimist": "^1.2.8", - "mqtt-packet": "^9.0.1", + "mqtt-packet": "^9.0.2", "number-allocator": "^1.0.14", "readable-stream": "^4.7.0", - "reinterval": "^1.1.0", "rfdc": "^1.4.1", + "socks": "^2.8.6", "split2": "^4.2.0", - "worker-timers": "^7.1.8", - "ws": "^8.18.0" + "worker-timers": "^8.0.23", + "ws": "^8.18.3" }, "bin": { "mqtt": "build/bin/mqtt.js", @@ -3585,9 +3606,9 @@ } }, "node_modules/mqtt-packet": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.1.tgz", - "integrity": "sha512-koZF1V/X2RZUI6uD9wN5OK1JxxcG1ofAR4H3LjCw1FkeKzruZQ26aAA6v2m1lZyWONZIR5wMMJFrZJDRNzbiQw==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.2.tgz", + "integrity": "sha512-MvIY0B8/qjq7bKxdN1eD+nrljoeaai+qjLJgfRn3TiMuz0pamsIWY2bFODPZMSNmabsLANXsLl4EMoWvlaTZWA==", "license": "MIT", "dependencies": { "bl": "^6.0.8", @@ -3617,30 +3638,6 @@ "node": ">=v0.2.0" } }, - "node_modules/nise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", - "integrity": "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.1", - "@sinonjs/text-encoding": "^0.7.3", - "just-extend": "^6.2.0", - "path-to-regexp": "^8.1.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -3854,16 +3851,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -3887,19 +3874,6 @@ "dev": true, "license": "ISC" }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -4021,16 +3995,17 @@ } }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, "engines": { - "node": ">=8.10.0" + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/reflect.getprototypeof": { @@ -4055,12 +4030,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" - }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -4081,12 +4050,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/reinterval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", - "integrity": "sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ==", - "license": "MIT" - }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -4414,17 +4377,17 @@ "license": "ISC" }, "node_modules/sinon": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-19.0.2.tgz", - "integrity": "sha512-euuToqM+PjO4UgXeLETsfQiuoyPXlqFezr6YZDFwHR3t4qaX0fZUe1MfPMznTL5f8BWrVS89KduLdMUsxFCO6g==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-21.0.0.tgz", + "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", "dev": true, "license": "BSD-3-Clause", + "peer": true, "dependencies": { "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.2", + "@sinonjs/fake-timers": "^13.0.5", "@sinonjs/samsam": "^8.0.1", "diff": "^7.0.0", - "nise": "^6.1.1", "supports-color": "^7.2.0" }, "funding": { @@ -4443,14 +4406,28 @@ "sinon": ">=4.0.0" } }, - "node_modules/sinon/node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "dev": true, - "license": "BSD-3-Clause", + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", "engines": { - "node": ">=0.3.1" + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" } }, "node_modules/source-map": { @@ -4579,9 +4556,9 @@ "license": "MIT" }, "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -4592,9 +4569,9 @@ } }, "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -4737,19 +4714,6 @@ "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -4930,9 +4894,9 @@ } }, "node_modules/typescript": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", - "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4962,9 +4926,9 @@ } }, "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, "node_modules/universalify": { @@ -5142,44 +5106,57 @@ "node": ">=0.10.0" } }, + "node_modules/worker-factory": { + "version": "7.0.46", + "resolved": "https://registry.npmjs.org/worker-factory/-/worker-factory-7.0.46.tgz", + "integrity": "sha512-Sr1hq2FMgNa04UVhYQacsw+i58BtMimzDb4+CqYphZ97OfefRpURu0UZ+JxMr/H36VVJBfuVkxTK7MytsanC3w==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4", + "fast-unique-numbers": "^9.0.24", + "tslib": "^2.8.1" + } + }, "node_modules/worker-timers": { - "version": "7.1.8", - "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-7.1.8.tgz", - "integrity": "sha512-R54psRKYVLuzff7c1OTFcq/4Hue5Vlz4bFtNEIarpSiCYhpifHU3aIQI29S84o1j87ePCYqbmEJPqwBTf+3sfw==", + "version": "8.0.25", + "resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-8.0.25.tgz", + "integrity": "sha512-X7Z5dmM6PlrEnaadtFQOyXHGD/IysPA3HZzaC2koqsU1VI+RvyGmjiiLiUBQixK8PH5R7ilkOzZupWskNRaXmA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.24.5", - "tslib": "^2.6.2", - "worker-timers-broker": "^6.1.8", - "worker-timers-worker": "^7.0.71" + "@babel/runtime": "^7.28.4", + "tslib": "^2.8.1", + "worker-timers-broker": "^8.0.11", + "worker-timers-worker": "^9.0.11" } }, "node_modules/worker-timers-broker": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-6.1.8.tgz", - "integrity": "sha512-FUCJu9jlK3A8WqLTKXM9E6kAmI/dR1vAJ8dHYLMisLNB/n3GuaFIjJ7pn16ZcD1zCOf7P6H62lWIEBi+yz/zQQ==", + "version": "8.0.11", + "resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-8.0.11.tgz", + "integrity": "sha512-uwhxKru8BI9m2tsogxr2fB6POZ8LB2xH+Pu3R0mvQnAZLPgLD6K3IX4LNKPTEgTJ/j5VsuQPB+gLI1NBNKkPlg==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.24.5", - "fast-unique-numbers": "^8.0.13", - "tslib": "^2.6.2", - "worker-timers-worker": "^7.0.71" + "@babel/runtime": "^7.28.4", + "broker-factory": "^3.1.10", + "fast-unique-numbers": "^9.0.24", + "tslib": "^2.8.1", + "worker-timers-worker": "^9.0.11" } }, "node_modules/worker-timers-worker": { - "version": "7.0.71", - "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-7.0.71.tgz", - "integrity": "sha512-ks/5YKwZsto1c2vmljroppOKCivB/ma97g9y77MAAz2TBBjPPgpoOiS1qYQKIgvGTr2QYPT3XhJWIB6Rj2MVPQ==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-9.0.11.tgz", + "integrity": "sha512-pArb5xtgHWImYpXhjg1OFv7JFG0ubmccb73TFoXHXjG830fFj+16N57q9YeBnZX52dn+itRrMoJZ9HaZBVzDaA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.24.5", - "tslib": "^2.6.2" + "@babel/runtime": "^7.28.4", + "tslib": "^2.8.1", + "worker-factory": "^7.0.46" } }, "node_modules/workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", + "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", "dev": true, "license": "Apache-2.0" }, @@ -5243,9 +5220,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -5256,9 +5233,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -5269,9 +5246,9 @@ } }, "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -5285,9 +5262,9 @@ } }, "node_modules/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "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" diff --git a/package.json b/package.json index f93851a8..d3fc8477 100644 --- a/package.json +++ b/package.json @@ -18,12 +18,12 @@ }, "bundleDependencies": [], "dependencies": { - "@iobroker/adapter-core": "^3.2.3", + "@iobroker/adapter-core": "^3.3.2", "@peculiar/webcrypto": "^1.5.0", - "axios": "^1.8.4", + "axios": "^1.13.2", "json-bigint": "^1.0.0", - "json2iob": "^2.6.17", - "mqtt": "^5.10.4", + "json2iob": "^2.6.21", + "mqtt": "^5.14.1", "ngeohash": "^0.6.3", "qs": "^6.14.0", "request": "^2.88.2", @@ -37,14 +37,14 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.2", "@alcalzone/release-script-plugin-license": "^3.7.0", "@alcalzone/release-script-plugin-manual-review": "^3.7.0", - "@eslint/eslintrc": "^3.3.0", - "@eslint/js": "^9.22.0", - "@iobroker/testing": "^5.0.3", - "@types/node": "^22.13.10", - "eslint": "^9.22.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "^9.39.1", + "@iobroker/testing": "^5.2.2", + "@types/node": "^22.19.0", + "eslint": "^9.39.1", "eslint-plugin-promise": "^7.2.1", - "globals": "^16.0.0", - "typescript": "~5.8.2" + "globals": "^16.5.0", + "typescript": "~5.9.3" }, "engines": { "node": ">=10.0.0" @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.12" + "version": "0.7.13" } From ac015ddf4bdfa2f0c9cd51d3a925f0945f90486f Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Nov 2025 10:33:41 +0100 Subject: [PATCH 720/729] fix login flow --- main.js | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 118 insertions(+), 13 deletions(-) diff --git a/main.js b/main.js index b4995e47..8051cd74 100644 --- a/main.js +++ b/main.js @@ -41,6 +41,7 @@ class VwWeconnect extends utils.Adapter { this.jar = request.jar(); this.userAgent = "iobroker v"; this.skodaUserAgent = "MySkoda/Android/8.0.0/250203003"; + this.androidPackageName = "com.volkswagen.weconnect"; this.refreshTokenInterval = null; this.vwrefreshTokenInterval = null; this.updateInterval = null; @@ -217,9 +218,10 @@ class VwWeconnect extends utils.Adapter { this.redirect = "weconnect://authenticated"; this.xrequest = "com.volkswagen.weconnect"; this.responseType = "code id_token token"; - this.xappversion = ""; - this.xappname = ""; + this.xappversion = "3.51.1"; + this.xappname = "Volkswagen"; this.xbrand = "volkswagen"; + this.userAgent = "Volkswagen/3.51.1-android/14"; } if (this.config.type === "audi") { this.log.info("Login in with audi as audietron"); @@ -553,9 +555,99 @@ class VwWeconnect extends utils.Adapter { } try { + const stateToken = this.extractStateToken(body); + + // New authentication flow with state token + if (stateToken) { + this.log.info("Using new authentication flow with state token"); + const loginForm = { + username: this.config.user, + password: this.config.password, + state: stateToken + }; + + const loginHeaders = { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": this.userAgent, + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }; + + if (this.config.type === "id" && this.androidPackageName) { + loginHeaders["x-android-package-name"] = this.androidPackageName; + } + + request.post( + { + url: "https://identity.vwgroup.io/u/login?state=" + stateToken, + headers: loginHeaders, + form: loginForm, + jar: this.jar, + gzip: true, + followAllRedirects: false, + }, + (err, resp, body) => { + if (err || (resp && resp.statusCode >= 400)) { + this.log.error("Failed new authentication flow"); + err && this.log.error(err); + resp && this.log.error(resp.statusCode.toString()); + body && this.log.error(JSON.stringify(body)); + reject(); + return; + } + + try { + this.log.debug("New auth response: " + JSON.stringify(resp.headers)); + + if (!resp.headers.location) { + this.log.error("No redirect location in response"); + this.log.debug(JSON.stringify(body)); + reject(); + return; + } + + // Follow redirects to get authorization code + const getRequest = request.get( + { + url: resp.headers.location, + headers: { + "User-Agent": this.userAgent, + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate", + "x-requested-with": this.xrequest, + }, + jar: this.jar, + gzip: true, + followAllRedirects: true, + }, + (err, resp, body) => { + if (err) { + this.log.debug("Redirect error (expected for token extraction): " + err.message); + this.getTokens(getRequest, code_verifier, reject, resolve); + } else { + this.log.debug("Unexpected: no error in redirect"); + this.log.debug(body); + this.getTokens(getRequest, code_verifier, reject, resolve); + } + } + ); + } catch (err) { + this.log.error("Error processing new auth response"); + this.log.error(err); + reject(); + } + } + ); + return; + } + + // Legacy authentication flow (for non-ID types) let form = {}; if (body.indexOf("emailPasswordForm") !== -1) { - this.log.debug("parseEmailForm"); + this.log.debug("parseEmailForm - Legacy authentication"); form = this.extractHidden(body); form["email"] = this.config.user; } else { @@ -4496,19 +4588,24 @@ class VwWeconnect extends utils.Adapter { refreshIDToken() { return new Promise((resolve, reject) => { this.log.debug("Token Refresh started"); + const refreshHeaders = { + accept: "*/*", + "content-type": "application/json", + "content-version": "1", + "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", + "user-agent": this.userAgent, + "accept-language": "de-de", + authorization: "Bearer " + this.config.rtoken, + }; + + if (this.config.type === "id" && this.androidPackageName) { + refreshHeaders["x-android-package-name"] = this.androidPackageName; + } + request.get( { url: "https://emea.bff.cariad.digital/user-login/refresh/v1", - - headers: { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.rtoken, - }, + headers: refreshHeaders, followAllRedirects: true, gzip: true, json: true, @@ -5666,6 +5763,14 @@ class VwWeconnect extends utils.Adapter { } return returnObject; } + extractStateToken(body) { + if (!body) return null; + const stateMatch = body.match(/]*name=["']state["'][^>]*value=["']([^"']*)["']/i); + if (stateMatch && stateMatch[1]) { + return stateMatch[1]; + } + return null; + } matchAll(re, str) { let match; const matches = []; From e9cbd2fb4d61267bc1b204ef29ad2cd022ea7ef4 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Nov 2025 11:28:33 +0100 Subject: [PATCH 721/729] fix variable --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 8051cd74..08f5e782 100644 --- a/main.js +++ b/main.js @@ -609,7 +609,7 @@ class VwWeconnect extends utils.Adapter { } // Follow redirects to get authorization code - const getRequest = request.get( + let getRequest = request.get( { url: resp.headers.location, headers: { From 1b2c11e865e5d28e520c8130bd5a5c97ad1c497a Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Nov 2025 11:32:39 +0100 Subject: [PATCH 722/729] add comment --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 08f5e782..a9de3f2f 100644 --- a/main.js +++ b/main.js @@ -609,7 +609,9 @@ class VwWeconnect extends utils.Adapter { } // Follow redirects to get authorization code - let getRequest = request.get( + // Note: Must use let and separate assignment because getRequest is referenced in its own callback + let getRequest; + getRequest = request.get( { url: resp.headers.location, headers: { From 4c7ff37f9fd32777285c39513a17d474c20b16da Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Nov 2025 12:20:15 +0100 Subject: [PATCH 723/729] fix url --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index a9de3f2f..38963822 100644 --- a/main.js +++ b/main.js @@ -608,12 +608,18 @@ class VwWeconnect extends utils.Adapter { return; } + // Build full URL if location is relative + let redirectUrl = resp.headers.location; + if (redirectUrl.startsWith("/")) { + redirectUrl = "https://identity.vwgroup.io" + redirectUrl; + } + // Follow redirects to get authorization code // Note: Must use let and separate assignment because getRequest is referenced in its own callback let getRequest; getRequest = request.get( { - url: resp.headers.location, + url: redirectUrl, headers: { "User-Agent": this.userAgent, Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", From 851d1b1e781059a0faf0f42917ddc63fd8981e41 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Nov 2025 13:36:27 +0100 Subject: [PATCH 724/729] fix user agent --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 38963822..34711408 100644 --- a/main.js +++ b/main.js @@ -1381,6 +1381,7 @@ class VwWeconnect extends utils.Adapter { "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", "user-agent": this.userAgent, "accept-language": "de-de", + "x-android-package-name": this.androidPackageName, }; if (this.type === "Wc") { method = "GET"; From bf1ed8ddda3f372c0d1d3f9a538db5db64b4f425 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Nov 2025 16:07:08 +0100 Subject: [PATCH 725/729] fix login --- main.js | 294 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 246 insertions(+), 48 deletions(-) diff --git a/main.js b/main.js index 34711408..24c8b29a 100644 --- a/main.js +++ b/main.js @@ -495,16 +495,13 @@ class VwWeconnect extends utils.Adapter { url += "&ui_locales=de-DE%20de&prompt=login"; } if (this.config.type === "id" && this.type !== "Wc") { - url = await this.receiveLoginUrl().catch(() => { - this.log.warn("Failed to get login url"); - }); - if (!url) { - url = - "https://emea.bff.cariad.digital/user-login/v1/authorize?nonce=" + - this.randomString(16) + - "&redirect_uri=weconnect://authenticated"; - } + // For ID type: Use direct OpenID authorization endpoint (Python-style) + // This ensures the code is compatible with the OpenID token endpoint + this.log.debug("Using direct OpenID authorization endpoint (Python-style, no code_challenge)"); + // The standard url above is already correct - it has all the right params + // Just make sure we're NOT adding code_challenge for ID type } + this.log.debug("Login URL: " + url); const loginRequest = request( { method: method, @@ -586,62 +583,34 @@ class VwWeconnect extends utils.Adapter { form: loginForm, jar: this.jar, gzip: true, - followAllRedirects: false, + followAllRedirects: false, // Follow redirects manually }, - (err, resp, body) => { + (err, resp, _body) => { if (err || (resp && resp.statusCode >= 400)) { this.log.error("Failed new authentication flow"); - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); + err && this.log.error(err.message); + resp && this.log.error("Status: " + resp.statusCode); reject(); return; } try { - this.log.debug("New auth response: " + JSON.stringify(resp.headers)); - + // Follow redirects manually like Python does if (!resp.headers.location) { this.log.error("No redirect location in response"); - this.log.debug(JSON.stringify(body)); reject(); return; } - // Build full URL if location is relative let redirectUrl = resp.headers.location; if (redirectUrl.startsWith("/")) { redirectUrl = "https://identity.vwgroup.io" + redirectUrl; } - // Follow redirects to get authorization code - // Note: Must use let and separate assignment because getRequest is referenced in its own callback - let getRequest; - getRequest = request.get( - { - url: redirectUrl, - headers: { - "User-Agent": this.userAgent, - Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate", - "x-requested-with": this.xrequest, - }, - jar: this.jar, - gzip: true, - followAllRedirects: true, - }, - (err, resp, body) => { - if (err) { - this.log.debug("Redirect error (expected for token extraction): " + err.message); - this.getTokens(getRequest, code_verifier, reject, resolve); - } else { - this.log.debug("Unexpected: no error in redirect"); - this.log.debug(body); - this.getTokens(getRequest, code_verifier, reject, resolve); - } - } - ); + this.log.debug("Starting manual redirect following from: " + redirectUrl.substring(0, 100)); + + // Follow redirects manually until we hit weconnect:// + this.followRedirectsManually(redirectUrl, 0, code_verifier, reject, resolve); } catch (err) { this.log.error("Error processing new auth response"); this.log.error(err); @@ -1504,8 +1473,13 @@ class VwWeconnect extends utils.Adapter { } } if (this.config.type === "id") { - this.config.atoken = tokens.accessToken; - this.config.rtoken = tokens.refreshToken; + // Don't overwrite if already set from BFF token exchange + if (!this.config.atoken) { + this.config.atoken = tokens.access_token || tokens.accessToken; + } + if (!this.config.rtoken) { + this.config.rtoken = tokens.refresh_token || tokens.refreshToken; + } //configure for wallcharging login @@ -5780,6 +5754,230 @@ class VwWeconnect extends utils.Adapter { } return null; } + async followRedirectsManually(redirectUrl, depth, code_verifier, reject, resolve) { + // Follow redirects manually until we hit weconnect:// (like Python does) + const maxDepth = 10; + + if (depth >= maxDepth) { + this.log.error("Too many redirects (max " + maxDepth + ")"); + reject(); + return; + } + + // Check if we've reached weconnect:// URL + if (redirectUrl.startsWith("weconnect://")) { + this.log.debug("Reached weconnect:// URL: " + redirectUrl.substring(0, 100) + "..."); + const code = this.extractCodeFromUrl(redirectUrl); + if (code) { + this.log.debug("Successfully extracted authorization code (JWT token)"); + this.exchangeCodeForTokens(code, code_verifier, reject, resolve); + return; + } else { + this.log.error("Could not extract code from weconnect:// URL"); + reject(); + return; + } + } + + // Continue following redirects + this.log.debug("Redirect " + (depth + 1) + ": " + redirectUrl.substring(0, 100) + "..."); + + try { + // Get cookies from request jar + const cookies = this.jar.getCookies(redirectUrl); + const cookieHeader = cookies.map((c) => c.cookieString()).join("; "); + + const response = await axios({ + method: "get", + url: redirectUrl, + headers: { + "User-Agent": this.userAgent, + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Accept-Language": "en-US,en;q=0.9", + ...(cookieHeader ? { Cookie: cookieHeader } : {}), + }, + maxRedirects: 0, // Don't follow redirects automatically + validateStatus: (status) => status >= 200 && status < 400, // Accept redirects as valid + }); + + // Store any new cookies back into the jar + if (response.headers["set-cookie"]) { + response.headers["set-cookie"].forEach((cookie) => { + this.jar.setCookie(cookie, redirectUrl); + }); + } + + // Check for redirect response (302, 301, etc.) + if (response.status >= 300 && response.status < 400) { + const nextUrl = response.headers.location; + + if (!nextUrl) { + this.log.error("Redirect response but no location header"); + reject(); + return; + } + + // Check if this is a weconnect:// URL + if (nextUrl.startsWith("weconnect://")) { + this.log.debug("Found weconnect:// redirect: " + nextUrl.substring(0, 100) + "..."); + const code = this.extractCodeFromUrl(nextUrl); + if (code) { + this.log.debug("Successfully extracted authorization code (JWT token)"); + this.exchangeCodeForTokens(code, code_verifier, reject, resolve); + return; + } + } + + // Check for error redirects + if (nextUrl.includes("/error")) { + this.log.error("Authentication error redirect: " + nextUrl); + if (nextUrl.includes("error=access_denied")) { + this.log.warn("========================================"); + this.log.warn("WICHTIG: Bitte loggen Sie sich einmal in der VW Connect App ein und akzeptieren Sie die neuen Nutzungsbedingungen."); + this.log.warn("IMPORTANT: Please log in to the VW Connect App once and accept the new terms and conditions."); + this.log.warn("========================================"); + } + reject(); + return; + } + + // Make relative URLs absolute + let absoluteUrl = nextUrl; + if (nextUrl.startsWith("/")) { + const urlObj = new URL(redirectUrl); + absoluteUrl = urlObj.protocol + "//" + urlObj.host + nextUrl; + } else if (!nextUrl.startsWith("http") && !nextUrl.startsWith("weconnect://")) { + absoluteUrl = redirectUrl + "/" + nextUrl; + } + + // Continue following + await this.followRedirectsManually(absoluteUrl, depth + 1, code_verifier, reject, resolve); + } else if (response.status === 200) { + // Check if we ended up at a consent/terms page + if (response.data && (response.data.includes("termsAndConditions") || response.data.includes("consent"))) { + this.log.warn("========================================"); + this.log.warn("WICHTIG: Bitte loggen Sie sich einmal in der VW Connect App ein und akzeptieren Sie die neuen Nutzungsbedingungen oder öffne die Final url im Browser."); + this.log.warn("IMPORTANT: Please log in to the VW Connect App once and accept the new terms and conditions. Or open the final url in the browser."); + this.log.warn("Final URL: " + redirectUrl); + this.log.warn("========================================"); + reject(); + return; + } + + this.log.error("Got 200 OK but expected redirect or weconnect:// URL"); + this.log.debug("Response body preview: " + (response.data ? response.data.substring(0, 200) : "empty")); + reject(); + } + } catch (error) { + this.log.error("Error during redirect following: " + error.message); + reject(); + } + } + extractCodeFromUrl(url) { + // Extract authorization code from weconnect:// URL + // Can be in query string: weconnect://authenticated?code=eyJ...&state=abc123 + // Or in fragment: weconnect://authenticated#code=eyJ...&state=abc123 + try { + this.log.debug("Extracting code from URL: " + url.substring(0, 150) + "..."); + + const urlObj = new URL(url); + + // Try query string first + let code = urlObj.searchParams.get("code"); + if (code) { + this.log.debug("Extracted code from query string: " + code.substring(0, 50) + "..."); + return code; + } + + // Try fragment (hash) - parse it like a query string + if (urlObj.hash) { + const fragment = urlObj.hash.substring(1); // Remove # + const fragmentParams = new URLSearchParams(fragment); + code = fragmentParams.get("code"); + if (code) { + this.log.debug("Extracted code from fragment: " + code.substring(0, 50) + "..."); + return code; + } + + // Also check for access_token in fragment (alternate OAuth flow) + const accessToken = fragmentParams.get("access_token"); + if (accessToken) { + this.log.debug("Found access_token in fragment instead of code"); + this.log.debug("This appears to be implicit flow, not authorization code flow"); + // Return null as we need 'code', not 'access_token' + } + } + + this.log.debug("No code parameter found in URL"); + } catch (error) { + this.log.debug("Error parsing URL: " + error.message); + } + return null; + } + async exchangeCodeForTokens(code, code_verifier, reject, resolve) { + this.log.debug("Exchanging authorization code for tokens (Python-style, no code_verifier)"); + + // CRITICAL: Use BFF token endpoint, NOT identity.vwgroup.io! + // Python gets this from: https://emea.bff.cariad.digital/login/v1/idk/openid-configuration + const tokenEndpoint = "https://emea.bff.cariad.digital/login/v1/idk/token"; + + // Exchange code for tokens WITHOUT code_verifier (like Python does) + const tokenBody = { + client_id: this.clientId, + grant_type: "authorization_code", + code: code, + redirect_uri: this.redirect, + // NO code_verifier - Python doesn't use it! + }; + + try { + // Get cookies from jar for this request + const cookies = this.jar.getCookies(tokenEndpoint); + const cookieHeader = cookies.map((c) => c.cookieString()).join("; "); + + const response = await axios({ + method: "post", + url: tokenEndpoint, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": this.userAgent, + "Accept": "application/json", + "Accept-Language": "en-US,en;q=0.9", + ...(cookieHeader ? { Cookie: cookieHeader } : {}), + }, + data: new URLSearchParams(tokenBody).toString(), + maxRedirects: 0, + }); + + // Store any new cookies back into the jar + if (response.headers["set-cookie"]) { + response.headers["set-cookie"].forEach((cookie) => { + this.jar.setCookie(cookie, tokenEndpoint); + }); + } + + this.log.debug("Token exchange successful"); + const tokens = response.data; + + // Store tokens directly like Python does + this.config.atoken = tokens.access_token; + this.config.rtoken = tokens.refresh_token; + + this.log.debug("Tokens received and stored, continuing with VW-specific flow"); + + // Continue with VW-specific token handling + await this.getVWToken(tokens, tokens.id_token, reject, resolve); + } catch (error) { + this.log.error("Failed to exchange code for tokens at OpenID endpoint"); + if (error.response) { + this.log.error("Status: " + error.response.status); + this.log.error("Response: " + JSON.stringify(error.response.data)); + } else { + this.log.error(error.message); + } + reject(); + } + } matchAll(re, str) { let match; const matches = []; From 67c823d4a44355a098e1a48a17d47daf1758d704 Mon Sep 17 00:00:00 2001 From: TA2k Date: Tue, 25 Nov 2025 16:08:08 +0100 Subject: [PATCH 726/729] chore: release v0.7.14 - fix vw id login --- README.md | 3 +++ io-package.json | 28 ++++++++++++++-------------- package-lock.json | 16 ++++++---------- package.json | 4 ++-- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1c1c27e7..78415e9a 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,9 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.7.14 (2025-11-25) +- fix vw id login + ### 0.7.13 (2025-11-09) - fix for skoda login diff --git a/io-package.json b/io-package.json index bd4cac8e..df950aaa 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.13", + "version": "0.7.14", "news": { + "0.7.14": { + "en": "fix vw id login", + "de": "vw id anmelden", + "ru": "исправить vw id login", + "pt": "corrigir login do id vw", + "nl": "vw id-login herstellen", + "fr": "correction de la connexion vw id", + "it": "correzione vw id login", + "es": "fijar vw id login", + "pl": "fix vw id logowanie", + "uk": "виправити vw id увійти", + "zh-cn": "修补 vw id 登录" + }, "0.7.13": { "en": "fix for skoda login", "de": "fix für skoda login", @@ -80,19 +93,6 @@ "pl": "fix for set setTemperatura\nfix dla blokady odblokowania Skoda", "uk": "кріплення для комплектуTemperature\nзамка для розблокування Skoda", "zh-cn": "设定的固定\n修复 Skoda 解锁" - }, - "0.7.0": { - "en": "fix for skoda and seat\nState structure changed completly please delete old states under Objects", - "de": "fix für skoda und seat\nStuktur des states sind komplett geändert bitte löschen Sie alte states unter Objekte", - "ru": "крепление для скоды и сиденья\nСтруктура государства изменена полностью Пожалуйста, удалите старые государства под Объекты", - "pt": "correção para skoda e assento\nEstrutura do estado mudou completamente por favor excluir estados antigos sob objetos", - "nl": "fix voor skoda en stoel\nStaat structuur volledig gewijzigd gelieve oude staten te verwijderen onder Objecten", - "fr": "fixation pour skoda et siège\nModifier complètement la structure de l'État veuillez supprimer les anciens états sous Objets", - "it": "fissaggio per skoda e sedile\nStruttura dello stato modificato completamente si prega di eliminare vecchi stati sotto Oggetti", - "es": "skoda y asiento\nLa estructura del Estado cambió completly por favor elimine viejos estados bajo objetos", - "pl": "fixed for skoda and seat\nProszę usunąć stare stany pod obiektami", - "uk": "кріплення для соди і сидіння\nДержавна структура змінилася комплетально, будь ласка, видаліть старі стани під об'єктами", - "zh-cn": "斯柯达和座位的固定\n国家结构已完全更改, 请删除对象下的旧状态" } }, "title": "VW Connect", diff --git a/package-lock.json b/package-lock.json index caed6125..4e96f067 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.13", + "version": "0.7.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.13", + "version": "0.7.14", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.3.2", @@ -29,7 +29,7 @@ "@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.39.1", "@iobroker/testing": "^5.2.2", - "@types/node": "^22.19.0", + "@types/node": "^22.19.1", "eslint": "^9.39.1", "eslint-plugin-promise": "^7.2.1", "globals": "^16.5.0", @@ -739,9 +739,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.19.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.0.tgz", - "integrity": "sha512-xpr/lmLPQEj+TUnHmR+Ab91/glhJvsqcjB+yY0Ix9GO70H6Lb4FHH5GeqdOE5btAx7eIMwuHkp4H2MSkLcqWbA==", + "version": "22.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.1.tgz", + "integrity": "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==", "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -811,7 +811,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1235,7 +1234,6 @@ "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -1843,7 +1841,6 @@ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -4382,7 +4379,6 @@ "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "@sinonjs/commons": "^3.0.1", "@sinonjs/fake-timers": "^13.0.5", diff --git a/package.json b/package.json index d3fc8477..75de0379 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.39.1", "@iobroker/testing": "^5.2.2", - "@types/node": "^22.19.0", + "@types/node": "^22.19.1", "eslint": "^9.39.1", "eslint-plugin-promise": "^7.2.1", "globals": "^16.5.0", @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.13" + "version": "0.7.14" } From f756508d8a444a476296f880c2ae1ac3e3010beb Mon Sep 17 00:00:00 2001 From: TA2k Date: Wed, 26 Nov 2025 13:35:23 +0100 Subject: [PATCH 727/729] chore: release v0.7.15 - fix vw refresh token --- README.md | 3 ++ io-package.json | 28 ++++++------ main.js | 106 ++++++++++++++++++++++++---------------------- package-lock.json | 4 +- package.json | 2 +- 5 files changed, 75 insertions(+), 68 deletions(-) diff --git a/README.md b/README.md index 78415e9a..633514cc 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,9 @@ You can set climatisaton temperature in ``` ## Changelog +### 0.7.15 (2025-11-26) +- fix vw refresh token + ### 0.7.14 (2025-11-25) - fix vw id login diff --git a/io-package.json b/io-package.json index df950aaa..809b41d3 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "vw-connect", - "version": "0.7.14", + "version": "0.7.15", "news": { + "0.7.15": { + "en": "fix vw refresh token", + "de": "vw erfrischungsgetränk", + "ru": "обновление vw rescovery token", + "pt": "corrigir o item de atualização vw", + "nl": "fix vw fresh token", + "fr": "corriger vw rafraîchir jeton", + "it": "correzione vw rinfresca token", + "es": "reparación de refresco vw", + "pl": "fix vw odświeżanie token", + "uk": "виправити vw оновлений токен", + "zh-cn": "修复 vw 刷新符号" + }, "0.7.14": { "en": "fix vw id login", "de": "vw id anmelden", @@ -80,19 +93,6 @@ "pl": "ustawienie do ładowania aktualizacji statusu tylko przy starcie\nfix for skoda ismoving state", "uk": "виправити оновлення стану зарядки тільки при запуску\nфіксація для skoda ізмовляючого стану", "zh-cn": "仅在启动时更新充电状态的固定\n斯柯达状态的修复" - }, - "0.7.3": { - "en": "fix for set setTemperature\nfix for Skoda unlock lock", - "de": "Fix für set setTemperature\nFix für Skoda unlock lock", - "ru": "фиксация для set set Температура\nобсуждение Skoda unlock lock", - "pt": "correção para setTemperature\ncorreção para bloqueio de desbloqueio Skoda", - "nl": "fix voor setTemperatuur\nfix voor Skoda ontgrendelen slot", - "fr": "fix pour setTemperature\ncorrection pour le verrouillage Skoda", - "it": "fix per setTemperature\nfissaggio per blocco Skoda sbloccaggio", - "es": "fijado para el setTemperatura\nfijado para Skoda desbloquear", - "pl": "fix for set setTemperatura\nfix dla blokady odblokowania Skoda", - "uk": "кріплення для комплектуTemperature\nзамка для розблокування Skoda", - "zh-cn": "设定的固定\n修复 Skoda 解锁" } }, "title": "VW Connect", diff --git a/main.js b/main.js index 24c8b29a..2907182c 100644 --- a/main.js +++ b/main.js @@ -1485,7 +1485,7 @@ class VwWeconnect extends utils.Adapter { this.refreshTokenInterval = setInterval(() => { this.refreshIDToken().catch(() => {}); - }, 0.89 * 60 * 60 * 1000); // 0.9hours + }, 0.89 * 60 * 60 * 1000); // 0.89 hours this.log.info("ID login successfull"); resolve(); @@ -4568,64 +4568,68 @@ class VwWeconnect extends utils.Adapter { }); } - refreshIDToken() { - return new Promise((resolve, reject) => { - this.log.debug("Token Refresh started"); + async refreshIDToken() { + this.log.debug("Token Refresh started"); + + try { const refreshHeaders = { - accept: "*/*", - "content-type": "application/json", - "content-version": "1", - "x-newrelic-id": "VgAEWV9QDRAEXFlRAAYPUA==", - "user-agent": this.userAgent, - "accept-language": "de-de", - authorization: "Bearer " + this.config.rtoken, + "Accept-Encoding": "gzip, deflate, br", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": this.userAgent, + "Accept-Language": "de-de", }; if (this.config.type === "id" && this.androidPackageName) { refreshHeaders["x-android-package-name"] = this.androidPackageName; } - request.get( - { - url: "https://emea.bff.cariad.digital/user-login/refresh/v1", - headers: refreshHeaders, - followAllRedirects: true, - gzip: true, - json: true, - }, - (err, resp, body) => { - if (err || (resp && resp.statusCode >= 400)) { - err && this.log.error(err); - resp && this.log.error(resp.statusCode.toString()); - body && this.log.error(JSON.stringify(body)); - this.log.error("Failed refresh token. Relogin"); - //reset login parameters because of wecharge - this.type = "Id"; - this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; - this.scope = "openid profile badge cars dealers birthdate vin"; - this.redirect = "weconnect://authenticated"; - this.xrequest = "com.volkswagen.weconnect"; - this.responseType = "code id_token token"; - setTimeout(() => { - this.log.error("restart adapter in 10min"); - this.restart(); - }, 10 * 60 * 1000); - reject(); - return; - } - try { - this.log.debug("Token Refresh successful"); - this.config.atoken = body.accessToken; - this.config.rtoken = body.refreshToken; + const refreshBody = { + grant_type: "refresh_token", + refresh_token: this.config.rtoken, + client_id: this.clientId, + }; - resolve(); - } catch (err) { - this.log.error(err); - reject(); - } - }, - ); - }); + // Use BFF token endpoint for refresh (same as Python) + const response = await axios({ + method: "post", + url: "https://emea.bff.cariad.digital/login/v1/idk/token", + headers: refreshHeaders, + data: new URLSearchParams(refreshBody).toString(), + }); + + this.log.debug("Token Refresh successful"); + const tokens = response.data; + + // Store refreshed tokens (handle both camelCase and snake_case) + this.config.atoken = tokens.access_token || tokens.accessToken; + this.config.rtoken = tokens.refresh_token || tokens.refreshToken; + + return Promise.resolve(); + } catch (error) { + if (error.response) { + this.log.error("Status: " + error.response.status); + this.log.error("Response: " + JSON.stringify(error.response.data)); + } else { + this.log.error(error.message); + } + this.log.error("Failed refresh token. Relogin"); + + // Reset login parameters because of wecharge + this.type = "Id"; + this.clientId = "a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com"; + this.scope = "openid profile badge cars dealers birthdate vin"; + this.redirect = "weconnect://authenticated"; + this.xrequest = "com.volkswagen.weconnect"; + this.responseType = "code id_token token"; + + setTimeout(() => { + this.log.error("restart adapter in 10min"); + this.restart(); + }, 10 * 60 * 1000); + + return Promise.reject(error); + } } async refreshSkodaEToken() { diff --git a/package-lock.json b/package-lock.json index 4e96f067..03972bf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.vw-connect", - "version": "0.7.14", + "version": "0.7.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.vw-connect", - "version": "0.7.14", + "version": "0.7.15", "license": "MIT", "dependencies": { "@iobroker/adapter-core": "^3.3.2", diff --git a/package.json b/package.json index 75de0379..7c430b5e 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "translate": "translate-adapter", "release": "release-script --all" }, - "version": "0.7.14" + "version": "0.7.15" } From 5c879e4505f1432eeea801d6fa2b7e6c392a0b5d Mon Sep 17 00:00:00 2001 From: Robert Seidt Date: Sun, 4 Jan 2026 10:03:37 +0100 Subject: [PATCH 728/729] added renders for seatcupra --- .gitignore | 4 ++++ .npmignore | 4 ++++ main.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/.gitignore b/.gitignore index dc5f07f9..cda0ef3b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,7 @@ Thumbs.db admin/i18n/flat.txt admin/i18n/*/flat.txt .DS_Store + + +# ioBroker dev-server +.dev-server/ diff --git a/.npmignore b/.npmignore index 0420f2fd..769ed216 100644 --- a/.npmignore +++ b/.npmignore @@ -27,3 +27,7 @@ admin/i18n # maintenance scripts maintenance/** tsconfig.json + + +# ioBroker dev-server +.dev-server/ diff --git a/main.js b/main.js index 2907182c..4ef24fad 100644 --- a/main.js +++ b/main.js @@ -2357,6 +2357,56 @@ class VwWeconnect extends utils.Adapter { }, native: {}, }); + this.extendObject(vin + ".renders.isDefault", { + type: "state", + common: { + name: "is Default", + type: "boolean", + role: "indicator", + write: false, + }, + native: {}, + }); + this.extendObject(vin + ".renders.front", { + type: "state", + common: { + name: "Front view", + type: "string", + role: "text.url", + write: false, + }, + native: {}, + }); + this.extendObject(vin + ".renders.rear", { + type: "state", + common: { + name: "Rear view", + type: "string", + role: "text.url", + write: false, + }, + native: {}, + }); + this.extendObject(vin + ".renders.side", { + type: "state", + common: { + name: "Side view", + type: "string", + role: "text.url", + write: false, + }, + native: {}, + }); + this.extendObject(vin + ".renders.top", { + type: "state", + common: { + name: "Top view", + type: "string", + role: "text.url", + write: false, + }, + native: {}, + }); } resolve(); return; @@ -3431,6 +3481,7 @@ class VwWeconnect extends utils.Adapter { }, { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/measurements/engines`, path: "range" }, + { url: `https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/${vin}/renders`, path: "renders" }, //https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/VSSZZZKM/driving-data/SHORT/last //https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/VSSZZZKM/driving-data/SHORT?from=2023-02-24T13:34:52Z&to=2025-02-23T13:34:52Z From aba3389362af8490592721622d6d24f876d38246 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 25 Jan 2026 17:14:41 +0000 Subject: [PATCH 729/729] Update from template: W0040-fixKeywords --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 7c430b5e..99b75e31 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ }, "homepage": "https://github.com/ta2k/ioBroker.vw-connect", "keywords": [ + "ioBroker", "VW", "Connect", "Audi",