pushy-electron 1.0.16 → 1.0.17

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/lib/Pushy.d.ts CHANGED
@@ -28,6 +28,8 @@ declare namespace Pushy {
28
28
 
29
29
  function isEnterpriseConfigured(): boolean
30
30
 
31
+ function setDeviceCredentials(token: string, auth: string): void
32
+
31
33
  function setEnterpriseConfig(endpoint: string, mqttEndpoint: string): void
32
34
 
33
35
  function mTLS(config: object): void
package/lib/Pushy.js CHANGED
@@ -288,6 +288,12 @@ module.exports = {
288
288
  }
289
289
  },
290
290
 
291
+ setDeviceCredentials(token, auth) {
292
+ // Manually set token & auth key
293
+ localStorage.set(config.storageKeys.token, token);
294
+ localStorage.set(config.storageKeys.tokenAuth, auth);
295
+ },
296
+
291
297
  disconnect() {
292
298
  // Attempt to disconnect from Pushy
293
299
  mqtt.disconnect(this);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pushy-electron",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "main": "lib/Pushy.js",
7
7
  "typings": "lib/Pushy.d.ts",
8
8
  "//": "Also update version in config.js",
9
- "version": "1.0.16",
9
+ "version": "1.0.17",
10
10
  "scripts": {
11
11
  "dev": "electron electron.js"
12
12
  },