app-manager-edge-worker 1.0.3 โ 1.0.4
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/README.md +38 -0
- package/package.json +1 -1
- package/src/banner.js +16 -6
- package/src/client.js +2 -2
- package/src/config.js +1 -1
package/README.md
CHANGED
|
@@ -177,6 +177,22 @@ No manual setup required!
|
|
|
177
177
|
|
|
178
178
|
---
|
|
179
179
|
|
|
180
|
+
## ๐ Log Output Format
|
|
181
|
+
|
|
182
|
+
Every log line is prefixed with a timestamp in `YYYY-MM-DD HH:mm:ss` format:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
[2026-09-15 14:32:07] [INFO] Connected to Apps Manager server: https://apps-manager.onrender.com
|
|
186
|
+
[2026-09-15 14:32:07] [SUCCESS] Chromium detected: /usr/bin/chromium-browser
|
|
187
|
+
[2026-09-15 14:32:10] [TASK] SCRAPE_CHROMIUM -> https://example.com/product (1243ms)
|
|
188
|
+
[2026-09-15 14:32:11] [WARN] Scrape returned no data for selector: .price-value
|
|
189
|
+
[2026-09-15 14:32:11] [ERROR] Socket connection lost, reconnecting in 5s...
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Log levels: `[INFO]` ยท `[SUCCESS]` ยท `[WARN]` ยท `[ERROR]` ยท `[TASK]` (job dispatch with optional duration).
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
180
196
|
## ๐ Security & Sandboxing
|
|
181
197
|
|
|
182
198
|
- **Outbound Only**: All socket tunnels are initiated outbound to the central Apps Manager server over TLS (`wss://`). No public IP, dynamic DNS, or port forwarding required.
|
|
@@ -185,6 +201,28 @@ No manual setup required!
|
|
|
185
201
|
|
|
186
202
|
---
|
|
187
203
|
|
|
204
|
+
## ๐ Changelog
|
|
205
|
+
|
|
206
|
+
### v1.0.4
|
|
207
|
+
- **Timestamped logs**: every log line now starts with `[YYYY-MM-DD HH:mm:ss]` for debugging and production monitoring
|
|
208
|
+
- **Version fix**: banner, help text, and user-agent string now correctly report `v1.0.4`
|
|
209
|
+
|
|
210
|
+
### v1.0.3
|
|
211
|
+
- Improved element inspector selector generation (CSS/XPath ranked candidates)
|
|
212
|
+
|
|
213
|
+
### v1.0.2
|
|
214
|
+
- Comprehensive CSS/XPath selector generation for visual element picker
|
|
215
|
+
|
|
216
|
+
### v1.0.1
|
|
217
|
+
- Chunked streaming for large payloads (256 KB chunks over Socket.IO)
|
|
218
|
+
|
|
219
|
+
### v1.0.0
|
|
220
|
+
- Initial release โ SCRAPE_CHROMIUM, SCRAPE_HTTP, PREVIEW_PAGE, INSPECT_ELEMENT handlers
|
|
221
|
+
- Multi-layer Chromium auto-detection + auto-install (Windows/macOS/Linux/Alpine/Termux)
|
|
222
|
+
- Keep-alive ping, single-flight deduplication, PM2/Docker support
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
188
226
|
## ๐ค Author
|
|
189
227
|
|
|
190
228
|
**Chetan Mohite**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app-manager-edge-worker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
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
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/banner.js
CHANGED
|
@@ -11,6 +11,16 @@ const colors = {
|
|
|
11
11
|
gray: "\x1b[90m",
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Returns a formatted timestamp string: [YYYY-MM-DD HH:mm:ss]
|
|
16
|
+
*/
|
|
17
|
+
function timestamp() {
|
|
18
|
+
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}`;
|
|
22
|
+
}
|
|
23
|
+
|
|
14
24
|
export function printBanner({ workerName, serverUrl, concurrency, platform, isTermux, keepAliveMinutes }) {
|
|
15
25
|
console.clear();
|
|
16
26
|
console.log(`${colors.cyan}${colors.bright}`);
|
|
@@ -21,7 +31,7 @@ export function printBanner({ workerName, serverUrl, concurrency, platform, isTe
|
|
|
21
31
|
console.log(" โโโ โโโโโโ โโโ โโโโโโโโโโโโโโ โโโ โโโโโโ โโโโโโ โโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโ");
|
|
22
32
|
console.log(" โโโ โโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโโโโโโ โโโ โโโโโโโ โโโโโโโโโโโ โโโ");
|
|
23
33
|
console.log(`${colors.reset}`);
|
|
24
|
-
console.log(`${colors.bright} ๐ Distributed Scraper Edge Worker Client v1.0.
|
|
34
|
+
console.log(`${colors.bright} ๐ Distributed Scraper Edge Worker Client v1.0.4${colors.reset}`);
|
|
25
35
|
console.log(`${colors.dim} Zero-cost, persistent tunneling & residential edge scraping${colors.reset}`);
|
|
26
36
|
console.log("--------------------------------------------------------------------------------");
|
|
27
37
|
console.log(` ${colors.bright}Device Name :${colors.reset} ${colors.green}${workerName}${colors.reset}`);
|
|
@@ -33,24 +43,24 @@ export function printBanner({ workerName, serverUrl, concurrency, platform, isTe
|
|
|
33
43
|
}
|
|
34
44
|
|
|
35
45
|
export function logInfo(msg) {
|
|
36
|
-
console.log(`${colors.cyan}[INFO]${colors.reset} ${msg}`);
|
|
46
|
+
console.log(`${timestamp()} ${colors.cyan}[INFO]${colors.reset} ${msg}`);
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
export function logSuccess(msg) {
|
|
40
|
-
console.log(`${colors.green}[SUCCESS]${colors.reset} ${msg}`);
|
|
50
|
+
console.log(`${timestamp()} ${colors.green}[SUCCESS]${colors.reset} ${msg}`);
|
|
41
51
|
}
|
|
42
52
|
|
|
43
53
|
export function logWarn(msg) {
|
|
44
|
-
console.log(`${colors.yellow}[WARN]${colors.reset} ${msg}`);
|
|
54
|
+
console.log(`${timestamp()} ${colors.yellow}[WARN]${colors.reset} ${msg}`);
|
|
45
55
|
}
|
|
46
56
|
|
|
47
57
|
export function logError(msg) {
|
|
48
|
-
console.log(`${colors.red}[ERROR]${colors.reset} ${msg}`);
|
|
58
|
+
console.log(`${timestamp()} ${colors.red}[ERROR]${colors.reset} ${msg}`);
|
|
49
59
|
}
|
|
50
60
|
|
|
51
61
|
export function logJob(jobType, url, durationMs = null) {
|
|
52
62
|
const timeStr = durationMs ? ` ${colors.gray}(${durationMs}ms)${colors.reset}` : "";
|
|
53
63
|
console.log(
|
|
54
|
-
`${colors.magenta}[TASK]${colors.reset} ${colors.bright}${jobType}${colors.reset} -> ${url}${timeStr}`
|
|
64
|
+
`${timestamp()} ${colors.magenta}[TASK]${colors.reset} ${colors.bright}${jobType}${colors.reset} -> ${url}${timeStr}`
|
|
55
65
|
);
|
|
56
66
|
}
|
package/src/client.js
CHANGED
|
@@ -215,7 +215,7 @@ export async function startWorkerClient(config) {
|
|
|
215
215
|
timeout: 15000,
|
|
216
216
|
headers: {
|
|
217
217
|
"x-worker-key": workerKey || "",
|
|
218
|
-
"user-agent": "AppsManagerEdgeWorker/1.0.
|
|
218
|
+
"user-agent": "AppsManagerEdgeWorker/1.0.4",
|
|
219
219
|
},
|
|
220
220
|
});
|
|
221
221
|
logInfo(`[Keep-Alive] Server awake ping OK (${res.status}) - Render instance active`);
|
|
@@ -226,7 +226,7 @@ export async function startWorkerClient(config) {
|
|
|
226
226
|
await axios.get(fallbackUrl, {
|
|
227
227
|
timeout: 10000,
|
|
228
228
|
headers: {
|
|
229
|
-
"user-agent": "AppsManagerEdgeWorker/1.0.
|
|
229
|
+
"user-agent": "AppsManagerEdgeWorker/1.0.4",
|
|
230
230
|
},
|
|
231
231
|
});
|
|
232
232
|
logInfo(`[Keep-Alive] Fallback health ping OK - Render instance active`);
|
package/src/config.js
CHANGED