parse-dashboard-analytics 7.4.2 → 7.4.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.
- package/Parse-Dashboard/Authentication.js +9 -4
- package/Parse-Dashboard/CLI/mfa.js +11 -5
- package/Parse-Dashboard/app.js +93 -26
- package/Parse-Dashboard/browser-control/BrowserControlAPI.js +468 -0
- package/Parse-Dashboard/browser-control/BrowserEventStream.js +294 -0
- package/Parse-Dashboard/browser-control/BrowserSessionManager.js +304 -0
- package/Parse-Dashboard/browser-control/README.md +852 -0
- package/Parse-Dashboard/browser-control/ServerOrchestrator.js +334 -0
- package/Parse-Dashboard/browser-control/index.js +27 -0
- package/Parse-Dashboard/browser-control/setup.js +405 -0
- package/Parse-Dashboard/public/bundles/120.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/183.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/19.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/221.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/372.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/448.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/573.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/578.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/584.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/629.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/643.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/647.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/701.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/729.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/75.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/753.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/817.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/844.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/862.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/866.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/874.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/881.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/929.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/950.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/97.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/976.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/dashboard.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/dashboard.bundle.js.LICENSE.txt +27 -33
- package/Parse-Dashboard/public/bundles/login.bundle.js +1 -1
- package/Parse-Dashboard/public/bundles/sprites.svg +294 -154
- package/Parse-Dashboard/server.js +33 -2
- package/README.md +475 -117
- package/package.json +68 -53
|
@@ -41,12 +41,17 @@ module.exports = (options) => {
|
|
|
41
41
|
const configSSLCert = options.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT;
|
|
42
42
|
const configAgent = options.agent || process.env.PARSE_DASHBOARD_AGENT;
|
|
43
43
|
|
|
44
|
-
function handleSIGs(server) {
|
|
44
|
+
function handleSIGs(server, browserControlSetup) {
|
|
45
45
|
const signals = {
|
|
46
46
|
'SIGINT': 2,
|
|
47
47
|
'SIGTERM': 15
|
|
48
48
|
};
|
|
49
49
|
function shutdown(signal, value) {
|
|
50
|
+
// Cleanup browser control resources if enabled
|
|
51
|
+
if (browserControlSetup && browserControlSetup.cleanup) {
|
|
52
|
+
browserControlSetup.cleanup();
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
server.close(function () {
|
|
51
56
|
console.log('server stopped by ' + signal);
|
|
52
57
|
process.exit(128 + value);
|
|
@@ -169,12 +174,33 @@ module.exports = (options) => {
|
|
|
169
174
|
cookieSessionMaxAge,
|
|
170
175
|
cookieSessionStore: config.data.cookieSessionStore
|
|
171
176
|
};
|
|
177
|
+
|
|
178
|
+
// Browser Control API for AI agent verification (development only)
|
|
179
|
+
// NOTE: Must be mounted BEFORE parseDashboard middleware to bypass authentication
|
|
180
|
+
let browserControlSetup = null;
|
|
181
|
+
try {
|
|
182
|
+
const setupBrowserControl = require('./browser-control/setup');
|
|
183
|
+
browserControlSetup = setupBrowserControl(app, config);
|
|
184
|
+
} catch (error) {
|
|
185
|
+
// Silently ignore if browser-control module doesn't exist (production build)
|
|
186
|
+
if (error.code !== 'MODULE_NOT_FOUND') {
|
|
187
|
+
console.warn('Failed to load Browser Control:', error.message);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Mount parseDashboard with authentication
|
|
172
192
|
app.use(mountPath, parseDashboard(config.data, dashboardOptions));
|
|
193
|
+
|
|
173
194
|
let server;
|
|
174
195
|
if(!configSSLKey || !configSSLCert){
|
|
175
196
|
// Start the server.
|
|
176
197
|
server = app.listen(port, host, function () {
|
|
177
198
|
console.log(`The dashboard is now available at http://${server.address().address}:${server.address().port}${mountPath}`);
|
|
199
|
+
|
|
200
|
+
// Initialize browser control WebSocket if enabled
|
|
201
|
+
if (browserControlSetup) {
|
|
202
|
+
browserControlSetup.initializeWebSocket(server);
|
|
203
|
+
}
|
|
178
204
|
});
|
|
179
205
|
} else {
|
|
180
206
|
// Start the server using SSL.
|
|
@@ -186,7 +212,12 @@ module.exports = (options) => {
|
|
|
186
212
|
cert: certificate
|
|
187
213
|
}, app).listen(port, host, function () {
|
|
188
214
|
console.log(`The dashboard is now available at https://${server.address().address}:${server.address().port}${mountPath}`);
|
|
215
|
+
|
|
216
|
+
// Initialize browser control WebSocket if enabled
|
|
217
|
+
if (browserControlSetup) {
|
|
218
|
+
browserControlSetup.initializeWebSocket(server);
|
|
219
|
+
}
|
|
189
220
|
});
|
|
190
221
|
}
|
|
191
|
-
handleSIGs(server);
|
|
222
|
+
handleSIGs(server, browserControlSetup);
|
|
192
223
|
};
|