popeye-cli 1.4.7 → 1.6.0

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.
Files changed (214) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +264 -63
  3. package/dist/adapters/gemini.d.ts +1 -0
  4. package/dist/adapters/gemini.d.ts.map +1 -1
  5. package/dist/adapters/gemini.js +9 -4
  6. package/dist/adapters/gemini.js.map +1 -1
  7. package/dist/adapters/grok.d.ts +1 -0
  8. package/dist/adapters/grok.d.ts.map +1 -1
  9. package/dist/adapters/grok.js +9 -4
  10. package/dist/adapters/grok.js.map +1 -1
  11. package/dist/adapters/openai.d.ts +1 -1
  12. package/dist/adapters/openai.d.ts.map +1 -1
  13. package/dist/adapters/openai.js +35 -9
  14. package/dist/adapters/openai.js.map +1 -1
  15. package/dist/cli/commands/create.d.ts.map +1 -1
  16. package/dist/cli/commands/create.js +54 -4
  17. package/dist/cli/commands/create.js.map +1 -1
  18. package/dist/cli/interactive.d.ts +29 -0
  19. package/dist/cli/interactive.d.ts.map +1 -1
  20. package/dist/cli/interactive.js +132 -7
  21. package/dist/cli/interactive.js.map +1 -1
  22. package/dist/generators/all.d.ts +8 -2
  23. package/dist/generators/all.d.ts.map +1 -1
  24. package/dist/generators/all.js +37 -316
  25. package/dist/generators/all.js.map +1 -1
  26. package/dist/generators/doc-parser.d.ts +64 -0
  27. package/dist/generators/doc-parser.d.ts.map +1 -0
  28. package/dist/generators/doc-parser.js +407 -0
  29. package/dist/generators/doc-parser.js.map +1 -0
  30. package/dist/generators/frontend-design-analyzer.d.ts +30 -0
  31. package/dist/generators/frontend-design-analyzer.d.ts.map +1 -0
  32. package/dist/generators/frontend-design-analyzer.js +208 -0
  33. package/dist/generators/frontend-design-analyzer.js.map +1 -0
  34. package/dist/generators/shared-packages.d.ts +45 -0
  35. package/dist/generators/shared-packages.d.ts.map +1 -0
  36. package/dist/generators/shared-packages.js +456 -0
  37. package/dist/generators/shared-packages.js.map +1 -0
  38. package/dist/generators/templates/index.d.ts +8 -0
  39. package/dist/generators/templates/index.d.ts.map +1 -1
  40. package/dist/generators/templates/index.js +8 -0
  41. package/dist/generators/templates/index.js.map +1 -1
  42. package/dist/generators/templates/website-components.d.ts +33 -0
  43. package/dist/generators/templates/website-components.d.ts.map +1 -0
  44. package/dist/generators/templates/website-components.js +303 -0
  45. package/dist/generators/templates/website-components.js.map +1 -0
  46. package/dist/generators/templates/website-config.d.ts +55 -0
  47. package/dist/generators/templates/website-config.d.ts.map +1 -0
  48. package/dist/generators/templates/website-config.js +425 -0
  49. package/dist/generators/templates/website-config.js.map +1 -0
  50. package/dist/generators/templates/website-conversion.d.ts +27 -0
  51. package/dist/generators/templates/website-conversion.d.ts.map +1 -0
  52. package/dist/generators/templates/website-conversion.js +326 -0
  53. package/dist/generators/templates/website-conversion.js.map +1 -0
  54. package/dist/generators/templates/website-landing.d.ts +24 -0
  55. package/dist/generators/templates/website-landing.d.ts.map +1 -0
  56. package/dist/generators/templates/website-landing.js +276 -0
  57. package/dist/generators/templates/website-landing.js.map +1 -0
  58. package/dist/generators/templates/website-layout.d.ts +42 -0
  59. package/dist/generators/templates/website-layout.d.ts.map +1 -0
  60. package/dist/generators/templates/website-layout.js +408 -0
  61. package/dist/generators/templates/website-layout.js.map +1 -0
  62. package/dist/generators/templates/website-pricing.d.ts +11 -0
  63. package/dist/generators/templates/website-pricing.d.ts.map +1 -0
  64. package/dist/generators/templates/website-pricing.js +313 -0
  65. package/dist/generators/templates/website-pricing.js.map +1 -0
  66. package/dist/generators/templates/website-sections.d.ts +102 -0
  67. package/dist/generators/templates/website-sections.d.ts.map +1 -0
  68. package/dist/generators/templates/website-sections.js +444 -0
  69. package/dist/generators/templates/website-sections.js.map +1 -0
  70. package/dist/generators/templates/website-seo.d.ts +76 -0
  71. package/dist/generators/templates/website-seo.d.ts.map +1 -0
  72. package/dist/generators/templates/website-seo.js +326 -0
  73. package/dist/generators/templates/website-seo.js.map +1 -0
  74. package/dist/generators/templates/website.d.ts +10 -83
  75. package/dist/generators/templates/website.d.ts.map +1 -1
  76. package/dist/generators/templates/website.js +12 -875
  77. package/dist/generators/templates/website.js.map +1 -1
  78. package/dist/generators/website-content-scanner.d.ts +37 -0
  79. package/dist/generators/website-content-scanner.d.ts.map +1 -0
  80. package/dist/generators/website-content-scanner.js +165 -0
  81. package/dist/generators/website-content-scanner.js.map +1 -0
  82. package/dist/generators/website-context.d.ts +119 -0
  83. package/dist/generators/website-context.d.ts.map +1 -0
  84. package/dist/generators/website-context.js +350 -0
  85. package/dist/generators/website-context.js.map +1 -0
  86. package/dist/generators/website-debug.d.ts +68 -0
  87. package/dist/generators/website-debug.d.ts.map +1 -0
  88. package/dist/generators/website-debug.js +93 -0
  89. package/dist/generators/website-debug.js.map +1 -0
  90. package/dist/generators/website.d.ts +5 -0
  91. package/dist/generators/website.d.ts.map +1 -1
  92. package/dist/generators/website.js +136 -11
  93. package/dist/generators/website.js.map +1 -1
  94. package/dist/generators/workspace-root.d.ts +27 -0
  95. package/dist/generators/workspace-root.d.ts.map +1 -0
  96. package/dist/generators/workspace-root.js +100 -0
  97. package/dist/generators/workspace-root.js.map +1 -0
  98. package/dist/state/index.d.ts +35 -0
  99. package/dist/state/index.d.ts.map +1 -1
  100. package/dist/state/index.js +40 -0
  101. package/dist/state/index.js.map +1 -1
  102. package/dist/types/consensus.d.ts +3 -0
  103. package/dist/types/consensus.d.ts.map +1 -1
  104. package/dist/types/consensus.js +1 -0
  105. package/dist/types/consensus.js.map +1 -1
  106. package/dist/types/website-strategy.d.ts +263 -0
  107. package/dist/types/website-strategy.d.ts.map +1 -0
  108. package/dist/types/website-strategy.js +105 -0
  109. package/dist/types/website-strategy.js.map +1 -0
  110. package/dist/types/workflow.d.ts +21 -0
  111. package/dist/types/workflow.d.ts.map +1 -1
  112. package/dist/types/workflow.js +8 -0
  113. package/dist/types/workflow.js.map +1 -1
  114. package/dist/upgrade/handlers.d.ts +15 -0
  115. package/dist/upgrade/handlers.d.ts.map +1 -1
  116. package/dist/upgrade/handlers.js +52 -0
  117. package/dist/upgrade/handlers.js.map +1 -1
  118. package/dist/workflow/auto-fix-bundler.d.ts +37 -0
  119. package/dist/workflow/auto-fix-bundler.d.ts.map +1 -0
  120. package/dist/workflow/auto-fix-bundler.js +320 -0
  121. package/dist/workflow/auto-fix-bundler.js.map +1 -0
  122. package/dist/workflow/auto-fix.d.ts.map +1 -1
  123. package/dist/workflow/auto-fix.js +10 -3
  124. package/dist/workflow/auto-fix.js.map +1 -1
  125. package/dist/workflow/consensus.d.ts.map +1 -1
  126. package/dist/workflow/consensus.js +2 -0
  127. package/dist/workflow/consensus.js.map +1 -1
  128. package/dist/workflow/execution-mode.d.ts.map +1 -1
  129. package/dist/workflow/execution-mode.js +18 -0
  130. package/dist/workflow/execution-mode.js.map +1 -1
  131. package/dist/workflow/index.d.ts +4 -0
  132. package/dist/workflow/index.d.ts.map +1 -1
  133. package/dist/workflow/index.js +37 -0
  134. package/dist/workflow/index.js.map +1 -1
  135. package/dist/workflow/overview.d.ts +89 -0
  136. package/dist/workflow/overview.d.ts.map +1 -0
  137. package/dist/workflow/overview.js +358 -0
  138. package/dist/workflow/overview.js.map +1 -0
  139. package/dist/workflow/plan-mode.d.ts +6 -4
  140. package/dist/workflow/plan-mode.d.ts.map +1 -1
  141. package/dist/workflow/plan-mode.js +148 -6
  142. package/dist/workflow/plan-mode.js.map +1 -1
  143. package/dist/workflow/website-strategy.d.ts +79 -0
  144. package/dist/workflow/website-strategy.d.ts.map +1 -0
  145. package/dist/workflow/website-strategy.js +310 -0
  146. package/dist/workflow/website-strategy.js.map +1 -0
  147. package/dist/workflow/website-updater.d.ts +17 -0
  148. package/dist/workflow/website-updater.d.ts.map +1 -0
  149. package/dist/workflow/website-updater.js +116 -0
  150. package/dist/workflow/website-updater.js.map +1 -0
  151. package/dist/workflow/workflow-logger.d.ts +1 -1
  152. package/dist/workflow/workflow-logger.d.ts.map +1 -1
  153. package/dist/workflow/workflow-logger.js.map +1 -1
  154. package/package.json +1 -1
  155. package/src/adapters/gemini.ts +10 -4
  156. package/src/adapters/grok.ts +10 -4
  157. package/src/adapters/openai.ts +38 -6
  158. package/src/cli/commands/create.ts +58 -4
  159. package/src/cli/interactive.ts +143 -7
  160. package/src/generators/all.ts +49 -332
  161. package/src/generators/doc-parser.ts +449 -0
  162. package/src/generators/frontend-design-analyzer.ts +261 -0
  163. package/src/generators/shared-packages.ts +500 -0
  164. package/src/generators/templates/index.ts +8 -0
  165. package/src/generators/templates/website-components.ts +330 -0
  166. package/src/generators/templates/website-config.ts +444 -0
  167. package/src/generators/templates/website-conversion.ts +341 -0
  168. package/src/generators/templates/website-landing.ts +331 -0
  169. package/src/generators/templates/website-layout.ts +443 -0
  170. package/src/generators/templates/website-pricing.ts +330 -0
  171. package/src/generators/templates/website-sections.ts +541 -0
  172. package/src/generators/templates/website-seo.ts +370 -0
  173. package/src/generators/templates/website.ts +38 -905
  174. package/src/generators/website-content-scanner.ts +208 -0
  175. package/src/generators/website-context.ts +493 -0
  176. package/src/generators/website-debug.ts +130 -0
  177. package/src/generators/website.ts +178 -20
  178. package/src/generators/workspace-root.ts +113 -0
  179. package/src/state/index.ts +56 -0
  180. package/src/types/consensus.ts +3 -0
  181. package/src/types/website-strategy.ts +243 -0
  182. package/src/types/workflow.ts +21 -0
  183. package/src/upgrade/handlers.ts +65 -0
  184. package/src/workflow/auto-fix-bundler.ts +392 -0
  185. package/src/workflow/auto-fix.ts +11 -3
  186. package/src/workflow/consensus.ts +2 -0
  187. package/src/workflow/execution-mode.ts +21 -0
  188. package/src/workflow/index.ts +37 -0
  189. package/src/workflow/overview.ts +475 -0
  190. package/src/workflow/plan-mode.ts +193 -8
  191. package/src/workflow/website-strategy.ts +379 -0
  192. package/src/workflow/website-updater.ts +142 -0
  193. package/src/workflow/workflow-logger.ts +1 -0
  194. package/tests/adapters/persona-switching.test.ts +63 -0
  195. package/tests/cli/project-naming.test.ts +136 -0
  196. package/tests/generators/doc-parser.test.ts +121 -0
  197. package/tests/generators/frontend-design-analyzer.test.ts +90 -0
  198. package/tests/generators/quality-gate.test.ts +183 -0
  199. package/tests/generators/shared-packages.test.ts +83 -0
  200. package/tests/generators/website-components.test.ts +159 -0
  201. package/tests/generators/website-config.test.ts +84 -0
  202. package/tests/generators/website-content-scanner.test.ts +181 -0
  203. package/tests/generators/website-context.test.ts +331 -0
  204. package/tests/generators/website-debug.test.ts +77 -0
  205. package/tests/generators/website-landing.test.ts +188 -0
  206. package/tests/generators/website-pricing.test.ts +98 -0
  207. package/tests/generators/website-sections.test.ts +245 -0
  208. package/tests/generators/website-seo-quality.test.ts +246 -0
  209. package/tests/generators/workspace-root.test.ts +105 -0
  210. package/tests/upgrade/handlers.test.ts +162 -0
  211. package/tests/workflow/auto-fix-bundler.test.ts +242 -0
  212. package/tests/workflow/overview.test.ts +392 -0
  213. package/tests/workflow/plan-mode.test.ts +111 -1
  214. package/tests/workflow/website-strategy.test.ts +246 -0
