aura-security 0.4.3 → 0.4.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/dist/cli.js +1 -1
- package/dist/serve-visualizer.js +27 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ import { existsSync, writeFileSync, mkdirSync } from 'fs';
|
|
|
24
24
|
import { join, resolve, basename } from 'path';
|
|
25
25
|
import { spawnSync } from 'child_process';
|
|
26
26
|
const AURA_URL = process.env.AURA_URL ?? 'http://127.0.0.1:3000';
|
|
27
|
-
const VERSION = '0.4.
|
|
27
|
+
const VERSION = '0.4.4';
|
|
28
28
|
// ANSI colors for terminal output
|
|
29
29
|
const colors = {
|
|
30
30
|
reset: '\x1b[0m',
|
package/dist/serve-visualizer.js
CHANGED
|
@@ -5,6 +5,27 @@ import { readFileSync, existsSync } from 'fs';
|
|
|
5
5
|
import { join, extname } from 'path';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
7
7
|
import { dirname } from 'path';
|
|
8
|
+
import { exec } from 'child_process';
|
|
9
|
+
import { platform } from 'os';
|
|
10
|
+
// Open URL in default browser
|
|
11
|
+
function openBrowser(url) {
|
|
12
|
+
const plat = platform();
|
|
13
|
+
let cmd;
|
|
14
|
+
if (plat === 'darwin') {
|
|
15
|
+
cmd = `open "${url}"`;
|
|
16
|
+
}
|
|
17
|
+
else if (plat === 'win32') {
|
|
18
|
+
cmd = `start "" "${url}"`;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
cmd = `xdg-open "${url}"`;
|
|
22
|
+
}
|
|
23
|
+
exec(cmd, (err) => {
|
|
24
|
+
if (err) {
|
|
25
|
+
console.log(`\n Open manually: ${url}\n`);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
8
29
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
30
|
const VISUALIZER_DIR = join(__dirname, '..', 'visualizer');
|
|
10
31
|
const PORT = parseInt(process.env.VISUALIZER_PORT ?? '8080', 10);
|
|
@@ -61,6 +82,7 @@ const server = createServer((req, res) => {
|
|
|
61
82
|
}
|
|
62
83
|
});
|
|
63
84
|
server.listen(PORT, () => {
|
|
85
|
+
const dashboardUrl = `http://127.0.0.1:${PORT}/app`;
|
|
64
86
|
console.log(`
|
|
65
87
|
╔═══════════════════════════════════════════════════════════╗
|
|
66
88
|
║ AURASECURITY - WEB SERVER ║
|
|
@@ -75,4 +97,9 @@ Routes:
|
|
|
75
97
|
/app 3D Dashboard (visualizer)
|
|
76
98
|
/app/classic Classic dashboard UI
|
|
77
99
|
`);
|
|
100
|
+
// Auto-open browser (skip if NO_OPEN env var is set)
|
|
101
|
+
if (!process.env.NO_OPEN) {
|
|
102
|
+
console.log(' Opening browser...\n');
|
|
103
|
+
openBrowser(dashboardUrl);
|
|
104
|
+
}
|
|
78
105
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aura-security",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Deterministic security auditing engine with optional AI advisory layer. Run as CLI, CI step, or service. AI does not make enforcement decisions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|