@rankcli/agent-runtime 0.0.26 → 0.0.28
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.
|
@@ -13,6 +13,12 @@ function headersToObject(headers) {
|
|
|
13
13
|
});
|
|
14
14
|
return obj;
|
|
15
15
|
}
|
|
16
|
+
function looksLikeHtmlFallback(body, contentType) {
|
|
17
|
+
if (contentType && /text\/html/i.test(contentType)) return true;
|
|
18
|
+
if (typeof body !== "string") return false;
|
|
19
|
+
const head = body.trimStart().slice(0, 200).toLowerCase();
|
|
20
|
+
return head.startsWith("<!doctype html") || head.startsWith("<html");
|
|
21
|
+
}
|
|
16
22
|
async function httpGet(url, config = {}) {
|
|
17
23
|
const {
|
|
18
24
|
headers = {},
|
|
@@ -745,6 +751,7 @@ function generateRecommendations(issues) {
|
|
|
745
751
|
}
|
|
746
752
|
|
|
747
753
|
export {
|
|
754
|
+
looksLikeHtmlFallback,
|
|
748
755
|
httpGet,
|
|
749
756
|
httpHead,
|
|
750
757
|
httpPost,
|
package/dist/index.d.mts
CHANGED
|
@@ -2846,6 +2846,7 @@ declare function generateGitHubActionSetup(config: WorkflowConfig): {
|
|
|
2846
2846
|
secretsDoc: string;
|
|
2847
2847
|
readmeBadge: string;
|
|
2848
2848
|
};
|
|
2849
|
+
|
|
2849
2850
|
/**
|
|
2850
2851
|
* Write GitHub Action files to project
|
|
2851
2852
|
*/
|
|
@@ -2982,6 +2983,46 @@ declare function generateEleventySEO(options: MetaFixOptions): GeneratedCode;
|
|
|
2982
2983
|
declare function generateRemixSEO(options: MetaFixOptions): GeneratedCode;
|
|
2983
2984
|
declare function getFrameworkSpecificFixExtended(framework: FrameworkInfo$1, options: MetaFixOptions): GeneratedCode;
|
|
2984
2985
|
|
|
2986
|
+
interface DeterministicFixInput {
|
|
2987
|
+
siteUrl: string;
|
|
2988
|
+
siteName: string;
|
|
2989
|
+
/** Monorepo app root, '' at the repository root. Every emitted path starts with it. */
|
|
2990
|
+
appRoot: string;
|
|
2991
|
+
/** Issue codes open on the audit; a fix is only offered for something actually reported. */
|
|
2992
|
+
issueCodes: Set<string> | string[];
|
|
2993
|
+
/** Current file contents, null when the file does not exist. */
|
|
2994
|
+
existing: {
|
|
2995
|
+
indexHtml?: string | null;
|
|
2996
|
+
robotsTxt?: string | null;
|
|
2997
|
+
sitemapXml?: string | null;
|
|
2998
|
+
llmsTxt?: string | null;
|
|
2999
|
+
};
|
|
3000
|
+
/** URLs the audit saw, for the sitemap. The site URL alone is a valid sitemap. */
|
|
3001
|
+
pages?: string[];
|
|
3002
|
+
/** Meta description already on the page, if any. Never invented when absent. */
|
|
3003
|
+
description?: string | null;
|
|
3004
|
+
}
|
|
3005
|
+
interface DeterministicFile {
|
|
3006
|
+
path: string;
|
|
3007
|
+
content: string;
|
|
3008
|
+
message: string;
|
|
3009
|
+
/** 'created' for a new file, 'edited' for an insertion into an existing one. */
|
|
3010
|
+
action: 'created' | 'edited';
|
|
3011
|
+
}
|
|
3012
|
+
interface DeterministicFixes {
|
|
3013
|
+
files: DeterministicFile[];
|
|
3014
|
+
/** Issue codes these files address, for the PR body and issue bookkeeping. */
|
|
3015
|
+
addressed: string[];
|
|
3016
|
+
summary: string;
|
|
3017
|
+
}
|
|
3018
|
+
declare function buildDeterministicFixes(input: DeterministicFixInput): DeterministicFixes;
|
|
3019
|
+
|
|
3020
|
+
/**
|
|
3021
|
+
* @param files every path in the repository, as returned by the git tree API
|
|
3022
|
+
* @returns the app root with a trailing slash, or '' for the repository root
|
|
3023
|
+
*/
|
|
3024
|
+
declare function findAppRoot(files: string[]): string;
|
|
3025
|
+
|
|
2985
3026
|
/**
|
|
2986
3027
|
* World-Class JSON-LD Schema Generators
|
|
2987
3028
|
*
|
|
@@ -5542,4 +5583,4 @@ declare namespace index {
|
|
|
5542
5583
|
export { type index_Framework as Framework, type index_FrameworkCheck as FrameworkCheck, type index_FrameworkInfo as FrameworkInfo, type index_FrameworkRecipe as FrameworkRecipe, index_SUPPORTED_FRAMEWORKS as SUPPORTED_FRAMEWORKS, index_detectFramework as detectFramework, index_detectFromHeaders as detectFromHeaders, index_detectFromHtml as detectFromHtml, index_detectFromPackageJson as detectFromPackageJson, index_embedRecipe as embedRecipe, index_getFrameworkChecks as getFrameworkChecks, index_getFrameworkDisplayName as getFrameworkDisplayName, index_getFrameworkIssues as getFrameworkIssues, index_getFrameworkSuggestions as getFrameworkSuggestions, index_getFrameworkSummary as getFrameworkSummary, index_getMigrationPaths as getMigrationPaths, index_getPerformanceTips as getPerformanceTips, index_getSeoChallenges as getSeoChallenges, index_getTotalFrameworkChecks as getTotalFrameworkChecks, index_loadRecipe as loadRecipe };
|
|
5543
5584
|
}
|
|
5544
5585
|
|
|
5545
|
-
export { type AIContentConfig, type AIKeywordResearchOptions, type AgentDefinition, type AgentTool, type AlertChannel, type AlertConfig, type AlertMessage, type AlertResult, type AlertSeverity, type AlertType, type AuditAlertPayload, type AuditIssue, type AuditIssueData, type AuditOptions, type AuditPRResult, type AuditReport, type AuditReportData, type AuditRunnerOptions, type AuditRunnerResult, type AuditSchedule, type BlogPostConfig, type BrandConfig, type CIAction, type CIKeywordOptions, type CIKeywordResult, COMMIT_TYPES, type ChangelogConfig, type ChangelogResult, type CitationCheckOptions, type CommitConfig, type ComparisonConfig, type ComparisonRow, type CompetitiveInsight, type CompetitiveSearchOptions, type CompetitiveSearchResult, type CompetitorComparison, type CompetitorKeywordResult, type CompetitorOverlap, type CompetitorTool, type CompetitorUrl, type ContentElements, type ContentGeneratorOptions, type ContentRecommendation, type ConventionalCommit, type CrawlResult, type CrawlStats, type CrawledPage, type CreateAuditPROptions, type CreatePROptions, type DataForSEOCredentials, type DiscoveredPage, type EnhancedToolIdea, type ExecOptions, type ExecuteOptions, type ExecutionResult, type FAQItem, type FAQSchemaOptions, type FeaturedSnippetAnalysis, type Fix, type FixFile, type FixGeneratorOptions, type FixResult, type FrameworkInfo$1 as FrameworkInfo, type FreeKeywordResult, type FreeToolIdea, type GA4Config, type GEOAlert, type GEOAlertType, type GEOHistory, type GEOHistoryOptions, type GEOQuery, type GEOReport, type GEOResult, type GEOTrend, type GSCConfig, type GSCCredentials, type GSCPerformanceData, type GSCQueryData, type GSCQueryResult, type GeneratedCode, type GeneratedContent, type GeneratedFix, type HeadingStructure, type HeadlineAnalysis, type HealthScore, ISSUE_DEFINITIONS, type ImageInfo$2 as ImageInfo, type InjectionResult, type IntentAnalysis, type IssueCategory, type IssueDefinition, type IssueSeverity, type KeyFact, type KeyFactsOptions, type KeywordAction, type KeywordCluster, type KeywordData, type KeywordDensityAnalysis, type KeywordLLM, type KeywordOpportunity, type KeywordRecommendation, type KeywordResearchOptions, type KeywordResearchResult, type KeywordStats, type KeywordTopic, type KeywordTrend, type LLMCitationResult, type LLMJudgeOptions, type LLMProvider, LOCATION_CODES, type LSIKeyword, type LinkInfo$1 as LinkInfo, type Mention, type MentionType, type MetaData, type MetaFixOptions, type NGram, type NLPAnalysisResult, OG_IMAGE_SPECS, type OptimizeOptions, type PRConfig, type PRDescription, PRIORITY_WEIGHTS, type PRResult, type PageAudit, type PageData, type PageMeta, type PaidKeywordResult, type ParsedResponse, type PlanTier, type ProviderStats, type QuickWin, type RankCheckOptions, type RankCheckResult, type RankHistory, RankTracker, type RankingResult, type RankingTierLimits, type ReadabilityResult, type ReadmeConfig, type ReadmeResult, type ReportBranding, type ReportConfig, type ReportData, type ReportPageData, type RouteInfo, type SEOAnalysisResult, type SEOFixCommit, type SEOFixSummary, type SEOIssue, type SEORecommendation, type SEOScore, SEO_SCOPES, SITE_PROFILE_QUESTIONS, type ScheduledAuditConfig, type ScheduledAuditResult, type SchemaData, Schemas, type SearchIntent, type Sentiment, type SerpApiConfig, SerpClient, type SerpClientConfig, type SerpFeature, type SiteCrawlResult, type SiteProfile, type SiteSummary, type SnippetRecommendation, type SnippetType, type SocialMetaConfig, type SocialMetaFix, type SummarizerOptions, type TFIDFResult, TIER_LIMITS, type ToolFeasibilityScore, type ToolFunction, type ToolResult, type TopicClusterResult, type TopicModel, type TrackedKeyword, type TrackerConfig, type TrackingOptions, type TrendDirection, type UncertaintyAssessment, type WizardQuestion, type WizardResponse, type WizardResult, type WizardSession, type WorkflowConfig, addTrackingResult, analyzeAnchorText, analyzeCanonicalAdvanced, analyzeClientRendering, analyzeContentFreshness, analyzeDOMStructure, analyzeFeaturedSnippetPotential, analyzeHeadings, analyzeHeadline, analyzeHreflang, analyzeImages$1 as analyzeImages, analyzeKeywordDensity, analyzeKeywords, analyzeLinks, analyzeLocalSEO, analyzeMobile, analyzeModernImages, analyzeOnPage, analyzePagination, analyzePerformance, analyzeReadability, analyzeRedirectChain, analyzeRedirects, analyzeResponsiveImages, analyzeSERPPreview, analyzeSecurity, analyzeSecurityHeaders$1 as analyzeSecurityHeaders, analyzeSocialMeta, analyzeStructuredData$1 as analyzeStructuredData, analyzeTrackerBloat, analyzeUrl, analyzeUrlSafety, index$1 as analyzers, applyFixes, buildGSCApiRequest, buildGSCRequest, calculateAIVisibilityScore, calculateBM25, calculateTFIDF$1 as calculateKeywordTFIDF, calculateNextRun, calculateTFIDF, checkAIBotBlocking, checkAMP, checkAdsTxt, checkAppleTouchIcon, checkBalance, checkCertificate, checkDMARC, checkGitHubCLI, checkInternalRedirects, checkJSRenderingRatio, checkLLMCitations, checkLlmsTxt, checkMobileResources, checkPlaintextEmails, checkRedirects, checkRobots, checkRobotsTxt, checkSPF, checkSitemap, classifyIntent, classifyIntents, clusterKeywordsByEmbedding, compareCompetitorVisibility, comparePeriods, completeWizard, crawlSite, crawlUrl, createAuditPR, createFallbackSummary, createGEOHistory, createPullRequest, createSEOCommit, createSEOCommits, detectDuplicates, detectFramework$1 as detectFramework, detectGitHubPages, detectMentions, detectSoft404, detectTechnologies, detectVisibilityChanges, discoverCompetitorKeywords, discoverPagesFromLinks, discoverRoutesFromRepo, enhanceSummaryWithCompetitors, enhanceToolIdea, enrichKeywordsWithEstimates, ensureGitRepo, evaluateAndEnhanceToolIdeas, evaluateToolFeasibility, executeAgent, extractContentHash, extractEntityPhrases, extractImages, extractKeyPhrases, extractLinks, extractMeta, extractNgrams, extractSchema, extractSeedKeywords, extractTopics, fetchCoreWebVitals, findAlmostPage1Keywords, findCTROpportunities, findHtmlEntry, findLSIKeywords, findPageFiles, findTopPerformers, formatAlertMessage, formatCIResult, formatCompetitorReport, formatConventionalCommit, formatFeaturedSnippetReport, formatHeadlineReport, formatIntentReport, formatKeywordDensityReport, formatKeywordReport, formatPRBody, formatPRTitle, formatReadabilityReport, formatReport, formatSEOCommitMessage, formatTopicReport, formatWizardProgress, index as frameworks, generateAICitableContent, generateAllFixes, generateAngularSEOService, generateAspNetCoreSEO, generateAstroBaseHead, generateAstroMeta, generateBlogPost, generateBranchName, generateChangelog, generateCommitSummary, generateComparisonTable, generateCompleteSocialMetaSetup, generateDjangoSEOHelper, generateDuplicateIssues, generateEleventySEO, generateFAQSchema, generateFixes, generateGA4EnvTemplate, generateGA4ReactComponent, generateGA4Script, generateGA4ViteScript, generateGEOReport, generateGSCVerificationTag, generateGitHubActionSetup, generateGoSEO, generateHTMLReport, generateHTMLSocialMeta, generateHTMXSEO, generateHeadlineVariations, generateHugoSEO, generateJekyllSEO, generateJsonReport, generateKeyFacts, generateLaravelSEOHelper, generateMarkdownReport, generateNextAppMetadata, generateNextJsAppRouterMetadata, generateNextJsPagesRouterHead, generateNextPagesHead, generateNuxtSEOHead, generatePDFReport, generatePRDescription, generatePhoenixSEO, generateRailsSEOHelper, generateReactHelmetSocialMeta, generateReactSEOHead, generateRecommendationQueries, generateRemixMeta, generateRemixSEO, generateSecretsDoc, generateSocialMetaFix, generateSpringBootSEO, generateSvelteKitMeta, generateSvelteKitSEOHead, generateUncertaintyQuestions, generateVueSEOHead, generateWizardQuestions, generateWorkflow, getAIVisibilitySummary, getAutocompleteSuggestions, getDateRange, getExpandedSuggestions, getFrameworkSpecificFix, getFrameworkSpecificFixExtended, getGSCSetupInstructions, getGitUser, getKeywordData, getKeywordSuggestions, getMaxKdThreshold, getNextQuestion, getRelatedKeywords, getVisibilityTrend, groupKeywordsByTopic, identifyQuickWins, injectGA4, injectGSCVerification, interpolatePrompt, isGitRepo, keywordLLM, listFiles, loadAgent, loadAgentByName, mergePages, openAIKeywordLLM, optimizeForAI, optimizeReadme, parseGEOResponse, parseGSCResponse, parseJsonReply, parseSitemap, prioritizeKeywords, processWizardResponse, readFile, routesToUrls, runAIKeywordResearch, runAIReadinessChecks, runAdditionalChecks, runAuditWithFixes, runCIKeywordResearch, runCrawlabilityChecks, runDirectAnalysis, runFullAudit, runKeywordResearch, runNLPAnalysis, runScheduledAudit, scoreContentSEO, scoreMention, searchCompetitors, searchFormatConverters, searchHackerNews, sendAlert, sendAlerts, sendDiscordAlert, sendSlackAlert, shouldRunAudit, shouldSendAlert, startWizardSession, suggestSchemaTypes, summarizeSite, tokenize, tools, trackLLMVisibility, transformGSCData, urlSafetyDatabase, wizardResponsesToContext, writeFile, writeGitHubActionFiles };
|
|
5586
|
+
export { type AIContentConfig, type AIKeywordResearchOptions, type AgentDefinition, type AgentTool, type AlertChannel, type AlertConfig, type AlertMessage, type AlertResult, type AlertSeverity, type AlertType, type AuditAlertPayload, type AuditIssue, type AuditIssueData, type AuditOptions, type AuditPRResult, type AuditReport, type AuditReportData, type AuditRunnerOptions, type AuditRunnerResult, type AuditSchedule, type BlogPostConfig, type BrandConfig, type CIAction, type CIKeywordOptions, type CIKeywordResult, COMMIT_TYPES, type ChangelogConfig, type ChangelogResult, type CitationCheckOptions, type CommitConfig, type ComparisonConfig, type ComparisonRow, type CompetitiveInsight, type CompetitiveSearchOptions, type CompetitiveSearchResult, type CompetitorComparison, type CompetitorKeywordResult, type CompetitorOverlap, type CompetitorTool, type CompetitorUrl, type ContentElements, type ContentGeneratorOptions, type ContentRecommendation, type ConventionalCommit, type CrawlResult, type CrawlStats, type CrawledPage, type CreateAuditPROptions, type CreatePROptions, type DataForSEOCredentials, type DeterministicFixInput, type DeterministicFixes, type DiscoveredPage, type EnhancedToolIdea, type ExecOptions, type ExecuteOptions, type ExecutionResult, type FAQItem, type FAQSchemaOptions, type FeaturedSnippetAnalysis, type Fix, type FixFile, type FixGeneratorOptions, type FixResult, type FrameworkInfo$1 as FrameworkInfo, type FreeKeywordResult, type FreeToolIdea, type GA4Config, type GEOAlert, type GEOAlertType, type GEOHistory, type GEOHistoryOptions, type GEOQuery, type GEOReport, type GEOResult, type GEOTrend, type GSCConfig, type GSCCredentials, type GSCPerformanceData, type GSCQueryData, type GSCQueryResult, type GeneratedCode, type GeneratedContent, type GeneratedFix, type HeadingStructure, type HeadlineAnalysis, type HealthScore, ISSUE_DEFINITIONS, type ImageInfo$2 as ImageInfo, type InjectionResult, type IntentAnalysis, type IssueCategory, type IssueDefinition, type IssueSeverity, type KeyFact, type KeyFactsOptions, type KeywordAction, type KeywordCluster, type KeywordData, type KeywordDensityAnalysis, type KeywordLLM, type KeywordOpportunity, type KeywordRecommendation, type KeywordResearchOptions, type KeywordResearchResult, type KeywordStats, type KeywordTopic, type KeywordTrend, type LLMCitationResult, type LLMJudgeOptions, type LLMProvider, LOCATION_CODES, type LSIKeyword, type LinkInfo$1 as LinkInfo, type Mention, type MentionType, type MetaData, type MetaFixOptions, type NGram, type NLPAnalysisResult, OG_IMAGE_SPECS, type OptimizeOptions, type PRConfig, type PRDescription, PRIORITY_WEIGHTS, type PRResult, type PageAudit, type PageData, type PageMeta, type PaidKeywordResult, type ParsedResponse, type PlanTier, type ProviderStats, type QuickWin, type RankCheckOptions, type RankCheckResult, type RankHistory, RankTracker, type RankingResult, type RankingTierLimits, type ReadabilityResult, type ReadmeConfig, type ReadmeResult, type ReportBranding, type ReportConfig, type ReportData, type ReportPageData, type RouteInfo, type SEOAnalysisResult, type SEOFixCommit, type SEOFixSummary, type SEOIssue, type SEORecommendation, type SEOScore, SEO_SCOPES, SITE_PROFILE_QUESTIONS, type ScheduledAuditConfig, type ScheduledAuditResult, type SchemaData, Schemas, type SearchIntent, type Sentiment, type SerpApiConfig, SerpClient, type SerpClientConfig, type SerpFeature, type SiteCrawlResult, type SiteProfile, type SiteSummary, type SnippetRecommendation, type SnippetType, type SocialMetaConfig, type SocialMetaFix, type SummarizerOptions, type TFIDFResult, TIER_LIMITS, type ToolFeasibilityScore, type ToolFunction, type ToolResult, type TopicClusterResult, type TopicModel, type TrackedKeyword, type TrackerConfig, type TrackingOptions, type TrendDirection, type UncertaintyAssessment, type WizardQuestion, type WizardResponse, type WizardResult, type WizardSession, type WorkflowConfig, addTrackingResult, analyzeAnchorText, analyzeCanonicalAdvanced, analyzeClientRendering, analyzeContentFreshness, analyzeDOMStructure, analyzeFeaturedSnippetPotential, analyzeHeadings, analyzeHeadline, analyzeHreflang, analyzeImages$1 as analyzeImages, analyzeKeywordDensity, analyzeKeywords, analyzeLinks, analyzeLocalSEO, analyzeMobile, analyzeModernImages, analyzeOnPage, analyzePagination, analyzePerformance, analyzeReadability, analyzeRedirectChain, analyzeRedirects, analyzeResponsiveImages, analyzeSERPPreview, analyzeSecurity, analyzeSecurityHeaders$1 as analyzeSecurityHeaders, analyzeSocialMeta, analyzeStructuredData$1 as analyzeStructuredData, analyzeTrackerBloat, analyzeUrl, analyzeUrlSafety, index$1 as analyzers, applyFixes, buildDeterministicFixes, buildGSCApiRequest, buildGSCRequest, calculateAIVisibilityScore, calculateBM25, calculateTFIDF$1 as calculateKeywordTFIDF, calculateNextRun, calculateTFIDF, checkAIBotBlocking, checkAMP, checkAdsTxt, checkAppleTouchIcon, checkBalance, checkCertificate, checkDMARC, checkGitHubCLI, checkInternalRedirects, checkJSRenderingRatio, checkLLMCitations, checkLlmsTxt, checkMobileResources, checkPlaintextEmails, checkRedirects, checkRobots, checkRobotsTxt, checkSPF, checkSitemap, classifyIntent, classifyIntents, clusterKeywordsByEmbedding, compareCompetitorVisibility, comparePeriods, completeWizard, crawlSite, crawlUrl, createAuditPR, createFallbackSummary, createGEOHistory, createPullRequest, createSEOCommit, createSEOCommits, detectDuplicates, detectFramework$1 as detectFramework, detectGitHubPages, detectMentions, detectSoft404, detectTechnologies, detectVisibilityChanges, discoverCompetitorKeywords, discoverPagesFromLinks, discoverRoutesFromRepo, enhanceSummaryWithCompetitors, enhanceToolIdea, enrichKeywordsWithEstimates, ensureGitRepo, evaluateAndEnhanceToolIdeas, evaluateToolFeasibility, executeAgent, extractContentHash, extractEntityPhrases, extractImages, extractKeyPhrases, extractLinks, extractMeta, extractNgrams, extractSchema, extractSeedKeywords, extractTopics, fetchCoreWebVitals, findAlmostPage1Keywords, findAppRoot, findCTROpportunities, findHtmlEntry, findLSIKeywords, findPageFiles, findTopPerformers, formatAlertMessage, formatCIResult, formatCompetitorReport, formatConventionalCommit, formatFeaturedSnippetReport, formatHeadlineReport, formatIntentReport, formatKeywordDensityReport, formatKeywordReport, formatPRBody, formatPRTitle, formatReadabilityReport, formatReport, formatSEOCommitMessage, formatTopicReport, formatWizardProgress, index as frameworks, generateAICitableContent, generateAllFixes, generateAngularSEOService, generateAspNetCoreSEO, generateAstroBaseHead, generateAstroMeta, generateBlogPost, generateBranchName, generateChangelog, generateCommitSummary, generateComparisonTable, generateCompleteSocialMetaSetup, generateDjangoSEOHelper, generateDuplicateIssues, generateEleventySEO, generateFAQSchema, generateFixes, generateGA4EnvTemplate, generateGA4ReactComponent, generateGA4Script, generateGA4ViteScript, generateGEOReport, generateGSCVerificationTag, generateGitHubActionSetup, generateGoSEO, generateHTMLReport, generateHTMLSocialMeta, generateHTMXSEO, generateHeadlineVariations, generateHugoSEO, generateJekyllSEO, generateJsonReport, generateKeyFacts, generateLaravelSEOHelper, generateMarkdownReport, generateNextAppMetadata, generateNextJsAppRouterMetadata, generateNextJsPagesRouterHead, generateNextPagesHead, generateNuxtSEOHead, generatePDFReport, generatePRDescription, generatePhoenixSEO, generateRailsSEOHelper, generateReactHelmetSocialMeta, generateReactSEOHead, generateRecommendationQueries, generateRemixMeta, generateRemixSEO, generateSecretsDoc, generateSocialMetaFix, generateSpringBootSEO, generateSvelteKitMeta, generateSvelteKitSEOHead, generateUncertaintyQuestions, generateVueSEOHead, generateWizardQuestions, generateWorkflow, getAIVisibilitySummary, getAutocompleteSuggestions, getDateRange, getExpandedSuggestions, getFrameworkSpecificFix, getFrameworkSpecificFixExtended, getGSCSetupInstructions, getGitUser, getKeywordData, getKeywordSuggestions, getMaxKdThreshold, getNextQuestion, getRelatedKeywords, getVisibilityTrend, groupKeywordsByTopic, identifyQuickWins, injectGA4, injectGSCVerification, interpolatePrompt, isGitRepo, keywordLLM, listFiles, loadAgent, loadAgentByName, mergePages, openAIKeywordLLM, optimizeForAI, optimizeReadme, parseGEOResponse, parseGSCResponse, parseJsonReply, parseSitemap, prioritizeKeywords, processWizardResponse, readFile, routesToUrls, runAIKeywordResearch, runAIReadinessChecks, runAdditionalChecks, runAuditWithFixes, runCIKeywordResearch, runCrawlabilityChecks, runDirectAnalysis, runFullAudit, runKeywordResearch, runNLPAnalysis, runScheduledAudit, scoreContentSEO, scoreMention, searchCompetitors, searchFormatConverters, searchHackerNews, sendAlert, sendAlerts, sendDiscordAlert, sendSlackAlert, shouldRunAudit, shouldSendAlert, startWizardSession, suggestSchemaTypes, summarizeSite, tokenize, tools, trackLLMVisibility, transformGSCData, urlSafetyDatabase, wizardResponsesToContext, writeFile, writeGitHubActionFiles };
|
package/dist/index.d.ts
CHANGED
|
@@ -2846,6 +2846,7 @@ declare function generateGitHubActionSetup(config: WorkflowConfig): {
|
|
|
2846
2846
|
secretsDoc: string;
|
|
2847
2847
|
readmeBadge: string;
|
|
2848
2848
|
};
|
|
2849
|
+
|
|
2849
2850
|
/**
|
|
2850
2851
|
* Write GitHub Action files to project
|
|
2851
2852
|
*/
|
|
@@ -2982,6 +2983,46 @@ declare function generateEleventySEO(options: MetaFixOptions): GeneratedCode;
|
|
|
2982
2983
|
declare function generateRemixSEO(options: MetaFixOptions): GeneratedCode;
|
|
2983
2984
|
declare function getFrameworkSpecificFixExtended(framework: FrameworkInfo$1, options: MetaFixOptions): GeneratedCode;
|
|
2984
2985
|
|
|
2986
|
+
interface DeterministicFixInput {
|
|
2987
|
+
siteUrl: string;
|
|
2988
|
+
siteName: string;
|
|
2989
|
+
/** Monorepo app root, '' at the repository root. Every emitted path starts with it. */
|
|
2990
|
+
appRoot: string;
|
|
2991
|
+
/** Issue codes open on the audit; a fix is only offered for something actually reported. */
|
|
2992
|
+
issueCodes: Set<string> | string[];
|
|
2993
|
+
/** Current file contents, null when the file does not exist. */
|
|
2994
|
+
existing: {
|
|
2995
|
+
indexHtml?: string | null;
|
|
2996
|
+
robotsTxt?: string | null;
|
|
2997
|
+
sitemapXml?: string | null;
|
|
2998
|
+
llmsTxt?: string | null;
|
|
2999
|
+
};
|
|
3000
|
+
/** URLs the audit saw, for the sitemap. The site URL alone is a valid sitemap. */
|
|
3001
|
+
pages?: string[];
|
|
3002
|
+
/** Meta description already on the page, if any. Never invented when absent. */
|
|
3003
|
+
description?: string | null;
|
|
3004
|
+
}
|
|
3005
|
+
interface DeterministicFile {
|
|
3006
|
+
path: string;
|
|
3007
|
+
content: string;
|
|
3008
|
+
message: string;
|
|
3009
|
+
/** 'created' for a new file, 'edited' for an insertion into an existing one. */
|
|
3010
|
+
action: 'created' | 'edited';
|
|
3011
|
+
}
|
|
3012
|
+
interface DeterministicFixes {
|
|
3013
|
+
files: DeterministicFile[];
|
|
3014
|
+
/** Issue codes these files address, for the PR body and issue bookkeeping. */
|
|
3015
|
+
addressed: string[];
|
|
3016
|
+
summary: string;
|
|
3017
|
+
}
|
|
3018
|
+
declare function buildDeterministicFixes(input: DeterministicFixInput): DeterministicFixes;
|
|
3019
|
+
|
|
3020
|
+
/**
|
|
3021
|
+
* @param files every path in the repository, as returned by the git tree API
|
|
3022
|
+
* @returns the app root with a trailing slash, or '' for the repository root
|
|
3023
|
+
*/
|
|
3024
|
+
declare function findAppRoot(files: string[]): string;
|
|
3025
|
+
|
|
2985
3026
|
/**
|
|
2986
3027
|
* World-Class JSON-LD Schema Generators
|
|
2987
3028
|
*
|
|
@@ -5542,4 +5583,4 @@ declare namespace index {
|
|
|
5542
5583
|
export { type index_Framework as Framework, type index_FrameworkCheck as FrameworkCheck, type index_FrameworkInfo as FrameworkInfo, type index_FrameworkRecipe as FrameworkRecipe, index_SUPPORTED_FRAMEWORKS as SUPPORTED_FRAMEWORKS, index_detectFramework as detectFramework, index_detectFromHeaders as detectFromHeaders, index_detectFromHtml as detectFromHtml, index_detectFromPackageJson as detectFromPackageJson, index_embedRecipe as embedRecipe, index_getFrameworkChecks as getFrameworkChecks, index_getFrameworkDisplayName as getFrameworkDisplayName, index_getFrameworkIssues as getFrameworkIssues, index_getFrameworkSuggestions as getFrameworkSuggestions, index_getFrameworkSummary as getFrameworkSummary, index_getMigrationPaths as getMigrationPaths, index_getPerformanceTips as getPerformanceTips, index_getSeoChallenges as getSeoChallenges, index_getTotalFrameworkChecks as getTotalFrameworkChecks, index_loadRecipe as loadRecipe };
|
|
5543
5584
|
}
|
|
5544
5585
|
|
|
5545
|
-
export { type AIContentConfig, type AIKeywordResearchOptions, type AgentDefinition, type AgentTool, type AlertChannel, type AlertConfig, type AlertMessage, type AlertResult, type AlertSeverity, type AlertType, type AuditAlertPayload, type AuditIssue, type AuditIssueData, type AuditOptions, type AuditPRResult, type AuditReport, type AuditReportData, type AuditRunnerOptions, type AuditRunnerResult, type AuditSchedule, type BlogPostConfig, type BrandConfig, type CIAction, type CIKeywordOptions, type CIKeywordResult, COMMIT_TYPES, type ChangelogConfig, type ChangelogResult, type CitationCheckOptions, type CommitConfig, type ComparisonConfig, type ComparisonRow, type CompetitiveInsight, type CompetitiveSearchOptions, type CompetitiveSearchResult, type CompetitorComparison, type CompetitorKeywordResult, type CompetitorOverlap, type CompetitorTool, type CompetitorUrl, type ContentElements, type ContentGeneratorOptions, type ContentRecommendation, type ConventionalCommit, type CrawlResult, type CrawlStats, type CrawledPage, type CreateAuditPROptions, type CreatePROptions, type DataForSEOCredentials, type DiscoveredPage, type EnhancedToolIdea, type ExecOptions, type ExecuteOptions, type ExecutionResult, type FAQItem, type FAQSchemaOptions, type FeaturedSnippetAnalysis, type Fix, type FixFile, type FixGeneratorOptions, type FixResult, type FrameworkInfo$1 as FrameworkInfo, type FreeKeywordResult, type FreeToolIdea, type GA4Config, type GEOAlert, type GEOAlertType, type GEOHistory, type GEOHistoryOptions, type GEOQuery, type GEOReport, type GEOResult, type GEOTrend, type GSCConfig, type GSCCredentials, type GSCPerformanceData, type GSCQueryData, type GSCQueryResult, type GeneratedCode, type GeneratedContent, type GeneratedFix, type HeadingStructure, type HeadlineAnalysis, type HealthScore, ISSUE_DEFINITIONS, type ImageInfo$2 as ImageInfo, type InjectionResult, type IntentAnalysis, type IssueCategory, type IssueDefinition, type IssueSeverity, type KeyFact, type KeyFactsOptions, type KeywordAction, type KeywordCluster, type KeywordData, type KeywordDensityAnalysis, type KeywordLLM, type KeywordOpportunity, type KeywordRecommendation, type KeywordResearchOptions, type KeywordResearchResult, type KeywordStats, type KeywordTopic, type KeywordTrend, type LLMCitationResult, type LLMJudgeOptions, type LLMProvider, LOCATION_CODES, type LSIKeyword, type LinkInfo$1 as LinkInfo, type Mention, type MentionType, type MetaData, type MetaFixOptions, type NGram, type NLPAnalysisResult, OG_IMAGE_SPECS, type OptimizeOptions, type PRConfig, type PRDescription, PRIORITY_WEIGHTS, type PRResult, type PageAudit, type PageData, type PageMeta, type PaidKeywordResult, type ParsedResponse, type PlanTier, type ProviderStats, type QuickWin, type RankCheckOptions, type RankCheckResult, type RankHistory, RankTracker, type RankingResult, type RankingTierLimits, type ReadabilityResult, type ReadmeConfig, type ReadmeResult, type ReportBranding, type ReportConfig, type ReportData, type ReportPageData, type RouteInfo, type SEOAnalysisResult, type SEOFixCommit, type SEOFixSummary, type SEOIssue, type SEORecommendation, type SEOScore, SEO_SCOPES, SITE_PROFILE_QUESTIONS, type ScheduledAuditConfig, type ScheduledAuditResult, type SchemaData, Schemas, type SearchIntent, type Sentiment, type SerpApiConfig, SerpClient, type SerpClientConfig, type SerpFeature, type SiteCrawlResult, type SiteProfile, type SiteSummary, type SnippetRecommendation, type SnippetType, type SocialMetaConfig, type SocialMetaFix, type SummarizerOptions, type TFIDFResult, TIER_LIMITS, type ToolFeasibilityScore, type ToolFunction, type ToolResult, type TopicClusterResult, type TopicModel, type TrackedKeyword, type TrackerConfig, type TrackingOptions, type TrendDirection, type UncertaintyAssessment, type WizardQuestion, type WizardResponse, type WizardResult, type WizardSession, type WorkflowConfig, addTrackingResult, analyzeAnchorText, analyzeCanonicalAdvanced, analyzeClientRendering, analyzeContentFreshness, analyzeDOMStructure, analyzeFeaturedSnippetPotential, analyzeHeadings, analyzeHeadline, analyzeHreflang, analyzeImages$1 as analyzeImages, analyzeKeywordDensity, analyzeKeywords, analyzeLinks, analyzeLocalSEO, analyzeMobile, analyzeModernImages, analyzeOnPage, analyzePagination, analyzePerformance, analyzeReadability, analyzeRedirectChain, analyzeRedirects, analyzeResponsiveImages, analyzeSERPPreview, analyzeSecurity, analyzeSecurityHeaders$1 as analyzeSecurityHeaders, analyzeSocialMeta, analyzeStructuredData$1 as analyzeStructuredData, analyzeTrackerBloat, analyzeUrl, analyzeUrlSafety, index$1 as analyzers, applyFixes, buildGSCApiRequest, buildGSCRequest, calculateAIVisibilityScore, calculateBM25, calculateTFIDF$1 as calculateKeywordTFIDF, calculateNextRun, calculateTFIDF, checkAIBotBlocking, checkAMP, checkAdsTxt, checkAppleTouchIcon, checkBalance, checkCertificate, checkDMARC, checkGitHubCLI, checkInternalRedirects, checkJSRenderingRatio, checkLLMCitations, checkLlmsTxt, checkMobileResources, checkPlaintextEmails, checkRedirects, checkRobots, checkRobotsTxt, checkSPF, checkSitemap, classifyIntent, classifyIntents, clusterKeywordsByEmbedding, compareCompetitorVisibility, comparePeriods, completeWizard, crawlSite, crawlUrl, createAuditPR, createFallbackSummary, createGEOHistory, createPullRequest, createSEOCommit, createSEOCommits, detectDuplicates, detectFramework$1 as detectFramework, detectGitHubPages, detectMentions, detectSoft404, detectTechnologies, detectVisibilityChanges, discoverCompetitorKeywords, discoverPagesFromLinks, discoverRoutesFromRepo, enhanceSummaryWithCompetitors, enhanceToolIdea, enrichKeywordsWithEstimates, ensureGitRepo, evaluateAndEnhanceToolIdeas, evaluateToolFeasibility, executeAgent, extractContentHash, extractEntityPhrases, extractImages, extractKeyPhrases, extractLinks, extractMeta, extractNgrams, extractSchema, extractSeedKeywords, extractTopics, fetchCoreWebVitals, findAlmostPage1Keywords, findCTROpportunities, findHtmlEntry, findLSIKeywords, findPageFiles, findTopPerformers, formatAlertMessage, formatCIResult, formatCompetitorReport, formatConventionalCommit, formatFeaturedSnippetReport, formatHeadlineReport, formatIntentReport, formatKeywordDensityReport, formatKeywordReport, formatPRBody, formatPRTitle, formatReadabilityReport, formatReport, formatSEOCommitMessage, formatTopicReport, formatWizardProgress, index as frameworks, generateAICitableContent, generateAllFixes, generateAngularSEOService, generateAspNetCoreSEO, generateAstroBaseHead, generateAstroMeta, generateBlogPost, generateBranchName, generateChangelog, generateCommitSummary, generateComparisonTable, generateCompleteSocialMetaSetup, generateDjangoSEOHelper, generateDuplicateIssues, generateEleventySEO, generateFAQSchema, generateFixes, generateGA4EnvTemplate, generateGA4ReactComponent, generateGA4Script, generateGA4ViteScript, generateGEOReport, generateGSCVerificationTag, generateGitHubActionSetup, generateGoSEO, generateHTMLReport, generateHTMLSocialMeta, generateHTMXSEO, generateHeadlineVariations, generateHugoSEO, generateJekyllSEO, generateJsonReport, generateKeyFacts, generateLaravelSEOHelper, generateMarkdownReport, generateNextAppMetadata, generateNextJsAppRouterMetadata, generateNextJsPagesRouterHead, generateNextPagesHead, generateNuxtSEOHead, generatePDFReport, generatePRDescription, generatePhoenixSEO, generateRailsSEOHelper, generateReactHelmetSocialMeta, generateReactSEOHead, generateRecommendationQueries, generateRemixMeta, generateRemixSEO, generateSecretsDoc, generateSocialMetaFix, generateSpringBootSEO, generateSvelteKitMeta, generateSvelteKitSEOHead, generateUncertaintyQuestions, generateVueSEOHead, generateWizardQuestions, generateWorkflow, getAIVisibilitySummary, getAutocompleteSuggestions, getDateRange, getExpandedSuggestions, getFrameworkSpecificFix, getFrameworkSpecificFixExtended, getGSCSetupInstructions, getGitUser, getKeywordData, getKeywordSuggestions, getMaxKdThreshold, getNextQuestion, getRelatedKeywords, getVisibilityTrend, groupKeywordsByTopic, identifyQuickWins, injectGA4, injectGSCVerification, interpolatePrompt, isGitRepo, keywordLLM, listFiles, loadAgent, loadAgentByName, mergePages, openAIKeywordLLM, optimizeForAI, optimizeReadme, parseGEOResponse, parseGSCResponse, parseJsonReply, parseSitemap, prioritizeKeywords, processWizardResponse, readFile, routesToUrls, runAIKeywordResearch, runAIReadinessChecks, runAdditionalChecks, runAuditWithFixes, runCIKeywordResearch, runCrawlabilityChecks, runDirectAnalysis, runFullAudit, runKeywordResearch, runNLPAnalysis, runScheduledAudit, scoreContentSEO, scoreMention, searchCompetitors, searchFormatConverters, searchHackerNews, sendAlert, sendAlerts, sendDiscordAlert, sendSlackAlert, shouldRunAudit, shouldSendAlert, startWizardSession, suggestSchemaTypes, summarizeSite, tokenize, tools, trackLLMVisibility, transformGSCData, urlSafetyDatabase, wizardResponsesToContext, writeFile, writeGitHubActionFiles };
|
|
5586
|
+
export { type AIContentConfig, type AIKeywordResearchOptions, type AgentDefinition, type AgentTool, type AlertChannel, type AlertConfig, type AlertMessage, type AlertResult, type AlertSeverity, type AlertType, type AuditAlertPayload, type AuditIssue, type AuditIssueData, type AuditOptions, type AuditPRResult, type AuditReport, type AuditReportData, type AuditRunnerOptions, type AuditRunnerResult, type AuditSchedule, type BlogPostConfig, type BrandConfig, type CIAction, type CIKeywordOptions, type CIKeywordResult, COMMIT_TYPES, type ChangelogConfig, type ChangelogResult, type CitationCheckOptions, type CommitConfig, type ComparisonConfig, type ComparisonRow, type CompetitiveInsight, type CompetitiveSearchOptions, type CompetitiveSearchResult, type CompetitorComparison, type CompetitorKeywordResult, type CompetitorOverlap, type CompetitorTool, type CompetitorUrl, type ContentElements, type ContentGeneratorOptions, type ContentRecommendation, type ConventionalCommit, type CrawlResult, type CrawlStats, type CrawledPage, type CreateAuditPROptions, type CreatePROptions, type DataForSEOCredentials, type DeterministicFixInput, type DeterministicFixes, type DiscoveredPage, type EnhancedToolIdea, type ExecOptions, type ExecuteOptions, type ExecutionResult, type FAQItem, type FAQSchemaOptions, type FeaturedSnippetAnalysis, type Fix, type FixFile, type FixGeneratorOptions, type FixResult, type FrameworkInfo$1 as FrameworkInfo, type FreeKeywordResult, type FreeToolIdea, type GA4Config, type GEOAlert, type GEOAlertType, type GEOHistory, type GEOHistoryOptions, type GEOQuery, type GEOReport, type GEOResult, type GEOTrend, type GSCConfig, type GSCCredentials, type GSCPerformanceData, type GSCQueryData, type GSCQueryResult, type GeneratedCode, type GeneratedContent, type GeneratedFix, type HeadingStructure, type HeadlineAnalysis, type HealthScore, ISSUE_DEFINITIONS, type ImageInfo$2 as ImageInfo, type InjectionResult, type IntentAnalysis, type IssueCategory, type IssueDefinition, type IssueSeverity, type KeyFact, type KeyFactsOptions, type KeywordAction, type KeywordCluster, type KeywordData, type KeywordDensityAnalysis, type KeywordLLM, type KeywordOpportunity, type KeywordRecommendation, type KeywordResearchOptions, type KeywordResearchResult, type KeywordStats, type KeywordTopic, type KeywordTrend, type LLMCitationResult, type LLMJudgeOptions, type LLMProvider, LOCATION_CODES, type LSIKeyword, type LinkInfo$1 as LinkInfo, type Mention, type MentionType, type MetaData, type MetaFixOptions, type NGram, type NLPAnalysisResult, OG_IMAGE_SPECS, type OptimizeOptions, type PRConfig, type PRDescription, PRIORITY_WEIGHTS, type PRResult, type PageAudit, type PageData, type PageMeta, type PaidKeywordResult, type ParsedResponse, type PlanTier, type ProviderStats, type QuickWin, type RankCheckOptions, type RankCheckResult, type RankHistory, RankTracker, type RankingResult, type RankingTierLimits, type ReadabilityResult, type ReadmeConfig, type ReadmeResult, type ReportBranding, type ReportConfig, type ReportData, type ReportPageData, type RouteInfo, type SEOAnalysisResult, type SEOFixCommit, type SEOFixSummary, type SEOIssue, type SEORecommendation, type SEOScore, SEO_SCOPES, SITE_PROFILE_QUESTIONS, type ScheduledAuditConfig, type ScheduledAuditResult, type SchemaData, Schemas, type SearchIntent, type Sentiment, type SerpApiConfig, SerpClient, type SerpClientConfig, type SerpFeature, type SiteCrawlResult, type SiteProfile, type SiteSummary, type SnippetRecommendation, type SnippetType, type SocialMetaConfig, type SocialMetaFix, type SummarizerOptions, type TFIDFResult, TIER_LIMITS, type ToolFeasibilityScore, type ToolFunction, type ToolResult, type TopicClusterResult, type TopicModel, type TrackedKeyword, type TrackerConfig, type TrackingOptions, type TrendDirection, type UncertaintyAssessment, type WizardQuestion, type WizardResponse, type WizardResult, type WizardSession, type WorkflowConfig, addTrackingResult, analyzeAnchorText, analyzeCanonicalAdvanced, analyzeClientRendering, analyzeContentFreshness, analyzeDOMStructure, analyzeFeaturedSnippetPotential, analyzeHeadings, analyzeHeadline, analyzeHreflang, analyzeImages$1 as analyzeImages, analyzeKeywordDensity, analyzeKeywords, analyzeLinks, analyzeLocalSEO, analyzeMobile, analyzeModernImages, analyzeOnPage, analyzePagination, analyzePerformance, analyzeReadability, analyzeRedirectChain, analyzeRedirects, analyzeResponsiveImages, analyzeSERPPreview, analyzeSecurity, analyzeSecurityHeaders$1 as analyzeSecurityHeaders, analyzeSocialMeta, analyzeStructuredData$1 as analyzeStructuredData, analyzeTrackerBloat, analyzeUrl, analyzeUrlSafety, index$1 as analyzers, applyFixes, buildDeterministicFixes, buildGSCApiRequest, buildGSCRequest, calculateAIVisibilityScore, calculateBM25, calculateTFIDF$1 as calculateKeywordTFIDF, calculateNextRun, calculateTFIDF, checkAIBotBlocking, checkAMP, checkAdsTxt, checkAppleTouchIcon, checkBalance, checkCertificate, checkDMARC, checkGitHubCLI, checkInternalRedirects, checkJSRenderingRatio, checkLLMCitations, checkLlmsTxt, checkMobileResources, checkPlaintextEmails, checkRedirects, checkRobots, checkRobotsTxt, checkSPF, checkSitemap, classifyIntent, classifyIntents, clusterKeywordsByEmbedding, compareCompetitorVisibility, comparePeriods, completeWizard, crawlSite, crawlUrl, createAuditPR, createFallbackSummary, createGEOHistory, createPullRequest, createSEOCommit, createSEOCommits, detectDuplicates, detectFramework$1 as detectFramework, detectGitHubPages, detectMentions, detectSoft404, detectTechnologies, detectVisibilityChanges, discoverCompetitorKeywords, discoverPagesFromLinks, discoverRoutesFromRepo, enhanceSummaryWithCompetitors, enhanceToolIdea, enrichKeywordsWithEstimates, ensureGitRepo, evaluateAndEnhanceToolIdeas, evaluateToolFeasibility, executeAgent, extractContentHash, extractEntityPhrases, extractImages, extractKeyPhrases, extractLinks, extractMeta, extractNgrams, extractSchema, extractSeedKeywords, extractTopics, fetchCoreWebVitals, findAlmostPage1Keywords, findAppRoot, findCTROpportunities, findHtmlEntry, findLSIKeywords, findPageFiles, findTopPerformers, formatAlertMessage, formatCIResult, formatCompetitorReport, formatConventionalCommit, formatFeaturedSnippetReport, formatHeadlineReport, formatIntentReport, formatKeywordDensityReport, formatKeywordReport, formatPRBody, formatPRTitle, formatReadabilityReport, formatReport, formatSEOCommitMessage, formatTopicReport, formatWizardProgress, index as frameworks, generateAICitableContent, generateAllFixes, generateAngularSEOService, generateAspNetCoreSEO, generateAstroBaseHead, generateAstroMeta, generateBlogPost, generateBranchName, generateChangelog, generateCommitSummary, generateComparisonTable, generateCompleteSocialMetaSetup, generateDjangoSEOHelper, generateDuplicateIssues, generateEleventySEO, generateFAQSchema, generateFixes, generateGA4EnvTemplate, generateGA4ReactComponent, generateGA4Script, generateGA4ViteScript, generateGEOReport, generateGSCVerificationTag, generateGitHubActionSetup, generateGoSEO, generateHTMLReport, generateHTMLSocialMeta, generateHTMXSEO, generateHeadlineVariations, generateHugoSEO, generateJekyllSEO, generateJsonReport, generateKeyFacts, generateLaravelSEOHelper, generateMarkdownReport, generateNextAppMetadata, generateNextJsAppRouterMetadata, generateNextJsPagesRouterHead, generateNextPagesHead, generateNuxtSEOHead, generatePDFReport, generatePRDescription, generatePhoenixSEO, generateRailsSEOHelper, generateReactHelmetSocialMeta, generateReactSEOHead, generateRecommendationQueries, generateRemixMeta, generateRemixSEO, generateSecretsDoc, generateSocialMetaFix, generateSpringBootSEO, generateSvelteKitMeta, generateSvelteKitSEOHead, generateUncertaintyQuestions, generateVueSEOHead, generateWizardQuestions, generateWorkflow, getAIVisibilitySummary, getAutocompleteSuggestions, getDateRange, getExpandedSuggestions, getFrameworkSpecificFix, getFrameworkSpecificFixExtended, getGSCSetupInstructions, getGitUser, getKeywordData, getKeywordSuggestions, getMaxKdThreshold, getNextQuestion, getRelatedKeywords, getVisibilityTrend, groupKeywordsByTopic, identifyQuickWins, injectGA4, injectGSCVerification, interpolatePrompt, isGitRepo, keywordLLM, listFiles, loadAgent, loadAgentByName, mergePages, openAIKeywordLLM, optimizeForAI, optimizeReadme, parseGEOResponse, parseGSCResponse, parseJsonReply, parseSitemap, prioritizeKeywords, processWizardResponse, readFile, routesToUrls, runAIKeywordResearch, runAIReadinessChecks, runAdditionalChecks, runAuditWithFixes, runCIKeywordResearch, runCrawlabilityChecks, runDirectAnalysis, runFullAudit, runKeywordResearch, runNLPAnalysis, runScheduledAudit, scoreContentSEO, scoreMention, searchCompetitors, searchFormatConverters, searchHackerNews, sendAlert, sendAlerts, sendDiscordAlert, sendSlackAlert, shouldRunAudit, shouldSendAlert, startWizardSession, suggestSchemaTypes, summarizeSite, tokenize, tools, trackLLMVisibility, transformGSCData, urlSafetyDatabase, wizardResponsesToContext, writeFile, writeGitHubActionFiles };
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,12 @@ function headersToObject(headers) {
|
|
|
43
43
|
});
|
|
44
44
|
return obj;
|
|
45
45
|
}
|
|
46
|
+
function looksLikeHtmlFallback(body, contentType) {
|
|
47
|
+
if (contentType && /text\/html/i.test(contentType)) return true;
|
|
48
|
+
if (typeof body !== "string") return false;
|
|
49
|
+
const head = body.trimStart().slice(0, 200).toLowerCase();
|
|
50
|
+
return head.startsWith("<!doctype html") || head.startsWith("<html");
|
|
51
|
+
}
|
|
46
52
|
async function httpGet(url, config = {}) {
|
|
47
53
|
const {
|
|
48
54
|
headers = {},
|
|
@@ -535,8 +541,8 @@ async function analyzeUrl(params) {
|
|
|
535
541
|
}
|
|
536
542
|
const sitemapResult = await checkSitemap2({ url });
|
|
537
543
|
if (sitemapResult.success) {
|
|
538
|
-
const
|
|
539
|
-
if (!
|
|
544
|
+
const sitemap2 = sitemapResult.data;
|
|
545
|
+
if (!sitemap2.exists) {
|
|
540
546
|
issues.push({
|
|
541
547
|
severity: "warning",
|
|
542
548
|
category: "technical",
|
|
@@ -3346,6 +3352,7 @@ __export(index_exports, {
|
|
|
3346
3352
|
analyzeUrlSafety: () => analyzeUrlSafety,
|
|
3347
3353
|
analyzers: () => analyzers_exports,
|
|
3348
3354
|
applyFixes: () => applyFixes,
|
|
3355
|
+
buildDeterministicFixes: () => buildDeterministicFixes,
|
|
3349
3356
|
buildGSCApiRequest: () => buildGSCApiRequest,
|
|
3350
3357
|
buildGSCRequest: () => buildGSCRequest,
|
|
3351
3358
|
calculateAIVisibilityScore: () => calculateAIVisibilityScore,
|
|
@@ -3415,6 +3422,7 @@ __export(index_exports, {
|
|
|
3415
3422
|
extractTopics: () => extractTopics,
|
|
3416
3423
|
fetchCoreWebVitals: () => fetchCoreWebVitals,
|
|
3417
3424
|
findAlmostPage1Keywords: () => findAlmostPage1Keywords,
|
|
3425
|
+
findAppRoot: () => findAppRoot,
|
|
3418
3426
|
findCTROpportunities: () => findCTROpportunities,
|
|
3419
3427
|
findHtmlEntry: () => findHtmlEntry,
|
|
3420
3428
|
findLSIKeywords: () => findLSIKeywords,
|
|
@@ -8406,6 +8414,17 @@ async function checkRobotsTxt(baseUrl) {
|
|
|
8406
8414
|
};
|
|
8407
8415
|
}
|
|
8408
8416
|
const content = response.data;
|
|
8417
|
+
if (looksLikeHtmlFallback(content, response.headers?.["content-type"])) {
|
|
8418
|
+
issues.push({
|
|
8419
|
+
...ISSUE_DEFINITIONS.ROBOTS_TXT_MISSING,
|
|
8420
|
+
affectedUrls: [url],
|
|
8421
|
+
details: { servedHtml: true }
|
|
8422
|
+
});
|
|
8423
|
+
return {
|
|
8424
|
+
issues,
|
|
8425
|
+
data: { exists: false, blocksAll: false, hasSitemap: false, sitemapUrls: [] }
|
|
8426
|
+
};
|
|
8427
|
+
}
|
|
8409
8428
|
const lines = content.toLowerCase().split("\n");
|
|
8410
8429
|
let blocksAll = false;
|
|
8411
8430
|
let currentUserAgent = "";
|
|
@@ -10547,6 +10566,13 @@ async function checkLlmsTxt(baseUrl) {
|
|
|
10547
10566
|
};
|
|
10548
10567
|
}
|
|
10549
10568
|
const content = response.data;
|
|
10569
|
+
if (looksLikeHtmlFallback(content, response.headers?.["content-type"])) {
|
|
10570
|
+
issues.push({
|
|
10571
|
+
...ISSUE_DEFINITIONS.LLMS_TXT_MISSING,
|
|
10572
|
+
affectedUrls: [url]
|
|
10573
|
+
});
|
|
10574
|
+
return { issues, data: { exists: false, valid: false, errors: ["File not found (the site served HTML)"] } };
|
|
10575
|
+
}
|
|
10550
10576
|
const lines = content.split("\n").filter((line) => line.trim());
|
|
10551
10577
|
const errors = [];
|
|
10552
10578
|
let valid = true;
|
|
@@ -14983,7 +15009,7 @@ async function analyzeLlmsTxt(url) {
|
|
|
14983
15009
|
timeout: 1e4,
|
|
14984
15010
|
validateStatus: () => true
|
|
14985
15011
|
});
|
|
14986
|
-
if (response.status === 200) {
|
|
15012
|
+
if (response.status === 200 && !looksLikeHtmlFallback(response.data, response.headers?.["content-type"])) {
|
|
14987
15013
|
exists = true;
|
|
14988
15014
|
content = response.data;
|
|
14989
15015
|
contentLength = content.length;
|
|
@@ -14993,7 +15019,7 @@ async function analyzeLlmsTxt(url) {
|
|
|
14993
15019
|
timeout: 1e4,
|
|
14994
15020
|
validateStatus: () => true
|
|
14995
15021
|
});
|
|
14996
|
-
if (fullResponse.status === 200) {
|
|
15022
|
+
if (fullResponse.status === 200 && !looksLikeHtmlFallback(fullResponse.data, fullResponse.headers?.["content-type"])) {
|
|
14997
15023
|
fullVersionExists = true;
|
|
14998
15024
|
}
|
|
14999
15025
|
} catch {
|
|
@@ -25336,7 +25362,7 @@ This will open a browser for OAuth consent and save tokens locally.
|
|
|
25336
25362
|
`;
|
|
25337
25363
|
}
|
|
25338
25364
|
|
|
25339
|
-
// src/tracking/github-action.ts
|
|
25365
|
+
// src/tracking/github-action-template.ts
|
|
25340
25366
|
function generateWorkflow(config) {
|
|
25341
25367
|
const cronSchedule = getCronSchedule(config.schedule);
|
|
25342
25368
|
const sync = !!config.syncToDashboard;
|
|
@@ -25567,6 +25593,8 @@ function generateGitHubActionSetup(config) {
|
|
|
25567
25593
|
readmeBadge: `[](https://github.com/YOUR_ORG/YOUR_REPO/actions/workflows/seo.yml)`
|
|
25568
25594
|
};
|
|
25569
25595
|
}
|
|
25596
|
+
|
|
25597
|
+
// src/tracking/github-action.ts
|
|
25570
25598
|
function writeGitHubActionFiles(projectPath, config) {
|
|
25571
25599
|
const fs3 = require("fs");
|
|
25572
25600
|
const path3 = require("path");
|
|
@@ -32097,7 +32125,7 @@ Sitemap: ${url}/sitemap.xml`;
|
|
|
32097
32125
|
};
|
|
32098
32126
|
}
|
|
32099
32127
|
function generateSitemapFix(context, url) {
|
|
32100
|
-
const
|
|
32128
|
+
const sitemap2 = `<?xml version="1.0" encoding="UTF-8"?>
|
|
32101
32129
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
32102
32130
|
<url>
|
|
32103
32131
|
<loc>${url}</loc>
|
|
@@ -32109,7 +32137,7 @@ function generateSitemapFix(context, url) {
|
|
|
32109
32137
|
issue: { code: "MISSING_SITEMAP", message: "No sitemap.xml found", severity: "warning" },
|
|
32110
32138
|
file: "public/sitemap.xml",
|
|
32111
32139
|
before: null,
|
|
32112
|
-
after:
|
|
32140
|
+
after: sitemap2,
|
|
32113
32141
|
explanation: "Created sitemap.xml to help search engines discover all pages"
|
|
32114
32142
|
};
|
|
32115
32143
|
}
|
|
@@ -32206,7 +32234,7 @@ function generateLangFix(context) {
|
|
|
32206
32234
|
};
|
|
32207
32235
|
}
|
|
32208
32236
|
function generateLlmsTxtFix(context, siteName, url) {
|
|
32209
|
-
const
|
|
32237
|
+
const llmsTxt2 = `# ${siteName}
|
|
32210
32238
|
> ${siteName} - A brief description of your product/service
|
|
32211
32239
|
|
|
32212
32240
|
## About
|
|
@@ -32229,7 +32257,7 @@ ${siteName} is... [Add your description here]
|
|
|
32229
32257
|
issue: { code: "AI_NO_LLMS_TXT", message: "No llms.txt file for AI crawlers", severity: "info" },
|
|
32230
32258
|
file: "public/llms.txt",
|
|
32231
32259
|
before: null,
|
|
32232
|
-
after:
|
|
32260
|
+
after: llmsTxt2,
|
|
32233
32261
|
explanation: "Created llms.txt to help AI systems understand your site. Customize the content."
|
|
32234
32262
|
};
|
|
32235
32263
|
}
|
|
@@ -32279,6 +32307,9 @@ async function applyFixes(fixes, options) {
|
|
|
32279
32307
|
return { applied, skipped };
|
|
32280
32308
|
}
|
|
32281
32309
|
|
|
32310
|
+
// src/fixer/deterministic.ts
|
|
32311
|
+
init_geo_analyzer();
|
|
32312
|
+
|
|
32282
32313
|
// src/fixer/schemas.ts
|
|
32283
32314
|
function generateOrganizationSchema(data) {
|
|
32284
32315
|
return {
|
|
@@ -32861,6 +32892,155 @@ var Schemas = {
|
|
|
32861
32892
|
sitelinksSearchbox: generateSitelinksSearchboxSchema
|
|
32862
32893
|
};
|
|
32863
32894
|
|
|
32895
|
+
// src/fixer/deterministic.ts
|
|
32896
|
+
function xmlEscape(value) {
|
|
32897
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
32898
|
+
}
|
|
32899
|
+
function sitemap(urls) {
|
|
32900
|
+
const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
32901
|
+
const entries = urls.map(
|
|
32902
|
+
(url) => ` <url>
|
|
32903
|
+
<loc>${xmlEscape(url)}</loc>
|
|
32904
|
+
<lastmod>${today}</lastmod>
|
|
32905
|
+
</url>`
|
|
32906
|
+
).join("\n");
|
|
32907
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
32908
|
+
<!-- Generated by RankCLI - https://rankcli.dev -->
|
|
32909
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
32910
|
+
${entries}
|
|
32911
|
+
</urlset>
|
|
32912
|
+
`;
|
|
32913
|
+
}
|
|
32914
|
+
function llmsTxt(siteName, siteUrl, description, pages) {
|
|
32915
|
+
const base = siteUrl.replace(/\/$/, "");
|
|
32916
|
+
const trim = (url) => url.replace(/\/$/, "");
|
|
32917
|
+
const links = pages.filter((url) => trim(url) !== base).map((url) => ({ url, path: url.replace(base, "").replace(/^$/, "/") })).filter((page) => page.path !== "/").slice(0, 20).map((page) => `- [${page.path}](${page.url})`).join("\n");
|
|
32918
|
+
return `# ${siteName}
|
|
32919
|
+
|
|
32920
|
+
${description ? `> ${description}
|
|
32921
|
+
|
|
32922
|
+
` : ""}${base}
|
|
32923
|
+
|
|
32924
|
+
## Pages
|
|
32925
|
+
- [Home](${base}/)
|
|
32926
|
+
${links}
|
|
32927
|
+
|
|
32928
|
+
<!-- Generated by RankCLI - https://rankcli.dev -->
|
|
32929
|
+
`;
|
|
32930
|
+
}
|
|
32931
|
+
function jsonLdBlock(siteName, siteUrl, description) {
|
|
32932
|
+
const base = siteUrl.replace(/\/$/, "");
|
|
32933
|
+
const graph = [
|
|
32934
|
+
generateWebSiteSchema({ name: siteName, url: base, ...description ? { description } : {} }),
|
|
32935
|
+
generateOrganizationSchema({ name: siteName, url: base, ...description ? { description } : {} })
|
|
32936
|
+
];
|
|
32937
|
+
return ` <script type="application/ld+json">
|
|
32938
|
+
${JSON.stringify(graph, null, 2).split("\n").map((line) => ` ${line}`).join("\n")}
|
|
32939
|
+
</script>
|
|
32940
|
+
`;
|
|
32941
|
+
}
|
|
32942
|
+
var SCHEMA_CODES = [
|
|
32943
|
+
"SCHEMA_MISSING",
|
|
32944
|
+
"SCHEMA_ORG_MISSING",
|
|
32945
|
+
"ORGANIZATION_SCHEMA_MISSING",
|
|
32946
|
+
"NO_ORGANIZATION_SCHEMA",
|
|
32947
|
+
"NO_ENTITY_SCHEMA",
|
|
32948
|
+
"STRUCTURED_DATA_MISSING"
|
|
32949
|
+
];
|
|
32950
|
+
function metaDescriptionOf(html) {
|
|
32951
|
+
if (!html) return null;
|
|
32952
|
+
const match = html.match(/<meta[^>]+name=["']description["'][^>]+content=["']([^"']+)["']/i) || html.match(/<meta[^>]+content=["']([^"']+)["'][^>]+name=["']description["']/i);
|
|
32953
|
+
return match?.[1]?.trim() || null;
|
|
32954
|
+
}
|
|
32955
|
+
function buildDeterministicFixes(input) {
|
|
32956
|
+
const codes = new Set(input.issueCodes);
|
|
32957
|
+
const has = (...wanted) => wanted.some((code) => codes.has(code));
|
|
32958
|
+
const root = input.appRoot || "";
|
|
32959
|
+
const files = [];
|
|
32960
|
+
const addressed = [];
|
|
32961
|
+
const base = input.siteUrl.replace(/\/$/, "");
|
|
32962
|
+
const pages = input.pages?.length ? input.pages : [`${base}/`];
|
|
32963
|
+
const description = input.description ?? metaDescriptionOf(input.existing.indexHtml);
|
|
32964
|
+
if (has("ROBOTS_TXT_MISSING", "AI_BOTS_BLOCKED", "AI_CRAWLERS_BLOCKED") && !input.existing.robotsTxt) {
|
|
32965
|
+
files.push({
|
|
32966
|
+
path: `${root}public/robots.txt`,
|
|
32967
|
+
content: generateAIFriendlyRobotsTxt(base),
|
|
32968
|
+
message: "fix(seo): add robots.txt allowing search and AI crawlers",
|
|
32969
|
+
action: "created"
|
|
32970
|
+
});
|
|
32971
|
+
addressed.push("ROBOTS_TXT_MISSING");
|
|
32972
|
+
}
|
|
32973
|
+
if (has("SITEMAP_MISSING") && !input.existing.sitemapXml) {
|
|
32974
|
+
files.push({
|
|
32975
|
+
path: `${root}public/sitemap.xml`,
|
|
32976
|
+
content: sitemap(pages),
|
|
32977
|
+
message: "fix(seo): add sitemap.xml",
|
|
32978
|
+
action: "created"
|
|
32979
|
+
});
|
|
32980
|
+
addressed.push("SITEMAP_MISSING");
|
|
32981
|
+
}
|
|
32982
|
+
if (has("LLMS_TXT_MISSING") && !input.existing.llmsTxt) {
|
|
32983
|
+
files.push({
|
|
32984
|
+
path: `${root}public/llms.txt`,
|
|
32985
|
+
content: llmsTxt(input.siteName, base, description, pages),
|
|
32986
|
+
message: "fix(seo): add llms.txt for AI assistants",
|
|
32987
|
+
action: "created"
|
|
32988
|
+
});
|
|
32989
|
+
addressed.push("LLMS_TXT_MISSING");
|
|
32990
|
+
}
|
|
32991
|
+
const indexHtml = input.existing.indexHtml;
|
|
32992
|
+
if (has(...SCHEMA_CODES) && indexHtml && !indexHtml.includes("application/ld+json") && indexHtml.includes("</head>")) {
|
|
32993
|
+
files.push({
|
|
32994
|
+
path: `${root}index.html`,
|
|
32995
|
+
content: indexHtml.replace("</head>", `${jsonLdBlock(input.siteName, base, description)} </head>`),
|
|
32996
|
+
message: "fix(seo): add WebSite and Organization JSON-LD",
|
|
32997
|
+
action: "edited"
|
|
32998
|
+
});
|
|
32999
|
+
addressed.push(...SCHEMA_CODES.filter((code) => codes.has(code)));
|
|
33000
|
+
}
|
|
33001
|
+
const name = (file) => file.path.split("/").pop();
|
|
33002
|
+
const created = files.filter((f) => f.action === "created").map(name);
|
|
33003
|
+
const edited = files.filter((f) => f.action === "edited").map(name);
|
|
33004
|
+
const parts = [
|
|
33005
|
+
created.length ? `Added ${created.join(", ")}` : null,
|
|
33006
|
+
edited.length ? `updated ${edited.join(", ")}` : null
|
|
33007
|
+
].filter(Boolean);
|
|
33008
|
+
const summary = files.length ? `${parts.join("; ")} from RankCLI's templates - generated from the site's URL and name, with no AI and nothing invented.` : "No template-generatable issues were open on this report.";
|
|
33009
|
+
return { files, addressed, summary };
|
|
33010
|
+
}
|
|
33011
|
+
|
|
33012
|
+
// src/fixer/app-root.ts
|
|
33013
|
+
var PREFERRED_NAMES = ["web", "app", "site", "www", "frontend", "client", "ui", "saas", "marketing", "docs"];
|
|
33014
|
+
function directoryOf(path3) {
|
|
33015
|
+
const cut = path3.lastIndexOf("/");
|
|
33016
|
+
return cut === -1 ? "" : path3.slice(0, cut);
|
|
33017
|
+
}
|
|
33018
|
+
function findAppRoot(files) {
|
|
33019
|
+
const real = files.filter((f) => !f.includes("node_modules/") && !f.startsWith("."));
|
|
33020
|
+
const packageDirs = new Set(
|
|
33021
|
+
real.filter((f) => f === "package.json" || f.endsWith("/package.json")).map(directoryOf)
|
|
33022
|
+
);
|
|
33023
|
+
const candidates = real.filter((f) => f === "index.html" || f.endsWith("/index.html")).map(directoryOf).map((dir) => dir.endsWith("/public") ? dir.slice(0, -"/public".length) : dir === "public" ? "" : dir).filter((dir) => packageDirs.has(dir));
|
|
33024
|
+
if (candidates.length > 0) {
|
|
33025
|
+
const depth = (dir) => dir === "" ? 0 : dir.split("/").length;
|
|
33026
|
+
candidates.sort((a, b) => {
|
|
33027
|
+
if (depth(a) !== depth(b)) return depth(a) - depth(b);
|
|
33028
|
+
const rank = (dir) => {
|
|
33029
|
+
const name = dir.split("/").pop() ?? "";
|
|
33030
|
+
const index = PREFERRED_NAMES.indexOf(name);
|
|
33031
|
+
return index === -1 ? PREFERRED_NAMES.length : index;
|
|
33032
|
+
};
|
|
33033
|
+
return rank(a) - rank(b) || a.localeCompare(b);
|
|
33034
|
+
});
|
|
33035
|
+
const best = candidates[0];
|
|
33036
|
+
return best === "" ? "" : `${best}/`;
|
|
33037
|
+
}
|
|
33038
|
+
const nonRoot = [...packageDirs].filter((dir) => dir !== "");
|
|
33039
|
+
if (packageDirs.has("") || nonRoot.length === 0) return "";
|
|
33040
|
+
nonRoot.sort((a, b) => a.split("/").length - b.split("/").length || a.localeCompare(b));
|
|
33041
|
+
return `${nonRoot[0]}/`;
|
|
33042
|
+
}
|
|
33043
|
+
|
|
32864
33044
|
// src/git/commit-helper.ts
|
|
32865
33045
|
var import_child_process2 = require("child_process");
|
|
32866
33046
|
var import_util2 = require("util");
|
|
@@ -35468,6 +35648,7 @@ var SUPPORTED_FRAMEWORKS = [
|
|
|
35468
35648
|
analyzeUrlSafety,
|
|
35469
35649
|
analyzers,
|
|
35470
35650
|
applyFixes,
|
|
35651
|
+
buildDeterministicFixes,
|
|
35471
35652
|
buildGSCApiRequest,
|
|
35472
35653
|
buildGSCRequest,
|
|
35473
35654
|
calculateAIVisibilityScore,
|
|
@@ -35537,6 +35718,7 @@ var SUPPORTED_FRAMEWORKS = [
|
|
|
35537
35718
|
extractTopics,
|
|
35538
35719
|
fetchCoreWebVitals,
|
|
35539
35720
|
findAlmostPage1Keywords,
|
|
35721
|
+
findAppRoot,
|
|
35540
35722
|
findCTROpportunities,
|
|
35541
35723
|
findHtmlEntry,
|
|
35542
35724
|
findLSIKeywords,
|
package/dist/index.mjs
CHANGED
|
@@ -13,8 +13,9 @@ import {
|
|
|
13
13
|
extractSchema,
|
|
14
14
|
httpGet,
|
|
15
15
|
httpHead,
|
|
16
|
-
httpPost
|
|
17
|
-
|
|
16
|
+
httpPost,
|
|
17
|
+
looksLikeHtmlFallback
|
|
18
|
+
} from "./chunk-O7B2LBKG.mjs";
|
|
18
19
|
import {
|
|
19
20
|
AI_CRAWLERS_INFO,
|
|
20
21
|
analyzeCitationReadiness,
|
|
@@ -4884,6 +4885,17 @@ async function checkRobotsTxt(baseUrl) {
|
|
|
4884
4885
|
};
|
|
4885
4886
|
}
|
|
4886
4887
|
const content = response.data;
|
|
4888
|
+
if (looksLikeHtmlFallback(content, response.headers?.["content-type"])) {
|
|
4889
|
+
issues.push({
|
|
4890
|
+
...ISSUE_DEFINITIONS.ROBOTS_TXT_MISSING,
|
|
4891
|
+
affectedUrls: [url],
|
|
4892
|
+
details: { servedHtml: true }
|
|
4893
|
+
});
|
|
4894
|
+
return {
|
|
4895
|
+
issues,
|
|
4896
|
+
data: { exists: false, blocksAll: false, hasSitemap: false, sitemapUrls: [] }
|
|
4897
|
+
};
|
|
4898
|
+
}
|
|
4887
4899
|
const lines = content.toLowerCase().split("\n");
|
|
4888
4900
|
let blocksAll = false;
|
|
4889
4901
|
let currentUserAgent = "";
|
|
@@ -7017,6 +7029,13 @@ async function checkLlmsTxt(baseUrl) {
|
|
|
7017
7029
|
};
|
|
7018
7030
|
}
|
|
7019
7031
|
const content = response.data;
|
|
7032
|
+
if (looksLikeHtmlFallback(content, response.headers?.["content-type"])) {
|
|
7033
|
+
issues.push({
|
|
7034
|
+
...ISSUE_DEFINITIONS.LLMS_TXT_MISSING,
|
|
7035
|
+
affectedUrls: [url]
|
|
7036
|
+
});
|
|
7037
|
+
return { issues, data: { exists: false, valid: false, errors: ["File not found (the site served HTML)"] } };
|
|
7038
|
+
}
|
|
7020
7039
|
const lines = content.split("\n").filter((line) => line.trim());
|
|
7021
7040
|
const errors = [];
|
|
7022
7041
|
let valid = true;
|
|
@@ -11443,7 +11462,7 @@ async function analyzeLlmsTxt(url) {
|
|
|
11443
11462
|
timeout: 1e4,
|
|
11444
11463
|
validateStatus: () => true
|
|
11445
11464
|
});
|
|
11446
|
-
if (response.status === 200) {
|
|
11465
|
+
if (response.status === 200 && !looksLikeHtmlFallback(response.data, response.headers?.["content-type"])) {
|
|
11447
11466
|
exists = true;
|
|
11448
11467
|
content = response.data;
|
|
11449
11468
|
contentLength = content.length;
|
|
@@ -11453,7 +11472,7 @@ async function analyzeLlmsTxt(url) {
|
|
|
11453
11472
|
timeout: 1e4,
|
|
11454
11473
|
validateStatus: () => true
|
|
11455
11474
|
});
|
|
11456
|
-
if (fullResponse.status === 200) {
|
|
11475
|
+
if (fullResponse.status === 200 && !looksLikeHtmlFallback(fullResponse.data, fullResponse.headers?.["content-type"])) {
|
|
11457
11476
|
fullVersionExists = true;
|
|
11458
11477
|
}
|
|
11459
11478
|
} catch {
|
|
@@ -21784,7 +21803,7 @@ This will open a browser for OAuth consent and save tokens locally.
|
|
|
21784
21803
|
`;
|
|
21785
21804
|
}
|
|
21786
21805
|
|
|
21787
|
-
// src/tracking/github-action.ts
|
|
21806
|
+
// src/tracking/github-action-template.ts
|
|
21788
21807
|
function generateWorkflow(config) {
|
|
21789
21808
|
const cronSchedule = getCronSchedule(config.schedule);
|
|
21790
21809
|
const sync = !!config.syncToDashboard;
|
|
@@ -22015,6 +22034,8 @@ function generateGitHubActionSetup(config) {
|
|
|
22015
22034
|
readmeBadge: `[](https://github.com/YOUR_ORG/YOUR_REPO/actions/workflows/seo.yml)`
|
|
22016
22035
|
};
|
|
22017
22036
|
}
|
|
22037
|
+
|
|
22038
|
+
// src/tracking/github-action.ts
|
|
22018
22039
|
function writeGitHubActionFiles(projectPath, config) {
|
|
22019
22040
|
const fs3 = __require("fs");
|
|
22020
22041
|
const path3 = __require("path");
|
|
@@ -23071,7 +23092,7 @@ async function executeAgent(agent, options = {}) {
|
|
|
23071
23092
|
}
|
|
23072
23093
|
}
|
|
23073
23094
|
async function runDirectAnalysis(url) {
|
|
23074
|
-
const { analyzeUrl: analyzeUrl2 } = await import("./analyzer-
|
|
23095
|
+
const { analyzeUrl: analyzeUrl2 } = await import("./analyzer-BYAFIO33.mjs");
|
|
23075
23096
|
const result = await analyzeUrl2({ url });
|
|
23076
23097
|
if (!result.success || !result.data) {
|
|
23077
23098
|
throw new Error(result.error || "Analysis failed");
|
|
@@ -28539,7 +28560,7 @@ Sitemap: ${url}/sitemap.xml`;
|
|
|
28539
28560
|
};
|
|
28540
28561
|
}
|
|
28541
28562
|
function generateSitemapFix(context, url) {
|
|
28542
|
-
const
|
|
28563
|
+
const sitemap2 = `<?xml version="1.0" encoding="UTF-8"?>
|
|
28543
28564
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
28544
28565
|
<url>
|
|
28545
28566
|
<loc>${url}</loc>
|
|
@@ -28551,7 +28572,7 @@ function generateSitemapFix(context, url) {
|
|
|
28551
28572
|
issue: { code: "MISSING_SITEMAP", message: "No sitemap.xml found", severity: "warning" },
|
|
28552
28573
|
file: "public/sitemap.xml",
|
|
28553
28574
|
before: null,
|
|
28554
|
-
after:
|
|
28575
|
+
after: sitemap2,
|
|
28555
28576
|
explanation: "Created sitemap.xml to help search engines discover all pages"
|
|
28556
28577
|
};
|
|
28557
28578
|
}
|
|
@@ -28648,7 +28669,7 @@ function generateLangFix(context) {
|
|
|
28648
28669
|
};
|
|
28649
28670
|
}
|
|
28650
28671
|
function generateLlmsTxtFix(context, siteName, url) {
|
|
28651
|
-
const
|
|
28672
|
+
const llmsTxt2 = `# ${siteName}
|
|
28652
28673
|
> ${siteName} - A brief description of your product/service
|
|
28653
28674
|
|
|
28654
28675
|
## About
|
|
@@ -28671,7 +28692,7 @@ ${siteName} is... [Add your description here]
|
|
|
28671
28692
|
issue: { code: "AI_NO_LLMS_TXT", message: "No llms.txt file for AI crawlers", severity: "info" },
|
|
28672
28693
|
file: "public/llms.txt",
|
|
28673
28694
|
before: null,
|
|
28674
|
-
after:
|
|
28695
|
+
after: llmsTxt2,
|
|
28675
28696
|
explanation: "Created llms.txt to help AI systems understand your site. Customize the content."
|
|
28676
28697
|
};
|
|
28677
28698
|
}
|
|
@@ -29303,6 +29324,155 @@ var Schemas = {
|
|
|
29303
29324
|
sitelinksSearchbox: generateSitelinksSearchboxSchema
|
|
29304
29325
|
};
|
|
29305
29326
|
|
|
29327
|
+
// src/fixer/deterministic.ts
|
|
29328
|
+
function xmlEscape(value) {
|
|
29329
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
29330
|
+
}
|
|
29331
|
+
function sitemap(urls) {
|
|
29332
|
+
const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
29333
|
+
const entries = urls.map(
|
|
29334
|
+
(url) => ` <url>
|
|
29335
|
+
<loc>${xmlEscape(url)}</loc>
|
|
29336
|
+
<lastmod>${today}</lastmod>
|
|
29337
|
+
</url>`
|
|
29338
|
+
).join("\n");
|
|
29339
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
29340
|
+
<!-- Generated by RankCLI - https://rankcli.dev -->
|
|
29341
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
29342
|
+
${entries}
|
|
29343
|
+
</urlset>
|
|
29344
|
+
`;
|
|
29345
|
+
}
|
|
29346
|
+
function llmsTxt(siteName, siteUrl, description, pages) {
|
|
29347
|
+
const base = siteUrl.replace(/\/$/, "");
|
|
29348
|
+
const trim = (url) => url.replace(/\/$/, "");
|
|
29349
|
+
const links = pages.filter((url) => trim(url) !== base).map((url) => ({ url, path: url.replace(base, "").replace(/^$/, "/") })).filter((page) => page.path !== "/").slice(0, 20).map((page) => `- [${page.path}](${page.url})`).join("\n");
|
|
29350
|
+
return `# ${siteName}
|
|
29351
|
+
|
|
29352
|
+
${description ? `> ${description}
|
|
29353
|
+
|
|
29354
|
+
` : ""}${base}
|
|
29355
|
+
|
|
29356
|
+
## Pages
|
|
29357
|
+
- [Home](${base}/)
|
|
29358
|
+
${links}
|
|
29359
|
+
|
|
29360
|
+
<!-- Generated by RankCLI - https://rankcli.dev -->
|
|
29361
|
+
`;
|
|
29362
|
+
}
|
|
29363
|
+
function jsonLdBlock(siteName, siteUrl, description) {
|
|
29364
|
+
const base = siteUrl.replace(/\/$/, "");
|
|
29365
|
+
const graph = [
|
|
29366
|
+
generateWebSiteSchema({ name: siteName, url: base, ...description ? { description } : {} }),
|
|
29367
|
+
generateOrganizationSchema({ name: siteName, url: base, ...description ? { description } : {} })
|
|
29368
|
+
];
|
|
29369
|
+
return ` <script type="application/ld+json">
|
|
29370
|
+
${JSON.stringify(graph, null, 2).split("\n").map((line) => ` ${line}`).join("\n")}
|
|
29371
|
+
</script>
|
|
29372
|
+
`;
|
|
29373
|
+
}
|
|
29374
|
+
var SCHEMA_CODES = [
|
|
29375
|
+
"SCHEMA_MISSING",
|
|
29376
|
+
"SCHEMA_ORG_MISSING",
|
|
29377
|
+
"ORGANIZATION_SCHEMA_MISSING",
|
|
29378
|
+
"NO_ORGANIZATION_SCHEMA",
|
|
29379
|
+
"NO_ENTITY_SCHEMA",
|
|
29380
|
+
"STRUCTURED_DATA_MISSING"
|
|
29381
|
+
];
|
|
29382
|
+
function metaDescriptionOf(html) {
|
|
29383
|
+
if (!html) return null;
|
|
29384
|
+
const match = html.match(/<meta[^>]+name=["']description["'][^>]+content=["']([^"']+)["']/i) || html.match(/<meta[^>]+content=["']([^"']+)["'][^>]+name=["']description["']/i);
|
|
29385
|
+
return match?.[1]?.trim() || null;
|
|
29386
|
+
}
|
|
29387
|
+
function buildDeterministicFixes(input) {
|
|
29388
|
+
const codes = new Set(input.issueCodes);
|
|
29389
|
+
const has = (...wanted) => wanted.some((code) => codes.has(code));
|
|
29390
|
+
const root = input.appRoot || "";
|
|
29391
|
+
const files = [];
|
|
29392
|
+
const addressed = [];
|
|
29393
|
+
const base = input.siteUrl.replace(/\/$/, "");
|
|
29394
|
+
const pages = input.pages?.length ? input.pages : [`${base}/`];
|
|
29395
|
+
const description = input.description ?? metaDescriptionOf(input.existing.indexHtml);
|
|
29396
|
+
if (has("ROBOTS_TXT_MISSING", "AI_BOTS_BLOCKED", "AI_CRAWLERS_BLOCKED") && !input.existing.robotsTxt) {
|
|
29397
|
+
files.push({
|
|
29398
|
+
path: `${root}public/robots.txt`,
|
|
29399
|
+
content: generateAIFriendlyRobotsTxt(base),
|
|
29400
|
+
message: "fix(seo): add robots.txt allowing search and AI crawlers",
|
|
29401
|
+
action: "created"
|
|
29402
|
+
});
|
|
29403
|
+
addressed.push("ROBOTS_TXT_MISSING");
|
|
29404
|
+
}
|
|
29405
|
+
if (has("SITEMAP_MISSING") && !input.existing.sitemapXml) {
|
|
29406
|
+
files.push({
|
|
29407
|
+
path: `${root}public/sitemap.xml`,
|
|
29408
|
+
content: sitemap(pages),
|
|
29409
|
+
message: "fix(seo): add sitemap.xml",
|
|
29410
|
+
action: "created"
|
|
29411
|
+
});
|
|
29412
|
+
addressed.push("SITEMAP_MISSING");
|
|
29413
|
+
}
|
|
29414
|
+
if (has("LLMS_TXT_MISSING") && !input.existing.llmsTxt) {
|
|
29415
|
+
files.push({
|
|
29416
|
+
path: `${root}public/llms.txt`,
|
|
29417
|
+
content: llmsTxt(input.siteName, base, description, pages),
|
|
29418
|
+
message: "fix(seo): add llms.txt for AI assistants",
|
|
29419
|
+
action: "created"
|
|
29420
|
+
});
|
|
29421
|
+
addressed.push("LLMS_TXT_MISSING");
|
|
29422
|
+
}
|
|
29423
|
+
const indexHtml = input.existing.indexHtml;
|
|
29424
|
+
if (has(...SCHEMA_CODES) && indexHtml && !indexHtml.includes("application/ld+json") && indexHtml.includes("</head>")) {
|
|
29425
|
+
files.push({
|
|
29426
|
+
path: `${root}index.html`,
|
|
29427
|
+
content: indexHtml.replace("</head>", `${jsonLdBlock(input.siteName, base, description)} </head>`),
|
|
29428
|
+
message: "fix(seo): add WebSite and Organization JSON-LD",
|
|
29429
|
+
action: "edited"
|
|
29430
|
+
});
|
|
29431
|
+
addressed.push(...SCHEMA_CODES.filter((code) => codes.has(code)));
|
|
29432
|
+
}
|
|
29433
|
+
const name = (file) => file.path.split("/").pop();
|
|
29434
|
+
const created = files.filter((f) => f.action === "created").map(name);
|
|
29435
|
+
const edited = files.filter((f) => f.action === "edited").map(name);
|
|
29436
|
+
const parts = [
|
|
29437
|
+
created.length ? `Added ${created.join(", ")}` : null,
|
|
29438
|
+
edited.length ? `updated ${edited.join(", ")}` : null
|
|
29439
|
+
].filter(Boolean);
|
|
29440
|
+
const summary = files.length ? `${parts.join("; ")} from RankCLI's templates - generated from the site's URL and name, with no AI and nothing invented.` : "No template-generatable issues were open on this report.";
|
|
29441
|
+
return { files, addressed, summary };
|
|
29442
|
+
}
|
|
29443
|
+
|
|
29444
|
+
// src/fixer/app-root.ts
|
|
29445
|
+
var PREFERRED_NAMES = ["web", "app", "site", "www", "frontend", "client", "ui", "saas", "marketing", "docs"];
|
|
29446
|
+
function directoryOf(path3) {
|
|
29447
|
+
const cut = path3.lastIndexOf("/");
|
|
29448
|
+
return cut === -1 ? "" : path3.slice(0, cut);
|
|
29449
|
+
}
|
|
29450
|
+
function findAppRoot(files) {
|
|
29451
|
+
const real = files.filter((f) => !f.includes("node_modules/") && !f.startsWith("."));
|
|
29452
|
+
const packageDirs = new Set(
|
|
29453
|
+
real.filter((f) => f === "package.json" || f.endsWith("/package.json")).map(directoryOf)
|
|
29454
|
+
);
|
|
29455
|
+
const candidates = real.filter((f) => f === "index.html" || f.endsWith("/index.html")).map(directoryOf).map((dir) => dir.endsWith("/public") ? dir.slice(0, -"/public".length) : dir === "public" ? "" : dir).filter((dir) => packageDirs.has(dir));
|
|
29456
|
+
if (candidates.length > 0) {
|
|
29457
|
+
const depth = (dir) => dir === "" ? 0 : dir.split("/").length;
|
|
29458
|
+
candidates.sort((a, b) => {
|
|
29459
|
+
if (depth(a) !== depth(b)) return depth(a) - depth(b);
|
|
29460
|
+
const rank = (dir) => {
|
|
29461
|
+
const name = dir.split("/").pop() ?? "";
|
|
29462
|
+
const index = PREFERRED_NAMES.indexOf(name);
|
|
29463
|
+
return index === -1 ? PREFERRED_NAMES.length : index;
|
|
29464
|
+
};
|
|
29465
|
+
return rank(a) - rank(b) || a.localeCompare(b);
|
|
29466
|
+
});
|
|
29467
|
+
const best = candidates[0];
|
|
29468
|
+
return best === "" ? "" : `${best}/`;
|
|
29469
|
+
}
|
|
29470
|
+
const nonRoot = [...packageDirs].filter((dir) => dir !== "");
|
|
29471
|
+
if (packageDirs.has("") || nonRoot.length === 0) return "";
|
|
29472
|
+
nonRoot.sort((a, b) => a.split("/").length - b.split("/").length || a.localeCompare(b));
|
|
29473
|
+
return `${nonRoot[0]}/`;
|
|
29474
|
+
}
|
|
29475
|
+
|
|
29306
29476
|
// src/git/commit-helper.ts
|
|
29307
29477
|
import { execSync, exec as exec2 } from "child_process";
|
|
29308
29478
|
import { promisify as promisify2 } from "util";
|
|
@@ -31902,6 +32072,7 @@ export {
|
|
|
31902
32072
|
analyzeUrlSafety,
|
|
31903
32073
|
analyzers_exports as analyzers,
|
|
31904
32074
|
applyFixes,
|
|
32075
|
+
buildDeterministicFixes,
|
|
31905
32076
|
buildGSCApiRequest,
|
|
31906
32077
|
buildGSCRequest,
|
|
31907
32078
|
calculateAIVisibilityScore,
|
|
@@ -31971,6 +32142,7 @@ export {
|
|
|
31971
32142
|
extractTopics,
|
|
31972
32143
|
fetchCoreWebVitals,
|
|
31973
32144
|
findAlmostPage1Keywords,
|
|
32145
|
+
findAppRoot,
|
|
31974
32146
|
findCTROpportunities,
|
|
31975
32147
|
findHtmlEntry,
|
|
31976
32148
|
findLSIKeywords,
|