@@ -0,0 +1,326 @@
1
+ /**
2
+ * SEO infrastructure templates for Next.js marketing websites
3
+ * Generates JSON-LD components, enhanced sitemap, robots.txt,
4
+ * error pages, web manifest, and meta helpers
5
+ */
6
+ /**
7
+ * Escape a string for safe use inside JSX template literals
8
+ */
9
+ function escapeJsx(str) {
10
+ return str
11
+ .replace(/\\/g, '\\\\')
12
+ .replace(/'/g, "\\'")
13
+ .replace(/`/g, '\\`')
14
+ .replace(/\$/g, '\\$');
15
+ }
16
+ /**
17
+ * Generate reusable JSON-LD component
18
+ *
19
+ * @returns JsonLd component source code
20
+ */
21
+ export function generateJsonLdComponent() {
22
+ return `/**
23
+ * Reusable JSON-LD structured data component
24
+ * Renders schema.org structured data as a script tag
25
+ */
26
+
27
+ interface JsonLdProps {
28
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
+ schema: Record<string, any>;
30
+ }
31
+
32
+ export default function JsonLd({ schema }: JsonLdProps) {
33
+ return (
34
+ <script
35
+ type="application/ld+json"
36
+ dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
37
+ />
38
+ );
39
+ }
40
+ `;
41
+ }
42
+ /**
43
+ * Generate Organization JSON-LD schema data
44
+ *
45
+ * @param projectName - Product name
46
+ * @param context - Optional content context
47
+ * @returns Organization schema as string constant
48
+ */
49
+ export function generateOrganizationJsonLd(projectName, context) {
50
+ const displayName = context?.productName || projectName;
51
+ const description = context?.description || `${displayName} - Modern web application`;
52
+ return `{
53
+ "@context": "https://schema.org",
54
+ "@type": "Organization",
55
+ "name": "${escapeJsx(displayName)}",
56
+ "description": "${escapeJsx(description)}",
57
+ "url": process.env.NEXT_PUBLIC_SITE_URL || "https://${projectName}.com"
58
+ }`;
59
+ }
60
+ /**
61
+ * Generate SoftwareApplication JSON-LD schema data
62
+ *
63
+ * @param projectName - Product name
64
+ * @param context - Optional content context
65
+ * @returns Software application schema as string constant
66
+ */
67
+ export function generateProductJsonLd(projectName, context) {
68
+ const displayName = context?.productName || projectName;
69
+ const description = context?.description || `${displayName} - Modern web application`;
70
+ return `{
71
+ "@context": "https://schema.org",
72
+ "@type": "SoftwareApplication",
73
+ "name": "${escapeJsx(displayName)}",
74
+ "description": "${escapeJsx(description)}",
75
+ "applicationCategory": "BusinessApplication",
76
+ "operatingSystem": "Web",
77
+ "url": process.env.NEXT_PUBLIC_SITE_URL || "https://${projectName}.com"
78
+ }`;
79
+ }
80
+ /**
81
+ * Generate enhanced sitemap with all strategy pages
82
+ *
83
+ * @param projectName - Project name for base URL fallback
84
+ * @param strategy - Optional strategy for page list
85
+ * @returns Enhanced sitemap.ts source code
86
+ */
87
+ export function generateEnhancedSitemap(projectName, strategy) {
88
+ // Build page entries from strategy or defaults
89
+ const pages = strategy?.siteArchitecture.pages || [
90
+ { path: '/', pageType: 'landing' },
91
+ { path: '/pricing', pageType: 'pricing' },
92
+ { path: '/docs', pageType: 'docs' },
93
+ { path: '/blog', pageType: 'blog' },
94
+ ];
95
+ const priorityMap = {
96
+ landing: 1.0,
97
+ pricing: 0.9,
98
+ solution: 0.8,
99
+ 'use-cases': 0.8,
100
+ docs: 0.7,
101
+ blog: 0.7,
102
+ about: 0.6,
103
+ contact: 0.6,
104
+ legal: 0.3,
105
+ };
106
+ const frequencyMap = {
107
+ landing: 'weekly',
108
+ pricing: 'monthly',
109
+ solution: 'monthly',
110
+ 'use-cases': 'monthly',
111
+ docs: 'weekly',
112
+ blog: 'daily',
113
+ about: 'monthly',
114
+ contact: 'monthly',
115
+ legal: 'yearly',
116
+ };
117
+ const entries = pages.map(page => {
118
+ const priority = priorityMap[page.pageType] || 0.5;
119
+ const frequency = frequencyMap[page.pageType] || 'monthly';
120
+ const urlPath = page.path === '/' ? '' : page.path;
121
+ return ` {
122
+ url: \`\${baseUrl}${urlPath}\`,
123
+ lastModified: new Date(),
124
+ changeFrequency: '${frequency}' as const,
125
+ priority: ${priority},
126
+ }`;
127
+ });
128
+ return `import { MetadataRoute } from 'next';
129
+
130
+ export default function sitemap(): MetadataRoute.Sitemap {
131
+ const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://${projectName}.com';
132
+
133
+ return [
134
+ ${entries.join(',\n')}
135
+ ];
136
+ }
137
+ `;
138
+ }
139
+ /**
140
+ * Generate enhanced robots.txt
141
+ *
142
+ * @param projectName - Project name for base URL fallback
143
+ * @returns robots.ts source code
144
+ */
145
+ export function generateEnhancedRobots(projectName) {
146
+ return `import { MetadataRoute } from 'next';
147
+
148
+ export default function robots(): MetadataRoute.Robots {
149
+ const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://${projectName}.com';
150
+
151
+ return {
152
+ rules: [
153
+ {
154
+ userAgent: '*',
155
+ allow: '/',
156
+ disallow: ['/api/', '/admin/', '/_next/'],
157
+ },
158
+ ],
159
+ sitemap: \`\${baseUrl}/sitemap.xml\`,
160
+ };
161
+ }
162
+ `;
163
+ }
164
+ /**
165
+ * Generate branded 404 Not Found page
166
+ *
167
+ * @param projectName - Product name for branding
168
+ * @param context - Optional content context
169
+ * @returns not-found.tsx source code
170
+ */
171
+ export function generate404Page(projectName, context) {
172
+ const displayName = context?.productName || projectName
173
+ .split('-')
174
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
175
+ .join(' ');
176
+ return `import Link from 'next/link';
177
+
178
+ export default function NotFound() {
179
+ return (
180
+ <main className="flex min-h-[60vh] flex-col items-center justify-center">
181
+ <div className="text-center">
182
+ <p className="text-7xl font-bold text-primary-600">404</p>
183
+ <h1 className="mt-4 text-3xl font-bold text-gray-900">Page not found</h1>
184
+ <p className="mt-4 text-lg text-gray-600">
185
+ Sorry, we couldn&apos;t find the page you&apos;re looking for.
186
+ </p>
187
+ <div className="mt-8">
188
+ <Link
189
+ href="/"
190
+ className="rounded-md bg-primary-600 px-6 py-3 text-sm font-semibold text-white shadow-sm hover:bg-primary-500"
191
+ >
192
+ Back to ${escapeJsx(displayName)}
193
+ </Link>
194
+ </div>
195
+ </div>
196
+ </main>
197
+ );
198
+ }
199
+ `;
200
+ }
201
+ /**
202
+ * Generate error boundary page (500)
203
+ *
204
+ * @param projectName - Product name for branding
205
+ * @returns error.tsx source code
206
+ */
207
+ export function generate500Page(_projectName) {
208
+ return `'use client';
209
+
210
+ export default function Error({
211
+ reset,
212
+ }: {
213
+ error: Error & { digest?: string };
214
+ reset: () => void;
215
+ }) {
216
+ return (
217
+ <main className="flex min-h-[60vh] flex-col items-center justify-center">
218
+ <div className="text-center">
219
+ <p className="text-7xl font-bold text-red-600">500</p>
220
+ <h1 className="mt-4 text-3xl font-bold text-gray-900">Something went wrong</h1>
221
+ <p className="mt-4 text-lg text-gray-600">
222
+ An unexpected error occurred. Please try again.
223
+ </p>
224
+ <div className="mt-8">
225
+ <button
226
+ onClick={() => reset()}
227
+ className="rounded-md bg-primary-600 px-6 py-3 text-sm font-semibold text-white shadow-sm hover:bg-primary-500"
228
+ >
229
+ Try again
230
+ </button>
231
+ </div>
232
+ </div>
233
+ </main>
234
+ );
235
+ }
236
+ `;
237
+ }
238
+ /**
239
+ * Generate PWA web manifest
240
+ *
241
+ * @param projectName - Product name
242
+ * @param context - Optional content context
243
+ * @returns manifest.webmanifest JSON content
244
+ */
245
+ export function generateWebManifest(projectName, context) {
246
+ const displayName = context?.productName || projectName
247
+ .split('-')
248
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
249
+ .join(' ');
250
+ const primaryColor = context?.brand?.primaryColor || '#0ea5e9';
251
+ const description = context?.description || `${displayName} - Modern web application`;
252
+ return JSON.stringify({
253
+ name: displayName,
254
+ short_name: displayName,
255
+ description,
256
+ start_url: '/',
257
+ display: 'standalone',
258
+ background_color: '#ffffff',
259
+ theme_color: primaryColor,
260
+ icons: [
261
+ { src: '/favicon.ico', sizes: '48x48', type: 'image/x-icon' },
262
+ { src: '/icon-192.png', sizes: '192x192', type: 'image/png' },
263
+ { src: '/icon-512.png', sizes: '512x512', type: 'image/png' },
264
+ ],
265
+ }, null, 2);
266
+ }
267
+ /**
268
+ * Generate shared metadata helper utility
269
+ *
270
+ * @param projectName - Product name
271
+ * @param strategy - Optional strategy for SEO data
272
+ * @returns Metadata helper source code
273
+ */
274
+ export function generateMetaHelper(projectName, strategy) {
275
+ const primaryKeywords = strategy?.seoStrategy.primaryKeywords || [projectName, 'web app'];
276
+ const keywordsStr = primaryKeywords.map(k => `'${escapeJsx(k)}'`).join(', ');
277
+ return `import type { Metadata } from 'next';
278
+
279
+ const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://${projectName}.com';
280
+
281
+ /**
282
+ * Build page-level metadata with site-wide defaults
283
+ *
284
+ * @param title - Page title (combined with site name via template)
285
+ * @param description - Page meta description
286
+ * @param keywords - Additional page-specific keywords
287
+ * @param path - Page path for canonical URL
288
+ * @returns Next.js Metadata object
289
+ */
290
+ export function buildMetadata({
291
+ title,
292
+ description,
293
+ keywords = [],
294
+ path = '/',
295
+ }: {
296
+ title: string;
297
+ description: string;
298
+ keywords?: string[];
299
+ path?: string;
300
+ }): Metadata {
301
+ const url = \`\${BASE_URL}\${path}\`;
302
+ const allKeywords = [...new Set([${keywordsStr}, ...keywords])];
303
+
304
+ return {
305
+ title,
306
+ description,
307
+ keywords: allKeywords,
308
+ alternates: {
309
+ canonical: url,
310
+ },
311
+ openGraph: {
312
+ title,
313
+ description,
314
+ url,
315
+ type: 'website',
316
+ },
317
+ twitter: {
318
+ card: 'summary_large_image',
319
+ title,
320
+ description,
321
+ },
322
+ };
323
+ }
324
+ `;
325
+ }
326
+ //# sourceMappingURL=website-seo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"website-seo.js","sourceRoot":"","sources":["../../../src/generators/templates/website-seo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,GAAG;SACP,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO;;;;;;;;;;;;;;;;;;CAkBR,CAAC;AACF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CACxC,WAAmB,EACnB,OAA+B;IAE/B,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,WAAW,CAAC;IACxD,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,GAAG,WAAW,2BAA2B,CAAC;IAEtF,OAAO;;;aAGI,SAAS,CAAC,WAAW,CAAC;oBACf,SAAS,CAAC,WAAW,CAAC;wDACc,WAAW;EACjE,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,WAAmB,EACnB,OAA+B;IAE/B,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,WAAW,CAAC;IACxD,MAAM,W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AW;;;;;;;;;;;;;;;;;;;;;;CAsB/C,CAAC;AACF,CAAC"}
@@ -1,85 +1,12 @@
1
1
  /**
2
- * Website templates for Next.js marketing sites
3
- * Generates SEO-ready Next.js App Router projects
4
- */
5
- /**
6
- * Generate Next.js package.json
7
- */
8
- export declare function generateWebsitePackageJson(projectName: string): string;
9
- /**
10
- * Generate Next.js config
11
- */
12
- export declare function generateNextConfig(): string;
13
- /**
14
- * Generate website tsconfig.json
15
- */
16
- export declare function generateWebsiteTsconfig(): string;
17
- /**
18
- * Generate Tailwind config for website
19
- */
20
- export declare function generateWebsiteTailwindConfig(): string;
21
- /**
22
- * Generate PostCSS config for website
23
- */
24
- export declare function generateWebsitePostcssConfig(): string;
25
- /**
26
- * Generate root layout.tsx with metadata
27
- */
28
- export declare function generateWebsiteLayout(projectName: string): string;
29
- /**
30
- * Generate globals.css
31
- */
32
- export declare function generateWebsiteGlobalsCss(): string;
33
- /**
34
- * Generate landing page.tsx
35
- */
36
- export declare function generateWebsiteLandingPage(projectName: string): string;
37
- /**
38
- * Generate pricing page
39
- */
40
- export declare function generateWebsitePricingPage(projectName: string): string;
41
- /**
42
- * Generate sitemap.ts
43
- */
44
- export declare function generateWebsiteSitemap(projectName: string): string;
45
- /**
46
- * Generate robots.ts
47
- */
48
- export declare function generateWebsiteRobots(projectName: string): string;
49
- /**
50
- * Generate website Dockerfile
51
- */
52
- export declare function generateWebsiteDockerfile(): string;
53
- /**
54
- * Generate website README
55
- */
56
- export declare function generateWebsiteReadme(projectName: string): string;
57
- /**
58
- * Generate website spec JSON
59
- */
60
- export declare function generateWebsiteSpec(projectName: string): string;
61
- /**
62
- * Generate vitest config for website
63
- */
64
- export declare function generateWebsiteVitestConfig(): string;
65
- /**
66
- * Generate vitest setup for website
67
- */
68
- export declare function generateWebsiteVitestSetup(): string;
69
- /**
70
- * Generate sample test for website
71
- */
72
- export declare function generateWebsiteTest(projectName: string): string;
73
- /**
74
- * Generate docs page placeholder
75
- */
76
- export declare function generateWebsiteDocsPage(): string;
77
- /**
78
- * Generate blog listing page placeholder
79
- */
80
- export declare function generateWebsiteBlogPage(): string;
81
- /**
82
- * Generate Next.js environment declaration
83
- */
84
- export declare function generateWebsiteNextEnv(): string;
2
+ * Website content templates - re-export module
3
+ * Backward compatibility: all functions are available from their new homes
4
+ * but can still be imported from this file
5
+ */
6
+ export { generateWebsiteLandingPage, generateWebsiteLandingPageWithInfo } from './website-landing.js';
7
+ export type { LandingPageResult } from './website-landing.js';
8
+ export { generateWebsitePricingPage } from './website-pricing.js';
9
+ export { generateWebsiteLayout, generateWebsiteGlobalsCss, generateWebsiteSitemap, generateWebsiteRobots, generateWebsiteReadme, generateWebsiteSpec, generateWebsiteTest, generateWebsiteDocsPage, generateWebsiteBlogPage, } from './website-layout.js';
10
+ export { mapFeatureIcon, isNumericMetric, generatePainPointsSection, generateDifferentiatorsSection, generateHowItWorksSection, generateStatsSection, generateSocialProofSection, generatePricingTeaserSection, generateFaqSection, } from './website-sections.js';
11
+ export type { SectionRenderInfo } from './website-sections.js';
85
12
  //# sourceMappingURL=website.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"website.d.ts","sourceRoot":"","sources":["../../../src/generators/templates/website.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAqCtE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAwC3C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CA6BhD;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAmCtD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAQrD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAyDjE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAwBlD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAoGtE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAmJtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAkClE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAkBjE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CA4ClD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA0DjE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAkD/D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAoBpD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAsBnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA8B/D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAqBhD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAqBhD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAO/C"}
1
+ {"version":3,"file":"website.d.ts","sourceRoot":"","sources":["../../../src/generators/templates/website.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,0BAA0B,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AACtG,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAGlE,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}