wormclaude 1.0.236 → 1.0.237
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-render.js +17 -1
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/clone-render.js
CHANGED
|
@@ -168,7 +168,23 @@ export async function cloneSiteRendered(startUrl, outDir, opts = {}) {
|
|
|
168
168
|
continue;
|
|
169
169
|
}
|
|
170
170
|
const bare = abs.href.replace(/#.*$/, '');
|
|
171
|
-
|
|
171
|
+
let local = assetMap.get(bare) || pageMap.get(bare);
|
|
172
|
+
// HTML'de referans EDİLEN ama network'te yakalanmayan same-origin asset'leri açıkça indir.
|
|
173
|
+
// (Örn. polyfills `nomodule` script'ini modern headless Chrome yüklemez → yakalanmaz → 404.)
|
|
174
|
+
if (!local && abs.host === host && (ASSET_EXT.test(abs.pathname) || abs.pathname.includes('/_next/'))) {
|
|
175
|
+
try {
|
|
176
|
+
const resp = await fetch(bare);
|
|
177
|
+
if (resp.ok) {
|
|
178
|
+
const buf = Buffer.from(await resp.arrayBuffer());
|
|
179
|
+
const dest = assetFile(abs, assetsDir);
|
|
180
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
181
|
+
fs.writeFileSync(dest, buf);
|
|
182
|
+
assetMap.set(bare, dest);
|
|
183
|
+
local = dest;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
catch { /* yoksay */ }
|
|
187
|
+
}
|
|
172
188
|
if (local) {
|
|
173
189
|
const rel = relHref(pg.file, local);
|
|
174
190
|
html = html.split(`"${ref}"`).join(`"${rel}"`).split(`'${ref}'`).join(`'${rel}'`);
|
package/dist/theme.js
CHANGED