assert(!/sourceMappingURL|\.map(?:\s|$)/i.test(bundle),"Production bundle contains a source map reference.");
assert(!/require\(["'](?:electron|(?:node:)?(?:fs|path|os|child_process))["']\)/.test(bundle),"Production bundle contains a prohibited desktop or Node import.");
assert(!/\b(?:fetch|requestUrl|XMLHttpRequest|WebSocket|sendBeacon)\s*\(/.test(bundle),"Production bundle contains a prohibited network API.");
assert(!bundle.includes(repositoryLogo),"Production bundle contains a runtime logo file path.");
assert(bundle.includes("Semantic Tree")&&bundle.includes("A hierarchy of parts, chapters and scenes inside a document."),"Production bundle is missing the bundled plugin logo.");
assert(!/https?:\/\/(?:localhost|127\.0\.0\.1|192\.168\.|10\.|172\.(?:1[6-9]|2\d|3[01])\.)/i.test(releaseText),"Release assets contain a local or private-network URL.");
assert(!releaseText.includes(process.cwd()),"Release assets contain the local build path.");
assert(bundle.includes("fflate 0.8.3 — MIT License")&&bundle.includes("Copyright (c) 2026 Arjun Barrett"),"Production bundle is missing the bundled fflate licence notice.");
assert(typeofmanifest.id==="string"&&/^[a-z]+(?:-[a-z]+)*$/.test(manifest.id)&&!manifest.id.includes("obsidian")&&!manifest.id.endsWith("plugin"),"Manifest ID is invalid.");
assert(path.basename(process.cwd())===manifest.id,`Plugin folder must match manifest ID ${manifest.id}.`);
assert(typeofmanifest.name==="string"&&/^[\x20-\x7E]+$/.test(manifest.name)&&!/obsidian|plugin/i.test(manifest.name),"Manifest name is invalid.");
assert(semverPattern.test(manifest.version)&&semverPattern.test(manifest.minAppVersion),"Manifest versions must use x.y.z semantic versions.");
assert(typeofmanifest.description==="string"&&manifest.description.trim().length>0,"Manifest description is required.");
assert(typeofmanifest.author==="string"&&manifest.author.trim().length>0,"Manifest author is required.");
if(manifest.authorUrl!==undefined)assert(/^https:\/\//.test(manifest.authorUrl),"Manifest authorUrl must use HTTPS.");
if(manifest.fundingUrl!==undefined)assert(typeofmanifest.fundingUrl==="string"&&/^https:\/\//.test(manifest.fundingUrl),"Manifest fundingUrl must use HTTPS.");
assert(typeofmanifest.isDesktopOnly==="boolean","Manifest isDesktopOnly must be a boolean.");
}
functionvalidateVersions(){
constentries=Object.entries(versions);
assert(entries.length>0,"versions.json must contain at least one minimum-version boundary.");
for(const[pluginVersion,appVersion]ofentries)assert(semverPattern.test(pluginVersion)&&typeofappVersion==="string"&&semverPattern.test(appVersion),"versions.json contains an invalid version.");