feat(publish): auto-localize Leaflet CDN to platform assets
Memind CI / Test, build, and release guards (push) Failing after 3m57s
Memind CI / Test, build, and release guards (push) Failing after 3m57s
Ship Leaflet 1.9.4 under public/assets/leaflet and rewrite common CDN script/stylesheet URLs during publish and public HTML delivery, matching the existing Chart.js guard pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import crypto from 'node:crypto';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { localizeGoogleFontsCss } from './mindspace-html-localize.mjs';
|
||||
import { rewriteKnownCdnScriptSources } from './mindspace-published-script-localize.mjs';
|
||||
import { rewriteKnownCdnAssetSources } from './mindspace-published-script-localize.mjs';
|
||||
import { replacePrivateResourceReferences, scanContent } from './mindspace-content-scan.mjs';
|
||||
import { pageInternals, normalizeWorkspaceRelativePath } from './mindspace-pages.mjs';
|
||||
import { readWorkspacePublishHtml } from './mindspace-workspace-path.mjs';
|
||||
@@ -403,7 +403,7 @@ async function prepareHtmlPublishContent({
|
||||
h5Root = null,
|
||||
}) {
|
||||
let publishContent = (await localizeGoogleFontsCss(html)).html;
|
||||
publishContent = rewriteKnownCdnScriptSources(publishContent).html;
|
||||
publishContent = rewriteKnownCdnAssetSources(publishContent).html;
|
||||
publishContent = replaceImgproxyStandardImageReferences(
|
||||
publishContent,
|
||||
resolvePublicBaseUrl(),
|
||||
|
||||
Reference in New Issue
Block a user