Skip to content

Commit

Permalink
cloud: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Sep 4, 2024
1 parent fbe3e83 commit ad15fe3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
38 changes: 19 additions & 19 deletions plugins/cloud/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions plugins/cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
},
"dependencies": {
"@eneris/push-receiver": "^4.1.6",
"@eneris/push-receiver": "^4.2.0",
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk",
"bpmux": "^8.2.1",
Expand All @@ -50,8 +50,8 @@
"@types/http-proxy": "^1.17.15",
"@types/ip": "^1.1.3",
"@types/nat-upnp": "^1.1.5",
"@types/node": "^22.1.0",
"@types/node": "^22.5.2",
"ts-node": "^10.9.2"
},
"version": "0.2.36"
"version": "0.2.37"
}
20 changes: 14 additions & 6 deletions plugins/cloud/src/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ export class PushManager extends EventEmitter {
const instance = new PushReceiver({
...savedConfig,
firebase: {
messagingSenderId: senderId,
projectId: 'scrypted-app',
apiKey: 'AIzaSyDI0bgFuVPIqKZoNpB-iTOU7ijIeepxOXE',
appId: '1:827888101440:web:6ff9f8ada107e9cc0097a5',
} ,
apiKey: "AIzaSyDI0bgFuVPIqKZoNpB-iTOU7ijIeepxOXE",
authDomain: "scrypted-app.firebaseapp.com",
databaseURL: "https://scrypted-app.firebaseio.com",
projectId: "scrypted-app",
storageBucket: "scrypted-app.appspot.com",
messagingSenderId: "827888101440",
appId: "1:827888101440:web:6ff9f8ada107e9cc0097a5"
},
heartbeatIntervalMs: 15 * 60 * 1000,
});

Expand All @@ -57,7 +60,12 @@ export class PushManager extends EventEmitter {
this.emit('message', message.data);
});

await instance.connect();
try {
await instance.connect();
}
catch (e) {
console.error('failed to connect to push server', e);
}

return savedConfig.credentials?.fcm?.token || deferred.promise;
})();
Expand Down

0 comments on commit ad15fe3

Please sign in to comment.