-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQUICK_START.js
More file actions
204 lines (157 loc) · 8.18 KB
/
QUICK_START.js
File metadata and controls
204 lines (157 loc) · 8.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#!/usr/bin/env node
/**
* QUICK START GUIDE
*
* Collector Activation & Deactivation System
*/
console.log(`
╔════════════════════════════════════════════════════════════════════════════╗
║ QUICK START: COLLECTOR CONFIGURATION ║
╚════════════════════════════════════════════════════════════════════════════╝
📋 WHAT'S NEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ 1. Configurable Collectors (Phablets)
• Enable/disable any of 13 data collection modules
• Control what data is collected
• Reduce resource usage by disabling unnecessary collectors
✅ 2. Module-Based Organization
• Each collector's data stored in its own folder
• Organized output structure in /output/ directory
• Easy to find and manage module-specific data
✅ 3. CLI Control
• Simple commands to manage collectors
• Real-time enable/disable without code changes
• List all available collectors
🚀 GETTING STARTED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 1: Check current collector status
$ npm run collectors list
Output shows:
✓ ENABLED network - HTTP requests and responses
✗ disabled console - Console logs, errors, and dialogs
... (and 11 more collectors)
STEP 2: Enable collectors you need
$ npm run collectors enable network
$ npm run collectors enable console
STEP 3: Disable collectors you don't need
$ npm run collectors disable memory
$ npm run collectors disable webgl
STEP 4: Start data collection
$ npm start
The browser will open and collect data from enabled modules only!
💡 COMMON WORKFLOWS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 MINIMAL (Network + Console Only)
$ npm run collectors disable-all
$ npm run collectors enable network
$ npm run collectors enable console
$ npm start
📌 PERFORMANCE ANALYSIS
$ npm run collectors disable-all
$ npm run collectors enable performance
$ npm run collectors enable media
$ npm run collectors enable memory
$ npm run collectors enable network
$ npm start
📌 SECURITY ANALYSIS
$ npm run collectors disable-all
$ npm run collectors enable security
$ npm run collectors enable application
$ npm run collectors enable network
$ npm run collectors enable serviceWorker
$ npm start
📌 DOM ANALYSIS
$ npm run collectors disable-all
$ npm run collectors enable elements
$ npm run collectors enable css
$ npm run collectors enable scripts
$ npm run collectors enable accessibility
$ npm run collectors enable console
$ npm start
📌 FULL ANALYSIS (Everything)
$ npm run collectors enable-all
$ npm start
🎮 AVAILABLE COMMANDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
npm run collectors list List all collectors and status
npm run collectors enable <name> Activate a collector
npm run collectors disable <name> Deactivate a collector
npm run collectors toggle <name> Switch on/off
npm run collectors status <name> Check single collector status
npm run collectors enable-all Activate all collectors
npm run collectors disable-all Deactivate all collectors
📚 AVAILABLE COLLECTORS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. network - HTTP requests/responses, headers, bodies
2. console - Logs, errors, warnings, browser dialogs
3. elements - DOM elements, attributes, structure
4. scripts - JavaScript files and inline scripts
5. css - Stylesheets and computed styles
6. application - Cookies, local storage, session storage
7. security - SSL/TLS, security headers
8. performance - Performance traces and metrics
9. accessibility - Accessibility tree information
10. media - Audio/video element statistics
11. webgl - Canvas and WebGL details
12. memory - Heap snapshots
13. serviceWorker - Service worker registration info
📁 OUTPUT STRUCTURE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
output/
├── network/
│ ├── network-1763561850014.json
│ └── click-1763561850014/
├── console/
│ └── console-1763561850014.json
├── elements/
│ └── elements-1763561850014.json
├── scripts/
├── css/
├── application/
├── security/
├── performance/
├── accessibility/
├── media/
├── webgl/
├── memory/
├── serviceWorker/
└── analysis-1763561850014.json (combined from enabled collectors)
⚙️ CONFIGURATION FILE (config.json)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You can also edit config.json directly:
{
"targetUrl": "https://www.i2ocr.com/pdf-ocr-persian",
"headless": false,
"slowMo": 80,
"collectors": {
"network": { "enabled": true, "description": "..." },
"console": { "enabled": true, "description": "..." },
"elements": { "enabled": false, "description": "..." },
...
}
}
💾 SAVING SETTINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All settings are saved to config.json automatically!
• Your choices persist across application runs
• Edit config.json manually if needed
• Use CLI commands for quick changes
🎯 PRO TIPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Start with minimal config → enable as needed
• Disable memory if disk space is limited
• Use performance preset for optimization analysis
• Check npm run collectors list before each run
• Each collector saves to its own folder for easy analysis
📖 MORE INFORMATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
See README.md for complete documentation
See IMPLEMENTATION.md for technical details
🎉 READY TO GO!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next steps:
1. npm run collectors list (see what's available)
2. npm run collectors enable ... (enable what you need)
3. npm start (start collecting data)
Happy collecting! 🚀
`);