@lumiastream/tapo-cove 3.0.21 → 3.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -7
- package/dist/index.mjs +5 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -206,6 +206,7 @@ var securePassthrough = (deviceRequest, deviceKey) => __async(void 0, null, func
|
|
|
206
206
|
url: `http://${deviceKey.deviceIp}/app?token=${deviceKey.token}`,
|
|
207
207
|
data: securePassthroughRequest,
|
|
208
208
|
headers: {
|
|
209
|
+
BypassCookie: deviceKey.sessionCookie,
|
|
209
210
|
Cookie: deviceKey.sessionCookie
|
|
210
211
|
}
|
|
211
212
|
});
|
|
@@ -416,8 +417,8 @@ var TapoApi = class {
|
|
|
416
417
|
method: "POST",
|
|
417
418
|
body: securePassthroughRequest,
|
|
418
419
|
headers: {
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
BypassCookie: deviceKey.sessionCookie,
|
|
421
|
+
Cookie: deviceKey.sessionCookie
|
|
421
422
|
}
|
|
422
423
|
}
|
|
423
424
|
});
|
|
@@ -428,8 +429,8 @@ var TapoApi = class {
|
|
|
428
429
|
method: "POST",
|
|
429
430
|
body: securePassthroughRequest,
|
|
430
431
|
headers: {
|
|
431
|
-
|
|
432
|
-
|
|
432
|
+
BypassCookie: deviceKey.sessionCookie,
|
|
433
|
+
Cookie: deviceKey.sessionCookie
|
|
433
434
|
}
|
|
434
435
|
},
|
|
435
436
|
shouldWait
|
|
@@ -475,9 +476,7 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
475
476
|
return;
|
|
476
477
|
}
|
|
477
478
|
}
|
|
478
|
-
console.log("deviceInfo: ", deviceInfo);
|
|
479
479
|
switch (deviceInfo.deviceType) {
|
|
480
|
-
case "IOT.SMARTBULB":
|
|
481
480
|
case "SMART.TAPOBULB": {
|
|
482
481
|
if (config.types && !config.types.includes(import_lumia_rgb_types.ILumiaDeviceType.LIGHT)) {
|
|
483
482
|
return;
|
|
@@ -505,7 +504,6 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
505
504
|
}
|
|
506
505
|
});
|
|
507
506
|
}
|
|
508
|
-
case "IOT.SMARTPLUGSWITCH":
|
|
509
507
|
case "SMART.TAPOPLUG": {
|
|
510
508
|
if (config.types && !config.types.includes(import_lumia_rgb_types.ILumiaDeviceType.PLUG)) {
|
|
511
509
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -174,6 +174,7 @@ var securePassthrough = (deviceRequest, deviceKey) => __async(void 0, null, func
|
|
|
174
174
|
url: `http://${deviceKey.deviceIp}/app?token=${deviceKey.token}`,
|
|
175
175
|
data: securePassthroughRequest,
|
|
176
176
|
headers: {
|
|
177
|
+
BypassCookie: deviceKey.sessionCookie,
|
|
177
178
|
Cookie: deviceKey.sessionCookie
|
|
178
179
|
}
|
|
179
180
|
});
|
|
@@ -384,8 +385,8 @@ var TapoApi = class {
|
|
|
384
385
|
method: "POST",
|
|
385
386
|
body: securePassthroughRequest,
|
|
386
387
|
headers: {
|
|
387
|
-
|
|
388
|
-
|
|
388
|
+
BypassCookie: deviceKey.sessionCookie,
|
|
389
|
+
Cookie: deviceKey.sessionCookie
|
|
389
390
|
}
|
|
390
391
|
}
|
|
391
392
|
});
|
|
@@ -396,8 +397,8 @@ var TapoApi = class {
|
|
|
396
397
|
method: "POST",
|
|
397
398
|
body: securePassthroughRequest,
|
|
398
399
|
headers: {
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
BypassCookie: deviceKey.sessionCookie,
|
|
401
|
+
Cookie: deviceKey.sessionCookie
|
|
401
402
|
}
|
|
402
403
|
},
|
|
403
404
|
shouldWait
|
|
@@ -443,9 +444,7 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
443
444
|
return;
|
|
444
445
|
}
|
|
445
446
|
}
|
|
446
|
-
console.log("deviceInfo: ", deviceInfo);
|
|
447
447
|
switch (deviceInfo.deviceType) {
|
|
448
|
-
case "IOT.SMARTBULB":
|
|
449
448
|
case "SMART.TAPOBULB": {
|
|
450
449
|
if (config.types && !config.types.includes(ILumiaDeviceType.LIGHT)) {
|
|
451
450
|
return;
|
|
@@ -473,7 +472,6 @@ var discover = (config) => __async(void 0, null, function* () {
|
|
|
473
472
|
}
|
|
474
473
|
});
|
|
475
474
|
}
|
|
476
|
-
case "IOT.SMARTPLUGSWITCH":
|
|
477
475
|
case "SMART.TAPOPLUG": {
|
|
478
476
|
if (config.types && !config.types.includes(ILumiaDeviceType.PLUG)) {
|
|
479
477
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/tapo-cove",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.23",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"tsup": "*",
|
|
24
24
|
"typescript": "*"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "8a15e1eb7633c33c8b1121964b76af83af48bbce"
|
|
27
27
|
}
|