@arcadialdev/arcality 2.4.24 → 2.4.26
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/.agents/skills/e2e-testing-expert/SKILL.md +28 -28
- package/.agents/skills/security-qa/SKILL.md +254 -0
- package/README.md +95 -95
- package/bin/arcality.mjs +55 -55
- package/package.json +68 -68
- package/playwright.config.js +33 -33
- package/scripts/gen-and-run.mjs +932 -929
- package/scripts/init.mjs +297 -297
- package/scripts/postinstall.mjs +77 -77
- package/src/arcalityClient.mjs +266 -266
- package/src/configLoader.mjs +179 -179
- package/src/configManager.mjs +172 -172
- package/src/envSetup.ts +205 -205
- package/src/index.ts +25 -25
- package/src/services/collectiveMemoryService.ts +1 -1
- package/src/services/securityScanner.ts +128 -0
- package/tests/_helpers/ArcalityReporter.js +706 -303
- package/tests/_helpers/ArcalityReporter.ts +262 -27
- package/tests/_helpers/agentic-runner.bundle.spec.js +357 -5
- package/tests/_helpers/agentic-runner.spec.ts +37 -1
- package/tests/_helpers/ai-agent-helper.ts +128 -6
- package/tests/_helpers/qa-security-tools.ts +265 -0
package/scripts/postinstall.mjs
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// scripts/postinstall.mjs — Post-install hook
|
|
3
|
-
// Runs automatically after 'npm install @arcadialdev/arcality'
|
|
4
|
-
|
|
5
|
-
import fs from 'node:fs';
|
|
6
|
-
import path from 'node:path';
|
|
7
|
-
import os from 'node:os';
|
|
8
|
-
|
|
9
|
-
const CONFIG_DIR = path.join(os.homedir(), '.arcality');
|
|
10
|
-
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
|
|
11
|
-
|
|
12
|
-
// Read version from package.json
|
|
13
|
-
let version = 'unknown';
|
|
14
|
-
try {
|
|
15
|
-
const pkgPath = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..', 'package.json');
|
|
16
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
17
|
-
version = pkg.version || 'unknown';
|
|
18
|
-
} catch { }
|
|
19
|
-
|
|
20
|
-
// ── Create global config dir if missing ──
|
|
21
|
-
if (!fs.existsSync(CONFIG_DIR)) {
|
|
22
|
-
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
if (!fs.existsSync(CONFIG_FILE)) {
|
|
25
|
-
const defaultConfig = { api_key: '', version, installed_at: new Date().toISOString() };
|
|
26
|
-
fs.writeFileSync(CONFIG_FILE, JSON.stringify(defaultConfig, null, 2), 'utf8');
|
|
27
|
-
} else {
|
|
28
|
-
try {
|
|
29
|
-
let raw = fs.readFileSync(CONFIG_FILE, 'utf8');
|
|
30
|
-
if (raw.charCodeAt(0) === 0xFEFF) raw = raw.slice(1);
|
|
31
|
-
const config = JSON.parse(raw);
|
|
32
|
-
config.version = version;
|
|
33
|
-
config.updated_at = new Date().toISOString();
|
|
34
|
-
fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2), 'utf8');
|
|
35
|
-
} catch { }
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// ── Inject `arcality` npm scripts into user's project package.json ──
|
|
39
|
-
const userPkgPath = path.join(process.cwd(), 'package.json');
|
|
40
|
-
let scriptsInjected = false;
|
|
41
|
-
|
|
42
|
-
if (fs.existsSync(userPkgPath)) {
|
|
43
|
-
try {
|
|
44
|
-
let raw = fs.readFileSync(userPkgPath, 'utf8');
|
|
45
|
-
if (raw.charCodeAt(0) === 0xFEFF) raw = raw.slice(1);
|
|
46
|
-
const pkg = JSON.parse(raw);
|
|
47
|
-
|
|
48
|
-
// Only inject if not already there
|
|
49
|
-
if (!pkg.scripts?.['arcality'] && !pkg.scripts?.['arcality:run']) {
|
|
50
|
-
pkg.scripts = pkg.scripts || {};
|
|
51
|
-
pkg.scripts['arcality'] = 'arcality run';
|
|
52
|
-
pkg.scripts['arcality:init'] = 'arcality init';
|
|
53
|
-
pkg.scripts['arcality:run'] = 'arcality run';
|
|
54
|
-
fs.writeFileSync(userPkgPath, JSON.stringify(pkg, null, 2), 'utf8');
|
|
55
|
-
scriptsInjected = true;
|
|
56
|
-
}
|
|
57
|
-
} catch { /* silently skip if user's package.json is unreadable */ }
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// ── Banner ──
|
|
61
|
-
console.log('');
|
|
62
|
-
console.log(' ╔══════════════════════════════════════════════╗');
|
|
63
|
-
console.log(` ║ ARCALITY v${version.padEnd(10)} — Installed ✅ ║`);
|
|
64
|
-
console.log(' ╚══════════════════════════════════════════════╝');
|
|
65
|
-
console.log('');
|
|
66
|
-
|
|
67
|
-
if (scriptsInjected) {
|
|
68
|
-
console.log(' ⚡ Scripts added to your package.json automatically!');
|
|
69
|
-
console.log('');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
console.log(' 📌 How to use Arcality:');
|
|
73
|
-
console.log('');
|
|
74
|
-
console.log(' npm run arcality:init → Configure this project');
|
|
75
|
-
console.log(' npm run arcality:run → Launch an autonomous test mission');
|
|
76
|
-
console.log(' npm run arcality → Open the interactive menu');
|
|
77
|
-
console.log('');
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// scripts/postinstall.mjs — Post-install hook
|
|
3
|
+
// Runs automatically after 'npm install @arcadialdev/arcality'
|
|
4
|
+
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import os from 'node:os';
|
|
8
|
+
|
|
9
|
+
const CONFIG_DIR = path.join(os.homedir(), '.arcality');
|
|
10
|
+
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
|
|
11
|
+
|
|
12
|
+
// Read version from package.json
|
|
13
|
+
let version = 'unknown';
|
|
14
|
+
try {
|
|
15
|
+
const pkgPath = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..', 'package.json');
|
|
16
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
17
|
+
version = pkg.version || 'unknown';
|
|
18
|
+
} catch { }
|
|
19
|
+
|
|
20
|
+
// ── Create global config dir if missing ──
|
|
21
|
+
if (!fs.existsSync(CONFIG_DIR)) {
|
|
22
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
23
|
+
}
|
|
24
|
+
if (!fs.existsSync(CONFIG_FILE)) {
|
|
25
|
+
const defaultConfig = { api_key: '', version, installed_at: new Date().toISOString() };
|
|
26
|
+
fs.writeFileSync(CONFIG_FILE, JSON.stringify(defaultConfig, null, 2), 'utf8');
|
|
27
|
+
} else {
|
|
28
|
+
try {
|
|
29
|
+
let raw = fs.readFileSync(CONFIG_FILE, 'utf8');
|
|
30
|
+
if (raw.charCodeAt(0) === 0xFEFF) raw = raw.slice(1);
|
|
31
|
+
const config = JSON.parse(raw);
|
|
32
|
+
config.version = version;
|
|
33
|
+
config.updated_at = new Date().toISOString();
|
|
34
|
+
fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2), 'utf8');
|
|
35
|
+
} catch { }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ── Inject `arcality` npm scripts into user's project package.json ──
|
|
39
|
+
const userPkgPath = path.join(process.cwd(), 'package.json');
|
|
40
|
+
let scriptsInjected = false;
|
|
41
|
+
|
|
42
|
+
if (fs.existsSync(userPkgPath)) {
|
|
43
|
+
try {
|
|
44
|
+
let raw = fs.readFileSync(userPkgPath, 'utf8');
|
|
45
|
+
if (raw.charCodeAt(0) === 0xFEFF) raw = raw.slice(1);
|
|
46
|
+
const pkg = JSON.parse(raw);
|
|
47
|
+
|
|
48
|
+
// Only inject if not already there
|
|
49
|
+
if (!pkg.scripts?.['arcality'] && !pkg.scripts?.['arcality:run']) {
|
|
50
|
+
pkg.scripts = pkg.scripts || {};
|
|
51
|
+
pkg.scripts['arcality'] = 'arcality run';
|
|
52
|
+
pkg.scripts['arcality:init'] = 'arcality init';
|
|
53
|
+
pkg.scripts['arcality:run'] = 'arcality run';
|
|
54
|
+
fs.writeFileSync(userPkgPath, JSON.stringify(pkg, null, 2), 'utf8');
|
|
55
|
+
scriptsInjected = true;
|
|
56
|
+
}
|
|
57
|
+
} catch { /* silently skip if user's package.json is unreadable */ }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ── Banner ──
|
|
61
|
+
console.log('');
|
|
62
|
+
console.log(' ╔══════════════════════════════════════════════╗');
|
|
63
|
+
console.log(` ║ ARCALITY v${version.padEnd(10)} — Installed ✅ ║`);
|
|
64
|
+
console.log(' ╚══════════════════════════════════════════════╝');
|
|
65
|
+
console.log('');
|
|
66
|
+
|
|
67
|
+
if (scriptsInjected) {
|
|
68
|
+
console.log(' ⚡ Scripts added to your package.json automatically!');
|
|
69
|
+
console.log('');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log(' 📌 How to use Arcality:');
|
|
73
|
+
console.log('');
|
|
74
|
+
console.log(' npm run arcality:init → Configure this project');
|
|
75
|
+
console.log(' npm run arcality:run → Launch an autonomous test mission');
|
|
76
|
+
console.log(' npm run arcality → Open the interactive menu');
|
|
77
|
+
console.log('');
|