@lumiastream/tapo-cove 3.0.19 → 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,14 +408,15 @@ 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
  }
421
422
  });
@@ -426,7 +427,8 @@ var TapoApi = class {
426
427
  method: "POST",
427
428
  body: securePassthroughRequest,
428
429
  headers: {
429
- Cookie: deviceKey.sessionCookie
430
+ Cookie: deviceKey.sessionCookie,
431
+ BypassCookie: deviceKey.sessionCookie
430
432
  }
431
433
  },
432
434
  shouldWait
@@ -438,7 +440,6 @@ var TapoApi = class {
438
440
  };
439
441
  this.axiosInstance = import_axios2.default.create();
440
442
  this.axiosInstance.defaults.timeout = (config == null ? void 0 : config.httpTimeout) || 4e3;
441
- this.axiosInstance.defaults.webSecurity = false;
442
443
  this._config = __spreadValues(__spreadValues({}, this._config), config);
443
444
  }
444
445
  };
package/dist/index.mjs CHANGED
@@ -376,14 +376,15 @@ 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
  }
389
390
  });
@@ -394,7 +395,8 @@ var TapoApi = class {
394
395
  method: "POST",
395
396
  body: securePassthroughRequest,
396
397
  headers: {
397
- Cookie: deviceKey.sessionCookie
398
+ Cookie: deviceKey.sessionCookie,
399
+ BypassCookie: deviceKey.sessionCookie
398
400
  }
399
401
  },
400
402
  shouldWait
@@ -406,7 +408,6 @@ var TapoApi = class {
406
408
  };
407
409
  this.axiosInstance = axios2.create();
408
410
  this.axiosInstance.defaults.timeout = (config == null ? void 0 : config.httpTimeout) || 4e3;
409
- this.axiosInstance.defaults.webSecurity = false;
410
411
  this._config = __spreadValues(__spreadValues({}, this._config), config);
411
412
  }
412
413
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/tapo-cove",
3
- "version": "3.0.19",
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": "279191669821d9d04ca87576a2cb91d0af37655c"
26
+ "gitHead": "be382b15b3784c28bba5d60fccc970d3ccc67ab9"
27
27
  }