nothumanallowed 14.6.0 → 15.0.1
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/src/constants.mjs +1 -1
- package/src/server/routes/webcraft.mjs +18 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '
|
|
8
|
+
export const VERSION = '15.0.1';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -1936,10 +1936,9 @@ export function register(router) {
|
|
|
1936
1936
|
_tscChecked = true;
|
|
1937
1937
|
// Our own bundled tsc (from package dependency)
|
|
1938
1938
|
const __dir = path.dirname(fileURLToPath(import.meta.url));
|
|
1939
|
-
const ownTsc = path.resolve(__dir, '../../node_modules/.bin/tsc');
|
|
1940
1939
|
const candidates = [
|
|
1941
|
-
ownTsc,
|
|
1942
1940
|
path.resolve(__dir, '../../../node_modules/.bin/tsc'),
|
|
1941
|
+
path.resolve(__dir, '../../../../node_modules/.bin/tsc'),
|
|
1943
1942
|
];
|
|
1944
1943
|
// Also try global
|
|
1945
1944
|
try {
|
|
@@ -1961,7 +1960,7 @@ export function register(router) {
|
|
|
1961
1960
|
|
|
1962
1961
|
try {
|
|
1963
1962
|
const { stdout, stderr } = await execAsync(
|
|
1964
|
-
`"${tsc}" --noEmit --checkJs --allowJs --target es2020 --moduleResolution
|
|
1963
|
+
`"${tsc}" --noEmit --checkJs --allowJs --target es2020 --moduleResolution bundler --skipLibCheck --ignoreConfig "${absFile}" 2>&1`,
|
|
1965
1964
|
{ cwd: projectDir, timeout: 10000 }
|
|
1966
1965
|
);
|
|
1967
1966
|
const output = stdout || stderr || '';
|
|
@@ -2569,6 +2568,7 @@ export function register(router) {
|
|
|
2569
2568
|
try {
|
|
2570
2569
|
const { projectName } = await parseBody(req);
|
|
2571
2570
|
if (!projectName) return sendError(res, 400, 'projectName required');
|
|
2571
|
+
console.log('[scan] Starting scan for:', projectName);
|
|
2572
2572
|
const dir = ProjectStore.dir(projectName);
|
|
2573
2573
|
if (!fs.existsSync(dir)) return sendJSON(res, 200, { issues: [] });
|
|
2574
2574
|
|
|
@@ -2582,8 +2582,10 @@ export function register(router) {
|
|
|
2582
2582
|
|
|
2583
2583
|
let diags = [];
|
|
2584
2584
|
if (['js', 'mjs', 'jsx', 'cjs'].includes(ext)) {
|
|
2585
|
-
|
|
2586
|
-
|
|
2585
|
+
try {
|
|
2586
|
+
const tsDiags = await lintJSWithTypeScript(dir, relPath);
|
|
2587
|
+
diags = tsDiags || lintJS(content, relPath, projectName);
|
|
2588
|
+
} catch { diags = lintJS(content, relPath, projectName); }
|
|
2587
2589
|
} else if (ext === 'json') {
|
|
2588
2590
|
try { JSON.parse(content); } catch (e) {
|
|
2589
2591
|
diags.push({ from: { line: 1, col: 0 }, severity: 'error', message: e.message });
|
|
@@ -2608,7 +2610,7 @@ export function register(router) {
|
|
|
2608
2610
|
}
|
|
2609
2611
|
|
|
2610
2612
|
sendJSON(res, 200, { issues, scanned: files.length });
|
|
2611
|
-
} catch (e) { sendError(res, 500, e.message); }
|
|
2613
|
+
} catch (e) { console.error('[scan] CRASH:', e); sendError(res, 500, e.message); }
|
|
2612
2614
|
});
|
|
2613
2615
|
|
|
2614
2616
|
// ── Syntax check ──────────────────────────────────────────────────────────
|
|
@@ -2701,6 +2703,16 @@ function _patchEntry(projectDir, entryFile, shimDir, port) {
|
|
|
2701
2703
|
` } catch(e) {}`,
|
|
2702
2704
|
` return _origEnd.apply(this, arguments);`,
|
|
2703
2705
|
`};`,
|
|
2706
|
+
`// Strip X-Frame-Options so sandbox iframe works`,
|
|
2707
|
+
`const _origSetHeader = require('http').ServerResponse.prototype.setHeader;`,
|
|
2708
|
+
`require('http').ServerResponse.prototype.setHeader = function(name, val) {`,
|
|
2709
|
+
` if (name.toLowerCase() === 'x-frame-options') return this;`,
|
|
2710
|
+
` if (name.toLowerCase() === 'content-security-policy' && typeof val === 'string' && val.includes('frame-ancestors')) {`,
|
|
2711
|
+
` val = val.replace(/frame-ancestors[^;]*(;|$)/gi, '');`,
|
|
2712
|
+
` if (!val.trim()) return this;`,
|
|
2713
|
+
` }`,
|
|
2714
|
+
` return _origSetHeader.call(this, name, val);`,
|
|
2715
|
+
`};`,
|
|
2704
2716
|
`require('${entryAbs}');`,
|
|
2705
2717
|
].join('\n');
|
|
2706
2718
|
fs.writeFileSync(launcherPath, launcher, 'utf-8');
|