@rankcli/agent-runtime 0.0.2 → 0.0.3
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/index.js +33 -0
- package/dist/index.mjs +33 -0
- package/package.json +1 -1
- package/src/fixer.ts +30 -0
package/dist/index.js
CHANGED
|
@@ -26752,12 +26752,15 @@ async function generateFixForIssue(issue, context) {
|
|
|
26752
26752
|
switch (issue.code) {
|
|
26753
26753
|
// Title issues
|
|
26754
26754
|
case "MISSING_TITLE":
|
|
26755
|
+
case "TITLE_MISSING":
|
|
26756
|
+
// Full audit code
|
|
26755
26757
|
case "TITLE_KEYWORD_MISMATCH":
|
|
26756
26758
|
case "TITLE_H1_KEYWORD_MISMATCH":
|
|
26757
26759
|
case "OUTDATED_YEAR_IN_TITLE":
|
|
26758
26760
|
return generateTitleFix(context, siteName);
|
|
26759
26761
|
// Meta description issues
|
|
26760
26762
|
case "MISSING_META_DESC":
|
|
26763
|
+
case "META_DESC_MISSING":
|
|
26761
26764
|
return generateMetaDescFix(context, siteName);
|
|
26762
26765
|
// Canonical issues
|
|
26763
26766
|
case "MISSING_CANONICAL":
|
|
@@ -26770,12 +26773,22 @@ async function generateFixForIssue(issue, context) {
|
|
|
26770
26773
|
return generateViewportFix(context);
|
|
26771
26774
|
// Open Graph issues
|
|
26772
26775
|
case "MISSING_OG_TAGS":
|
|
26776
|
+
case "OG_TITLE_MISSING":
|
|
26777
|
+
case "OG_DESC_MISSING":
|
|
26778
|
+
case "OG_IMAGE_MISSING":
|
|
26779
|
+
case "OG_URL_MISSING":
|
|
26773
26780
|
return generateOGFix(context, siteName, fullUrl);
|
|
26774
26781
|
// Twitter Card issues
|
|
26775
26782
|
case "MISSING_TWITTER_CARD":
|
|
26783
|
+
case "TWITTER_CARD_MISSING":
|
|
26784
|
+
case "TWITTER_TITLE_MISSING":
|
|
26785
|
+
case "TWITTER_DESC_MISSING":
|
|
26786
|
+
case "TWITTER_IMAGE_MISSING":
|
|
26776
26787
|
return generateTwitterFix(context, siteName);
|
|
26777
26788
|
// Schema/structured data issues
|
|
26778
26789
|
case "MISSING_SCHEMA":
|
|
26790
|
+
case "SCHEMA_MISSING":
|
|
26791
|
+
// Full audit code
|
|
26779
26792
|
case "SCHEMA_ORG_MISSING":
|
|
26780
26793
|
case "NO_ORGANIZATION_SCHEMA":
|
|
26781
26794
|
case "NO_ENTITY_SCHEMA":
|
|
@@ -26783,11 +26796,15 @@ async function generateFixForIssue(issue, context) {
|
|
|
26783
26796
|
return generateSchemaFix(context, siteName, fullUrl);
|
|
26784
26797
|
// Robots.txt issues
|
|
26785
26798
|
case "MISSING_ROBOTS":
|
|
26799
|
+
case "ROBOTS_TXT_MISSING":
|
|
26800
|
+
// Full audit code
|
|
26786
26801
|
case "ROBOTS_TXT_WARNINGS":
|
|
26787
26802
|
case "ROBOTS_TXT_INVALID_SYNTAX":
|
|
26788
26803
|
return generateRobotsFix(context, fullUrl);
|
|
26789
26804
|
// Sitemap issues
|
|
26790
26805
|
case "MISSING_SITEMAP":
|
|
26806
|
+
case "SITEMAP_MISSING":
|
|
26807
|
+
// Full audit code
|
|
26791
26808
|
case "BING_SITEMAP_MISSING":
|
|
26792
26809
|
return generateSitemapFix(context, fullUrl);
|
|
26793
26810
|
// H1 issues
|
|
@@ -26797,7 +26814,23 @@ async function generateFixForIssue(issue, context) {
|
|
|
26797
26814
|
return await generateH1Fix({ cwd });
|
|
26798
26815
|
// SPA-specific: add meta management library recommendation
|
|
26799
26816
|
case "SPA_NO_META_MANAGEMENT":
|
|
26817
|
+
case "SPA_WITHOUT_SSR":
|
|
26818
|
+
case "CLIENT_SIDE_RENDERING":
|
|
26800
26819
|
return generateSPAMetaFix(context, framework);
|
|
26820
|
+
// Internal links - suggest adding links
|
|
26821
|
+
case "NO_INTERNAL_LINKS":
|
|
26822
|
+
case "LINKS_NO_INTERNAL":
|
|
26823
|
+
case "NO_CONTENT_INTERNAL_LINKS":
|
|
26824
|
+
return {
|
|
26825
|
+
issue: { code: issue.code, message: "No internal links found", severity: "warning" },
|
|
26826
|
+
file: "src/components/Footer.tsx",
|
|
26827
|
+
before: null,
|
|
26828
|
+
after: `// Add internal navigation links to your footer or content
|
|
26829
|
+
// Example: <Link to="/about">About</Link>`,
|
|
26830
|
+
explanation: "Add internal links to help search engines discover your content",
|
|
26831
|
+
skipped: true,
|
|
26832
|
+
skipReason: "Requires manual content updates - add links to your navigation and content"
|
|
26833
|
+
};
|
|
26801
26834
|
// Preconnect issues
|
|
26802
26835
|
case "GOOGLE_FONTS_NO_PRECONNECT":
|
|
26803
26836
|
case "MISSING_PRECONNECT":
|
package/dist/index.mjs
CHANGED
|
@@ -25680,12 +25680,15 @@ async function generateFixForIssue(issue, context) {
|
|
|
25680
25680
|
switch (issue.code) {
|
|
25681
25681
|
// Title issues
|
|
25682
25682
|
case "MISSING_TITLE":
|
|
25683
|
+
case "TITLE_MISSING":
|
|
25684
|
+
// Full audit code
|
|
25683
25685
|
case "TITLE_KEYWORD_MISMATCH":
|
|
25684
25686
|
case "TITLE_H1_KEYWORD_MISMATCH":
|
|
25685
25687
|
case "OUTDATED_YEAR_IN_TITLE":
|
|
25686
25688
|
return generateTitleFix(context, siteName);
|
|
25687
25689
|
// Meta description issues
|
|
25688
25690
|
case "MISSING_META_DESC":
|
|
25691
|
+
case "META_DESC_MISSING":
|
|
25689
25692
|
return generateMetaDescFix(context, siteName);
|
|
25690
25693
|
// Canonical issues
|
|
25691
25694
|
case "MISSING_CANONICAL":
|
|
@@ -25698,12 +25701,22 @@ async function generateFixForIssue(issue, context) {
|
|
|
25698
25701
|
return generateViewportFix(context);
|
|
25699
25702
|
// Open Graph issues
|
|
25700
25703
|
case "MISSING_OG_TAGS":
|
|
25704
|
+
case "OG_TITLE_MISSING":
|
|
25705
|
+
case "OG_DESC_MISSING":
|
|
25706
|
+
case "OG_IMAGE_MISSING":
|
|
25707
|
+
case "OG_URL_MISSING":
|
|
25701
25708
|
return generateOGFix(context, siteName, fullUrl);
|
|
25702
25709
|
// Twitter Card issues
|
|
25703
25710
|
case "MISSING_TWITTER_CARD":
|
|
25711
|
+
case "TWITTER_CARD_MISSING":
|
|
25712
|
+
case "TWITTER_TITLE_MISSING":
|
|
25713
|
+
case "TWITTER_DESC_MISSING":
|
|
25714
|
+
case "TWITTER_IMAGE_MISSING":
|
|
25704
25715
|
return generateTwitterFix(context, siteName);
|
|
25705
25716
|
// Schema/structured data issues
|
|
25706
25717
|
case "MISSING_SCHEMA":
|
|
25718
|
+
case "SCHEMA_MISSING":
|
|
25719
|
+
// Full audit code
|
|
25707
25720
|
case "SCHEMA_ORG_MISSING":
|
|
25708
25721
|
case "NO_ORGANIZATION_SCHEMA":
|
|
25709
25722
|
case "NO_ENTITY_SCHEMA":
|
|
@@ -25711,11 +25724,15 @@ async function generateFixForIssue(issue, context) {
|
|
|
25711
25724
|
return generateSchemaFix(context, siteName, fullUrl);
|
|
25712
25725
|
// Robots.txt issues
|
|
25713
25726
|
case "MISSING_ROBOTS":
|
|
25727
|
+
case "ROBOTS_TXT_MISSING":
|
|
25728
|
+
// Full audit code
|
|
25714
25729
|
case "ROBOTS_TXT_WARNINGS":
|
|
25715
25730
|
case "ROBOTS_TXT_INVALID_SYNTAX":
|
|
25716
25731
|
return generateRobotsFix(context, fullUrl);
|
|
25717
25732
|
// Sitemap issues
|
|
25718
25733
|
case "MISSING_SITEMAP":
|
|
25734
|
+
case "SITEMAP_MISSING":
|
|
25735
|
+
// Full audit code
|
|
25719
25736
|
case "BING_SITEMAP_MISSING":
|
|
25720
25737
|
return generateSitemapFix(context, fullUrl);
|
|
25721
25738
|
// H1 issues
|
|
@@ -25725,7 +25742,23 @@ async function generateFixForIssue(issue, context) {
|
|
|
25725
25742
|
return await generateH1Fix({ cwd });
|
|
25726
25743
|
// SPA-specific: add meta management library recommendation
|
|
25727
25744
|
case "SPA_NO_META_MANAGEMENT":
|
|
25745
|
+
case "SPA_WITHOUT_SSR":
|
|
25746
|
+
case "CLIENT_SIDE_RENDERING":
|
|
25728
25747
|
return generateSPAMetaFix(context, framework);
|
|
25748
|
+
// Internal links - suggest adding links
|
|
25749
|
+
case "NO_INTERNAL_LINKS":
|
|
25750
|
+
case "LINKS_NO_INTERNAL":
|
|
25751
|
+
case "NO_CONTENT_INTERNAL_LINKS":
|
|
25752
|
+
return {
|
|
25753
|
+
issue: { code: issue.code, message: "No internal links found", severity: "warning" },
|
|
25754
|
+
file: "src/components/Footer.tsx",
|
|
25755
|
+
before: null,
|
|
25756
|
+
after: `// Add internal navigation links to your footer or content
|
|
25757
|
+
// Example: <Link to="/about">About</Link>`,
|
|
25758
|
+
explanation: "Add internal links to help search engines discover your content",
|
|
25759
|
+
skipped: true,
|
|
25760
|
+
skipReason: "Requires manual content updates - add links to your navigation and content"
|
|
25761
|
+
};
|
|
25729
25762
|
// Preconnect issues
|
|
25730
25763
|
case "GOOGLE_FONTS_NO_PRECONNECT":
|
|
25731
25764
|
case "MISSING_PRECONNECT":
|
package/package.json
CHANGED
package/src/fixer.ts
CHANGED
|
@@ -73,6 +73,7 @@ async function generateFixForIssue(
|
|
|
73
73
|
switch (issue.code) {
|
|
74
74
|
// Title issues
|
|
75
75
|
case 'MISSING_TITLE':
|
|
76
|
+
case 'TITLE_MISSING': // Full audit code
|
|
76
77
|
case 'TITLE_KEYWORD_MISMATCH':
|
|
77
78
|
case 'TITLE_H1_KEYWORD_MISMATCH':
|
|
78
79
|
case 'OUTDATED_YEAR_IN_TITLE':
|
|
@@ -80,6 +81,7 @@ async function generateFixForIssue(
|
|
|
80
81
|
|
|
81
82
|
// Meta description issues
|
|
82
83
|
case 'MISSING_META_DESC':
|
|
84
|
+
case 'META_DESC_MISSING': // Full audit code
|
|
83
85
|
return generateMetaDescFix(context, siteName);
|
|
84
86
|
|
|
85
87
|
// Canonical issues
|
|
@@ -95,14 +97,23 @@ async function generateFixForIssue(
|
|
|
95
97
|
|
|
96
98
|
// Open Graph issues
|
|
97
99
|
case 'MISSING_OG_TAGS':
|
|
100
|
+
case 'OG_TITLE_MISSING':
|
|
101
|
+
case 'OG_DESC_MISSING':
|
|
102
|
+
case 'OG_IMAGE_MISSING':
|
|
103
|
+
case 'OG_URL_MISSING':
|
|
98
104
|
return generateOGFix(context, siteName, fullUrl);
|
|
99
105
|
|
|
100
106
|
// Twitter Card issues
|
|
101
107
|
case 'MISSING_TWITTER_CARD':
|
|
108
|
+
case 'TWITTER_CARD_MISSING':
|
|
109
|
+
case 'TWITTER_TITLE_MISSING':
|
|
110
|
+
case 'TWITTER_DESC_MISSING':
|
|
111
|
+
case 'TWITTER_IMAGE_MISSING':
|
|
102
112
|
return generateTwitterFix(context, siteName);
|
|
103
113
|
|
|
104
114
|
// Schema/structured data issues
|
|
105
115
|
case 'MISSING_SCHEMA':
|
|
116
|
+
case 'SCHEMA_MISSING': // Full audit code
|
|
106
117
|
case 'SCHEMA_ORG_MISSING':
|
|
107
118
|
case 'NO_ORGANIZATION_SCHEMA':
|
|
108
119
|
case 'NO_ENTITY_SCHEMA':
|
|
@@ -111,12 +122,14 @@ async function generateFixForIssue(
|
|
|
111
122
|
|
|
112
123
|
// Robots.txt issues
|
|
113
124
|
case 'MISSING_ROBOTS':
|
|
125
|
+
case 'ROBOTS_TXT_MISSING': // Full audit code
|
|
114
126
|
case 'ROBOTS_TXT_WARNINGS':
|
|
115
127
|
case 'ROBOTS_TXT_INVALID_SYNTAX':
|
|
116
128
|
return generateRobotsFix(context, fullUrl);
|
|
117
129
|
|
|
118
130
|
// Sitemap issues
|
|
119
131
|
case 'MISSING_SITEMAP':
|
|
132
|
+
case 'SITEMAP_MISSING': // Full audit code
|
|
120
133
|
case 'BING_SITEMAP_MISSING':
|
|
121
134
|
return generateSitemapFix(context, fullUrl);
|
|
122
135
|
|
|
@@ -128,8 +141,25 @@ async function generateFixForIssue(
|
|
|
128
141
|
|
|
129
142
|
// SPA-specific: add meta management library recommendation
|
|
130
143
|
case 'SPA_NO_META_MANAGEMENT':
|
|
144
|
+
case 'SPA_WITHOUT_SSR':
|
|
145
|
+
case 'CLIENT_SIDE_RENDERING':
|
|
131
146
|
return generateSPAMetaFix(context, framework);
|
|
132
147
|
|
|
148
|
+
// Internal links - suggest adding links
|
|
149
|
+
case 'NO_INTERNAL_LINKS':
|
|
150
|
+
case 'LINKS_NO_INTERNAL':
|
|
151
|
+
case 'NO_CONTENT_INTERNAL_LINKS':
|
|
152
|
+
return {
|
|
153
|
+
issue: { code: issue.code, message: 'No internal links found', severity: 'warning' },
|
|
154
|
+
file: 'src/components/Footer.tsx',
|
|
155
|
+
before: null,
|
|
156
|
+
after: `// Add internal navigation links to your footer or content
|
|
157
|
+
// Example: <Link to="/about">About</Link>`,
|
|
158
|
+
explanation: 'Add internal links to help search engines discover your content',
|
|
159
|
+
skipped: true,
|
|
160
|
+
skipReason: 'Requires manual content updates - add links to your navigation and content',
|
|
161
|
+
};
|
|
162
|
+
|
|
133
163
|
// Preconnect issues
|
|
134
164
|
case 'GOOGLE_FONTS_NO_PRECONNECT':
|
|
135
165
|
case 'MISSING_PRECONNECT':
|