wormclaude 1.0.214 → 1.0.215

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/clone.js CHANGED
@@ -4,7 +4,11 @@
4
4
  // wget --mirror / HTTrack mantığı, aynı-host, sayfa limitli. Bağımlılık yok (regex tabanlı).
5
5
  import fs from 'node:fs';
6
6
  import path from 'node:path';
7
- const UA = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36' };
7
+ const UA = {
8
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36',
9
+ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
10
+ 'Accept-Language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
11
+ };
8
12
  const ASSET_EXT = /\.(css|js|mjs|png|jpe?g|gif|webp|avif|svg|ico|bmp|woff2?|ttf|eot|otf|mp4|webm|ogg|mp3|wav|pdf|json|xml|map)(\?.*)?$/i;
9
13
  const PAGE_EXT = /\.(html?|php|aspx?|jsp|cfm)(\?.*)?$/i;
10
14
  function san(s) { return s.replace(/(\?|%3F|#|%23).*$/i, '').replace(/[^a-zA-Z0-9._/-]/g, '_'); }
package/dist/theme.js CHANGED
@@ -16,4 +16,4 @@ export const theme = {
16
16
  synType: '#a78bfa', // tip/sınıf adları, sabitler
17
17
  synProp: '#e0e0e0', // özellik/anahtar adları
18
18
  };
19
- export const VERSION = '1.0.214';
19
+ export const VERSION = '1.0.215';
package/dist/tools.js CHANGED
@@ -1773,6 +1773,14 @@ export async function executeTool(name, args) {
1773
1773
  const maxPages = Number(args.max_pages) || 30;
1774
1774
  try {
1775
1775
  const r = await cloneSite(url, outDir, { maxPages });
1776
+ if (r.pages === 0) {
1777
+ // BAŞARISIZ — model bunu "başarılı" sanıp uydurmasın (gerçek hata + neden)
1778
+ const why = r.errors.length ? r.errors.slice(0, 3).join(' | ') : 'sayfa çekilemedi';
1779
+ return { ok: false, output: `❌ KLONLANAMADI — 0 sayfa indirildi (hiçbir şey kaydedilmedi). Sebep: ${why}.\n` +
1780
+ `Bu site büyük olasılıkla Cloudflare / bot-koruması / JS-challenge arkasında (403/503/blok) ` +
1781
+ `ya da içerik tamamen JavaScript ile yükleniyor (SPA). Basit fetch ile klonlanamaz — ` +
1782
+ `headless tarayıcı (render) gerekir. KULLANICIYA DÜRÜST SÖYLE: klon OLUŞMADI, "indirildi" DEME.` };
1783
+ }
1776
1784
  const lines = [
1777
1785
  `✓ Klon tamam: ${r.pages} sayfa + ${r.assets} asset indirildi → ${r.outDir}`,
1778
1786
  `Aç: ${path.join(r.outDir, 'index.html')} (tarayıcıda offline açılır, asset yolları yerele düzeltildi)`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.214",
3
+ "version": "1.0.215",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {