@lumiastream/tapo-cove 3.0.16 → 3.0.18
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.d.ts +1 -1
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -408,8 +408,8 @@ var TapoApi = class {
|
|
|
408
408
|
request: encryptedRequest
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
|
-
if ((_a = config.fetchConfig) == null ? void 0 : _a.
|
|
412
|
-
return
|
|
411
|
+
if (!((_a = config.fetchConfig) == null ? void 0 : _a.useFetch)) {
|
|
412
|
+
return this.axiosInstance({
|
|
413
413
|
url: `http://${deviceKey.deviceIp}/app?token=${deviceKey.token}`,
|
|
414
414
|
data: {
|
|
415
415
|
method: "POST",
|
|
@@ -417,7 +417,8 @@ var TapoApi = class {
|
|
|
417
417
|
headers: {
|
|
418
418
|
Cookie: deviceKey.sessionCookie
|
|
419
419
|
}
|
|
420
|
-
}
|
|
420
|
+
},
|
|
421
|
+
withCredentials: true
|
|
421
422
|
});
|
|
422
423
|
} else {
|
|
423
424
|
return (0, import_fetch_cove.fetchWork)({
|
|
@@ -438,6 +439,7 @@ var TapoApi = class {
|
|
|
438
439
|
};
|
|
439
440
|
this.axiosInstance = import_axios2.default.create();
|
|
440
441
|
this.axiosInstance.defaults.timeout = (config == null ? void 0 : config.httpTimeout) || 4e3;
|
|
442
|
+
this.axiosInstance.defaults.withCredentials = true;
|
|
441
443
|
this._config = __spreadValues(__spreadValues({}, this._config), config);
|
|
442
444
|
}
|
|
443
445
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -376,8 +376,8 @@ var TapoApi = class {
|
|
|
376
376
|
request: encryptedRequest
|
|
377
377
|
}
|
|
378
378
|
};
|
|
379
|
-
if ((_a = config.fetchConfig) == null ? void 0 : _a.
|
|
380
|
-
return
|
|
379
|
+
if (!((_a = config.fetchConfig) == null ? void 0 : _a.useFetch)) {
|
|
380
|
+
return this.axiosInstance({
|
|
381
381
|
url: `http://${deviceKey.deviceIp}/app?token=${deviceKey.token}`,
|
|
382
382
|
data: {
|
|
383
383
|
method: "POST",
|
|
@@ -385,7 +385,8 @@ var TapoApi = class {
|
|
|
385
385
|
headers: {
|
|
386
386
|
Cookie: deviceKey.sessionCookie
|
|
387
387
|
}
|
|
388
|
-
}
|
|
388
|
+
},
|
|
389
|
+
withCredentials: true
|
|
389
390
|
});
|
|
390
391
|
} else {
|
|
391
392
|
return fetchWork({
|
|
@@ -406,6 +407,7 @@ var TapoApi = class {
|
|
|
406
407
|
};
|
|
407
408
|
this.axiosInstance = axios2.create();
|
|
408
409
|
this.axiosInstance.defaults.timeout = (config == null ? void 0 : config.httpTimeout) || 4e3;
|
|
410
|
+
this.axiosInstance.defaults.withCredentials = true;
|
|
409
411
|
this._config = __spreadValues(__spreadValues({}, this._config), config);
|
|
410
412
|
}
|
|
411
413
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/tapo-cove",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.18",
|
|
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": "66cb28d8fa4240588e21550bfc73c606067f200d"
|
|
27
27
|
}
|