stfca 1.0.4 → 1.0.5

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/index.js +10 -0
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
 
4
4
  All notable changes to ST-FCA will be documented in this file.
5
5
 
6
+ ## [1.0.4] - 2025-01-13
7
+
8
+ ### Added
9
+ - 🔄 Automatic update checking on package initialization
10
+ - ⚡ Non-blocking update process - doesn't interrupt user's bot startup
11
+ - 🎯 Update check runs once per session to avoid redundant checks
12
+ - 💡 Silent error handling for update checks
13
+
14
+ ### Changed
15
+ - Update checker now integrated directly into login flow
16
+ - Improved user experience with seamless auto-updates
17
+
6
18
  ## [1.0.3] - 2025-01-13
7
19
 
8
20
  ### Added
package/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  var utils = require("./utils");
4
4
  var cheerio = require("cheerio");
5
5
  var log = require("npmlog");
6
+ var { checkForFCAUpdate } = require("./checkUpdate");
6
7
  /*var { getThemeColors } = require("../../func/utils/log.js");
7
8
  var logger = require("../../func/utils/log.js");
8
9
  var { cra, cv, cb, co } = getThemeColors();*/
@@ -10,6 +11,7 @@ log.maxRecordSize = 100;
10
11
  var checkVerified = null;
11
12
  const Boolean_Option = ['online', 'selfListen', 'listenEvents', 'updatePresence', 'forceLogin', 'autoMarkDelivery', 'autoMarkRead', 'listenTyping', 'autoReconnect', 'emitReady'];
12
13
  global.ditconmemay = false;
14
+ global.stfcaUpdateChecked = false;
13
15
 
14
16
  function setOptions(globalOptions, options) {
15
17
  Object.keys(options).map(function (key) {
@@ -407,6 +409,14 @@ function loginHelper(appState, email, password, globalOptions, callback, prCallb
407
409
 
408
410
 
409
411
  function login(loginData, options, callback) {
412
+ // Check for updates (non-blocking, only once per session)
413
+ if (!global.stfcaUpdateChecked) {
414
+ global.stfcaUpdateChecked = true;
415
+ checkForFCAUpdate().catch(err => {
416
+ // Silently ignore update check errors to not block login
417
+ });
418
+ }
419
+
410
420
  if (utils.getType(options) === 'Function' || utils.getType(options) === 'AsyncFunction') {
411
421
  callback = options;
412
422
  options = {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "stfca",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "description": "Unofficial Facebook Chat API for Node.js - Enhanced by ST | Sheikh Tamim",
6
6
  "main": "index.js",
7
7
  "scripts": {