@arcadialdev/arcality 2.2.3 β 2.2.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 +18 -17
- package/package.json +2 -1
- package/public/ArcalityImagen.png +0 -0
- package/public/logo-arcadial-blanco.png +0 -0
- package/public/logo.png +0 -0
- package/scripts/gen-and-run.mjs +1 -1
- package/scripts/postinstall.mjs +77 -63
- package/scripts/rebrand-report.mjs +7 -1
package/README.md
CHANGED
|
@@ -23,33 +23,34 @@
|
|
|
23
23
|
|
|
24
24
|
## π Getting Started
|
|
25
25
|
|
|
26
|
-
### 1.
|
|
27
|
-
Install the CLI tool globally or as a dev dependency via NPM:
|
|
28
|
-
```bash
|
|
29
|
-
# Using npm
|
|
30
|
-
npm install -g @arcadialdev/arcality
|
|
26
|
+
### 1. Install in your project
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
```bash
|
|
29
|
+
npm install @arcadialdev/arcality
|
|
34
30
|
```
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
> After install, Arcality **automatically adds the following scripts** to your `package.json`:
|
|
33
|
+
> ```json
|
|
34
|
+
> "arcality": "arcality run",
|
|
35
|
+
> "arcality:init": "arcality init",
|
|
36
|
+
> "arcality:run": "arcality run"
|
|
37
|
+
> ```
|
|
38
|
+
|
|
39
|
+
### 2. Initialize your project
|
|
40
|
+
Run the setup wizard at the root of your project. Arcality will auto-detect your framework and scaffold the `arcality.config.json`.
|
|
38
41
|
|
|
39
42
|
```bash
|
|
40
|
-
arcality
|
|
43
|
+
npm run arcality:init
|
|
41
44
|
```
|
|
42
|
-
*This command creates the `arcality.config.json` inside your project and connects you to the internal Arcadial AI Proxy.*
|
|
43
45
|
|
|
44
|
-
### 3.
|
|
45
|
-
Start an autonomous mission by feeding the agent a natural language prompt.
|
|
46
|
+
### 3. Run an autonomous mission
|
|
46
47
|
|
|
47
48
|
```bash
|
|
48
|
-
# Interactive
|
|
49
|
-
|
|
49
|
+
# Interactive menu
|
|
50
|
+
npm run arcality
|
|
50
51
|
|
|
51
|
-
#
|
|
52
|
-
|
|
52
|
+
# Direct mission
|
|
53
|
+
npm run arcality:run
|
|
53
54
|
```
|
|
54
55
|
|
|
55
56
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcadialdev/arcality",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "AI-powered QA testing tool β Autonomous web testing agent by Arcadial",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"src/",
|
|
19
19
|
"tests/_helpers/",
|
|
20
20
|
".agents/",
|
|
21
|
+
"public/",
|
|
21
22
|
"playwright.config.ts",
|
|
22
23
|
"README.md"
|
|
23
24
|
],
|
|
Binary file
|
|
Binary file
|
package/public/logo.png
ADDED
|
Binary file
|
package/scripts/gen-and-run.mjs
CHANGED
|
@@ -783,7 +783,7 @@ async function main() {
|
|
|
783
783
|
await run("node", ["scripts/rebrand-report.mjs"]).catch(() => { });
|
|
784
784
|
|
|
785
785
|
const reportDir = process.env.REPORTS_DIR || 'tests-report';
|
|
786
|
-
const arcalityPath = path.resolve(
|
|
786
|
+
const arcalityPath = path.resolve(reportDir, 'index.html');
|
|
787
787
|
|
|
788
788
|
if (globalReportProcess) {
|
|
789
789
|
try {
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -1,63 +1,77 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// scripts/postinstall.mjs β Post-install hook
|
|
3
|
-
//
|
|
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
|
-
//
|
|
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
|
-
|
|
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
|
-
console.log('
|
|
62
|
-
console.log('
|
|
63
|
-
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('');
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
// The tool root: always the parent of the scripts/ folder
|
|
8
|
+
const ARCALITY_ROOT = process.env.ARCALITY_ROOT || path.resolve(__dirname, '..');
|
|
3
9
|
|
|
4
10
|
async function rebrandReport() {
|
|
5
11
|
// Definir directorios objetivo: El reporte personalizado, el nativo anidado y el reporte interno
|
|
@@ -10,7 +16,7 @@ async function rebrandReport() {
|
|
|
10
16
|
'playwright-internal-report'
|
|
11
17
|
];
|
|
12
18
|
|
|
13
|
-
const logoPngPath = path.join('public', 'logo.png');
|
|
19
|
+
const logoPngPath = path.join(ARCALITY_ROOT, 'public', 'logo.png');
|
|
14
20
|
let logoBase64 = '';
|
|
15
21
|
|
|
16
22
|
// Preparar Logo Arcality
|