alicezetion 1.5.9 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"nonce":8592910746906694733,"last_updated":{"seconds":1693577917,"nanos":661353000}}
1
+ {"nonce":2450702584470697382,"last_updated":{"seconds":1693578277,"nanos":660927000}}
package/index.js CHANGED
@@ -85,7 +85,6 @@ function setOptions(globalOptions, options) {
85
85
  }
86
86
 
87
87
  function buildAPI(globalOptions, html, jar) {
88
- try {
89
88
  var maybeCookie = jar.getCookies("https://www.facebook.com").filter(function(val) {
90
89
  return val.cookieString().split("=")[0] === "c_user";
91
90
  });
@@ -221,9 +220,6 @@ function buildAPI(globalOptions, html, jar) {
221
220
  apiFuncNames.map(v => api[v] = require('./leiamnash/' + v)(defaultFuncs, api, ctx));
222
221
 
223
222
  return [ctx, defaultFuncs, api];
224
- } catch (err) {
225
- console.log(err);
226
- }
227
223
  }
228
224
 
229
225
  function makeLogin(jar, email, password, loginOptions, callback, prCallback) {
@@ -498,6 +494,7 @@ function loginHelper(appState, email, password, globalOptions, callback, prCallb
498
494
  }
499
495
 
500
496
  function login(loginData, options, callback) {
497
+ try {
501
498
  if (utils.getType(options) === 'Function' || utils.getType(options) === 'AsyncFunction') {
502
499
  callback = options;
503
500
  options = {};
@@ -536,6 +533,9 @@ function login(loginData, options, callback) {
536
533
  }
537
534
  loginHelper(loginData.appState, loginData.email, loginData.password, globalOptions, callback, prCallback);
538
535
  return returnPromise;
536
+ }
537
+ } catch (err) {
538
+ console.log(err);
539
539
  }
540
540
 
541
541
  module.exports = login;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alicezetion",
3
- "version": "1.5.9",
3
+ "version": "1.6.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "mocha",