@arcadialdev/arcality 2.2.5 → 2.2.8
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/package.json +1 -1
- package/scripts/gen-and-run.mjs +14 -13
- package/scripts/init.mjs +16 -10
package/package.json
CHANGED
package/scripts/gen-and-run.mjs
CHANGED
|
@@ -309,7 +309,7 @@ function run(cmd, args, options = {}) {
|
|
|
309
309
|
|
|
310
310
|
const p = spawn(cmd, args, {
|
|
311
311
|
stdio: ["ignore", "pipe", "pipe"],
|
|
312
|
-
shell:
|
|
312
|
+
shell: false, // IMPORTANT: shell:false prevents Windows CMD from splitting paths with spaces
|
|
313
313
|
windowsHide: true,
|
|
314
314
|
env: { ...options.env || process.env, NODE_PATH: newNodePath },
|
|
315
315
|
});
|
|
@@ -711,15 +711,13 @@ async function main() {
|
|
|
711
711
|
console.log(chalk.gray(`\n>> ARCALITY_PROJECT_ID: ${finalProjectId}`));
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
-
// Always use Arcality's own Playwright to avoid version conflicts
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
: path.join(PROJECT_ROOT, 'node_modules', '.bin', 'playwright');
|
|
718
|
-
|
|
714
|
+
// Always use Arcality's own Playwright CLI to avoid version conflicts
|
|
715
|
+
// We invoke via `node cli.js` to avoid Windows shell path-with-spaces issues
|
|
716
|
+
const playwrightCli = path.join(PROJECT_ROOT, 'node_modules', 'playwright', 'cli.js');
|
|
719
717
|
const configFile = path.join(PROJECT_ROOT, 'playwright.config.ts');
|
|
720
718
|
|
|
721
719
|
try {
|
|
722
|
-
await run(
|
|
720
|
+
await run("node", [playwrightCli, "test", path.join(PROJECT_ROOT, "tests/_helpers/agentic-runner.spec.ts"), "--headed", `--config=${configFile}`], {
|
|
723
721
|
env: mergedEnv,
|
|
724
722
|
onStatus: (msg) => s.message(msg)
|
|
725
723
|
});
|
|
@@ -787,7 +785,7 @@ async function main() {
|
|
|
787
785
|
} finally {
|
|
788
786
|
const sRep = spinner();
|
|
789
787
|
sRep.start('📊 Generating report...');
|
|
790
|
-
await run("node", ["scripts/rebrand-report.mjs"]).catch(() => { });
|
|
788
|
+
await run("node", [path.join(PROJECT_ROOT, "scripts/rebrand-report.mjs")]).catch(() => { });
|
|
791
789
|
|
|
792
790
|
const reportDir = process.env.REPORTS_DIR || 'tests-report';
|
|
793
791
|
const arcalityPath = path.resolve(reportDir, 'index.html');
|
|
@@ -803,12 +801,15 @@ async function main() {
|
|
|
803
801
|
globalReportProcess = null;
|
|
804
802
|
}
|
|
805
803
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
804
|
+
if (fs.existsSync(arcalityPath)) {
|
|
805
|
+
console.log(chalk.blue(`🌐 Opening Arcality Report: ${arcalityPath}`));
|
|
806
|
+
if (process.platform === "win32") {
|
|
807
|
+
exec(`start "" "${arcalityPath}"`);
|
|
808
|
+
} else {
|
|
809
|
+
exec(`open "${arcalityPath}"`);
|
|
810
|
+
}
|
|
810
811
|
} else {
|
|
811
|
-
|
|
812
|
+
console.log(chalk.yellow(`⚠️ Report not generated (test may have crashed before completing).`));
|
|
812
813
|
}
|
|
813
814
|
|
|
814
815
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
package/scripts/init.mjs
CHANGED
|
@@ -235,18 +235,24 @@ async function main() {
|
|
|
235
235
|
|
|
236
236
|
if (!res.ok) {
|
|
237
237
|
const errText = await res.text().catch(() => '');
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
// If response is HTML (e.g. Cloudflare 521), show a clean message
|
|
239
|
+
const isHtml = errText.trim().startsWith('<');
|
|
240
|
+
const displayError = isHtml
|
|
241
|
+
? `The Arcality backend server is temporarily unavailable (HTTP ${res.status}). The project will be saved locally only.`
|
|
242
|
+
: `HTTP ${res.status}: ${errText.slice(0, 200)}`;
|
|
243
|
+
|
|
244
|
+
sCreate.stop(chalk.yellow(`⚠️ ${displayError}`));
|
|
245
|
+
// Don't exit — write the config with a local-only project ID so user can still run
|
|
246
|
+
projectId = projectId || `local_${Date.now()}`;
|
|
247
|
+
} else {
|
|
248
|
+
const created = await res.json();
|
|
249
|
+
projectId = created.id || created.Id;
|
|
250
|
+
organizationId = organizationId || created.organizationId || created.organization_id || null;
|
|
251
|
+
sCreate.stop(chalk.green(`✅ Project created: "${projectName.trim()}" (${projectId})`));
|
|
240
252
|
}
|
|
241
|
-
|
|
242
|
-
const created = await res.json();
|
|
243
|
-
projectId = created.id || created.Id;
|
|
244
|
-
organizationId = organizationId || created.organizationId || created.organization_id || null;
|
|
245
|
-
|
|
246
|
-
sCreate.stop(chalk.green(`✅ Project created: "${projectName.trim()}" (${projectId})`));
|
|
247
253
|
} catch (err) {
|
|
248
|
-
sCreate.stop(chalk.
|
|
249
|
-
|
|
254
|
+
sCreate.stop(chalk.yellow(`⚠️ Could not reach Arcality server: ${err.message}. Continuing in local mode.`));
|
|
255
|
+
projectId = projectId || `local_${Date.now()}`;
|
|
250
256
|
}
|
|
251
257
|
|
|
252
258
|
// ── Step 6: Write arcality.config ──
|