app-manager-edge-worker 1.0.5 → 1.0.6

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/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "app-manager-edge-worker",
3
- "version": "1.0.5",
4
- "description": "Distributed Scraper Edge Worker for Apps Manager. Run on any local machine, VPS, or Termux Android device to serve browser and HTTP scraping jobs.",
5
- "type": "module",
6
- "bin": {
7
- "app-manager-edge-worker": "./bin/worker.js",
8
- "apps-manager-worker": "./bin/worker.js"
9
- },
10
- "main": "./src/client.js",
11
- "scripts": {
12
- "start": "node ./bin/worker.js"
13
- },
14
- "keywords": [
15
- "app-manager-edge-worker",
16
- "apps-manager",
17
- "scraper",
18
- "edge-worker",
19
- "puppeteer",
20
- "residential-proxy",
21
- "distributed-scraping",
22
- "termux"
23
- ],
24
- "author": "Chetan Mohite <chetanmohite2128@gmail.com> (https://github.com/codes-by-chetan)",
25
- "license": "MIT",
26
- "homepage": "https://apps-manager.onrender.com",
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/codes-by-chetan/Apps_Manager.git",
30
- "directory": "packages/worker"
31
- },
32
- "publishConfig": {
33
- "access": "public"
34
- },
35
- "dependencies": {
36
- "@puppeteer/browsers": "^3.2.2",
37
- "axios": "^1.8.1",
38
- "cheerio": "^1.0.0",
39
- "puppeteer": "^24.3.0",
40
- "puppeteer-core": "^24.3.0",
41
- "puppeteer-extra": "^3.3.6",
42
- "puppeteer-extra-plugin-stealth": "^2.11.2",
43
- "socket.io-client": "^4.8.1"
44
- }
45
- }
1
+ {
2
+ "name": "app-manager-edge-worker",
3
+ "version": "1.0.6",
4
+ "description": "Distributed Scraper Edge Worker for Apps Manager. Run on any local machine, VPS, or Termux Android device to serve browser and HTTP scraping jobs.",
5
+ "type": "module",
6
+ "bin": {
7
+ "app-manager-edge-worker": "./bin/worker.js",
8
+ "apps-manager-worker": "./bin/worker.js"
9
+ },
10
+ "main": "./src/client.js",
11
+ "scripts": {
12
+ "start": "node ./bin/worker.js"
13
+ },
14
+ "keywords": [
15
+ "app-manager-edge-worker",
16
+ "apps-manager",
17
+ "scraper",
18
+ "edge-worker",
19
+ "puppeteer",
20
+ "residential-proxy",
21
+ "distributed-scraping",
22
+ "termux"
23
+ ],
24
+ "author": "Chetan Mohite <chetanmohite2128@gmail.com> (https://github.com/codes-by-chetan)",
25
+ "license": "MIT",
26
+ "homepage": "https://apps-manager.onrender.com",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/codes-by-chetan/Apps_Manager.git",
30
+ "directory": "packages/worker"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "dependencies": {
36
+ "@puppeteer/browsers": "^3.2.2",
37
+ "axios": "^1.8.1",
38
+ "cheerio": "^1.0.0",
39
+ "puppeteer": "^24.3.0",
40
+ "puppeteer-core": "^24.3.0",
41
+ "puppeteer-extra": "^3.3.6",
42
+ "puppeteer-extra-plugin-stealth": "^2.11.2",
43
+ "socket.io-client": "^4.8.1"
44
+ }
45
+ }
package/src/banner.js CHANGED
@@ -1,3 +1,12 @@
1
+ import { createRequire } from "module";
2
+
3
+ const require = createRequire(import.meta.url);
4
+ let workerVersion = "1.0.6";
5
+ try {
6
+ const pkg = require("../package.json");
7
+ if (pkg?.version) workerVersion = pkg.version;
8
+ } catch (_) {}
9
+
1
10
  // ANSI color helpers
2
11
  const colors = {
3
12
  reset: "\x1b[0m",
@@ -12,13 +21,18 @@ const colors = {
12
21
  };
13
22
 
14
23
  /**
15
- * Returns a formatted timestamp string: [YYYY-MM-DD HH:mm:ss]
24
+ * Returns a formatted timestamp string using the device's local time: [YYYY-MM-DD HH:mm:ss]
16
25
  */
17
26
  function timestamp() {
18
27
  const now = new Date();
19
- const date = now.toISOString().slice(0, 10);
20
- const time = now.toISOString().slice(11, 19);
21
- return `${colors.gray}[${date} ${time}]${colors.reset}`;
28
+ const pad = (n) => String(n).padStart(2, "0");
29
+ const year = now.getFullYear();
30
+ const month = pad(now.getMonth() + 1);
31
+ const day = pad(now.getDate());
32
+ const hours = pad(now.getHours());
33
+ const minutes = pad(now.getMinutes());
34
+ const seconds = pad(now.getSeconds());
35
+ return `${colors.gray}[${year}-${month}-${day} ${hours}:${minutes}:${seconds}]${colors.reset}`;
22
36
  }
23
37
 
24
38
  export function printBanner({ workerName, serverUrl, concurrency, platform, isTermux, keepAliveMinutes }) {
@@ -31,7 +45,7 @@ export function printBanner({ workerName, serverUrl, concurrency, platform, isTe
31
45
  console.log(" ██║ ██║██║ ██║ ███████║██╗██║ ╚═╝ ██║██║ ██║██║ ╚████║██║ ██║╚██████╔╝███████╗██║ ██║");
32
46
  console.log(" ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝");
33
47
  console.log(`${colors.reset}`);
34
- console.log(`${colors.bright} 🌐 Distributed Scraper Edge Worker Client v1.0.4${colors.reset}`);
48
+ console.log(`${colors.bright} 🌐 Distributed Scraper Edge Worker Client v${workerVersion}${colors.reset}`);
35
49
  console.log(`${colors.dim} Zero-cost, persistent tunneling & residential edge scraping${colors.reset}`);
36
50
  console.log("--------------------------------------------------------------------------------");
37
51
  console.log(` ${colors.bright}Device Name :${colors.reset} ${colors.green}${workerName}${colors.reset}`);