@lumiastream/tapo-cove 3.0.18 → 3.0.20

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 CHANGED
@@ -96,7 +96,7 @@ declare class TapoApi {
96
96
  };
97
97
  state: LightState;
98
98
  fetchConfig?: {
99
- useFetch: boolean;
99
+ useAxios: boolean;
100
100
  shouldWait: boolean;
101
101
  };
102
102
  }) => Promise<any>;
package/dist/index.js CHANGED
@@ -408,17 +408,17 @@ var TapoApi = class {
408
408
  request: encryptedRequest
409
409
  }
410
410
  };
411
- if (!((_a = config.fetchConfig) == null ? void 0 : _a.useFetch)) {
411
+ if ((_a = config.fetchConfig) == null ? void 0 : _a.useAxios) {
412
412
  return this.axiosInstance({
413
413
  url: `http://${deviceKey.deviceIp}/app?token=${deviceKey.token}`,
414
414
  data: {
415
415
  method: "POST",
416
416
  body: securePassthroughRequest,
417
417
  headers: {
418
- Cookie: deviceKey.sessionCookie
418
+ Cookie: deviceKey.sessionCookie,
419
+ BypassCookie: deviceKey.sessionCookie
419
420
  }
420
- },
421
- withCredentials: true
421
+ }
422
422
  });
423
423
  } else {
424
424
  return (0, import_fetch_cove.fetchWork)({
@@ -427,7 +427,8 @@ var TapoApi = class {
427
427
  method: "POST",
428
428
  body: securePassthroughRequest,
429
429
  headers: {
430
- Cookie: deviceKey.sessionCookie
430
+ Cookie: deviceKey.sessionCookie,
431
+ BypassCookie: deviceKey.sessionCookie
431
432
  }
432
433
  },
433
434
  shouldWait
@@ -439,7 +440,6 @@ var TapoApi = class {
439
440
  };
440
441
  this.axiosInstance = import_axios2.default.create();
441
442
  this.axiosInstance.defaults.timeout = (config == null ? void 0 : config.httpTimeout) || 4e3;
442
- this.axiosInstance.defaults.withCredentials = true;
443
443
  this._config = __spreadValues(__spreadValues({}, this._config), config);
444
444
  }
445
445
  };
package/dist/index.mjs CHANGED
@@ -376,17 +376,17 @@ var TapoApi = class {
376
376
  request: encryptedRequest
377
377
  }
378
378
  };
379
- if (!((_a = config.fetchConfig) == null ? void 0 : _a.useFetch)) {
379
+ if ((_a = config.fetchConfig) == null ? void 0 : _a.useAxios) {
380
380
  return this.axiosInstance({
381
381
  url: `http://${deviceKey.deviceIp}/app?token=${deviceKey.token}`,
382
382
  data: {
383
383
  method: "POST",
384
384
  body: securePassthroughRequest,
385
385
  headers: {
386
- Cookie: deviceKey.sessionCookie
386
+ Cookie: deviceKey.sessionCookie,
387
+ BypassCookie: deviceKey.sessionCookie
387
388
  }
388
- },
389
- withCredentials: true
389
+ }
390
390
  });
391
391
  } else {
392
392
  return fetchWork({
@@ -395,7 +395,8 @@ var TapoApi = class {
395
395
  method: "POST",
396
396
  body: securePassthroughRequest,
397
397
  headers: {
398
- Cookie: deviceKey.sessionCookie
398
+ Cookie: deviceKey.sessionCookie,
399
+ BypassCookie: deviceKey.sessionCookie
399
400
  }
400
401
  },
401
402
  shouldWait
@@ -407,7 +408,6 @@ var TapoApi = class {
407
408
  };
408
409
  this.axiosInstance = axios2.create();
409
410
  this.axiosInstance.defaults.timeout = (config == null ? void 0 : config.httpTimeout) || 4e3;
410
- this.axiosInstance.defaults.withCredentials = true;
411
411
  this._config = __spreadValues(__spreadValues({}, this._config), config);
412
412
  }
413
413
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/tapo-cove",
3
- "version": "3.0.18",
3
+ "version": "3.0.20",
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": "66cb28d8fa4240588e21550bfc73c606067f200d"
26
+ "gitHead": "be382b15b3784c28bba5d60fccc970d3ccc67ab9"
27
27
  }