@pas7/llm-seo 0.1.6

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.
@@ -0,0 +1,422 @@
1
+ import { z } from 'zod';
2
+
3
+ // src/schema/config.schema.ts
4
+ var SiteConfigSchema = z.object({
5
+ /** Site base URL - must be valid URL with http/https, no trailing slash */
6
+ baseUrl: z.string().url({ message: "Must be a valid URL with http or https protocol" }).refine(
7
+ (url) => !url.endsWith("/"),
8
+ { message: "Base URL must not have a trailing slash" }
9
+ ),
10
+ /** Default locale - must be in locales if provided */
11
+ defaultLocale: z.string().min(2).optional()
12
+ });
13
+ var BrandConfigSchema = z.object({
14
+ /** Brand name - required */
15
+ name: z.string().min(1, { message: "Brand name is required" }),
16
+ /** Optional tagline */
17
+ tagline: z.string().optional(),
18
+ /** Optional description */
19
+ description: z.string().optional(),
20
+ /** Optional organization name */
21
+ org: z.string().optional(),
22
+ /** Supported locales - e.g., ["en", "uk", "de"] */
23
+ locales: z.array(z.string().min(2)).min(1, { message: "At least one locale is required" })
24
+ });
25
+ var SectionsConfigSchema = z.object({
26
+ /** Hub paths - e.g., ["/services", "/blog", "/projects"] */
27
+ hubs: z.array(z.string()).default([])
28
+ });
29
+ var SocialConfigSchema = z.object({
30
+ /** Twitter handle or URL */
31
+ twitter: z.string().optional(),
32
+ /** LinkedIn URL */
33
+ linkedin: z.string().optional(),
34
+ /** GitHub URL */
35
+ github: z.string().optional()
36
+ });
37
+ var ContactConfigSchema = z.object({
38
+ /** Contact email */
39
+ email: z.string().email().optional(),
40
+ /** Social links */
41
+ social: SocialConfigSchema.optional(),
42
+ /** Phone number */
43
+ phone: z.string().optional()
44
+ });
45
+ var RestrictedClaimsConfigSchema = z.object({
46
+ /** Enable restricted claims checking */
47
+ enable: z.boolean(),
48
+ /** Forbidden words/phrases - e.g., ["best", "#1", "guaranteed"] */
49
+ forbidden: z.array(z.string()).optional(),
50
+ /** Allowlisted phrases */
51
+ whitelist: z.array(z.string()).optional()
52
+ });
53
+ var PolicyConfigSchema = z.object({
54
+ /** Geographic policy statement */
55
+ geoPolicy: z.string().optional(),
56
+ /** Citation rules */
57
+ citationRules: z.string().optional(),
58
+ /** Restricted claims configuration */
59
+ restrictedClaims: RestrictedClaimsConfigSchema.optional()
60
+ });
61
+ var BookingConfigSchema = z.object({
62
+ /** Booking URL - e.g., Cal.com link */
63
+ url: z.string().url().optional(),
64
+ /** Booking label - e.g., "Book a consultation" */
65
+ label: z.string().optional()
66
+ });
67
+ var MachineHintsConfigSchema = z.object({
68
+ /** URL to robots.txt */
69
+ robots: z.string().url().optional(),
70
+ /** URL to sitemap.xml */
71
+ sitemap: z.string().url().optional(),
72
+ /** URL to llms.txt */
73
+ llmsTxt: z.string().url().optional(),
74
+ /** URL to llms-full.txt */
75
+ llmsFullTxt: z.string().url().optional()
76
+ });
77
+ var OutputPathsConfigSchema = z.object({
78
+ /** Path to llms.txt output - e.g., "public/llms.txt" */
79
+ llmsTxt: z.string().min(1, { message: "llmsTxt output path is required" }),
80
+ /** Path to llms-full.txt output - e.g., "public/llms-full.txt" */
81
+ llmsFullTxt: z.string().min(1, { message: "llmsFullTxt output path is required" }),
82
+ /** Path to citations.json output - e.g., "public/citations.json" */
83
+ citations: z.string().optional()
84
+ });
85
+ var OutputConfigSchema = z.object({
86
+ /** Output paths */
87
+ paths: OutputPathsConfigSchema
88
+ });
89
+ var FormatConfigSchema = z.object({
90
+ /** Trailing slash handling */
91
+ trailingSlash: z.enum(["always", "never", "preserve"]).default("never"),
92
+ /** Line endings format */
93
+ lineEndings: z.enum(["lf", "crlf"]).default("lf"),
94
+ /** Locale URL strategy */
95
+ localeStrategy: z.enum(["prefix", "subdomain", "none"]).optional()
96
+ });
97
+ var LlmsSeoConfigSchema = z.object({
98
+ /** Site configuration */
99
+ site: SiteConfigSchema,
100
+ /** Brand configuration */
101
+ brand: BrandConfigSchema,
102
+ /** Sections configuration */
103
+ sections: SectionsConfigSchema.optional(),
104
+ /** Manifests configuration */
105
+ manifests: z.record(z.unknown()).default({}),
106
+ /** Contact configuration */
107
+ contact: ContactConfigSchema.optional(),
108
+ /** Policy configuration */
109
+ policy: PolicyConfigSchema.optional(),
110
+ /** Booking configuration */
111
+ booking: BookingConfigSchema.optional(),
112
+ /** Machine hints configuration */
113
+ machineHints: MachineHintsConfigSchema.optional(),
114
+ /** Output configuration */
115
+ output: OutputConfigSchema,
116
+ /** Format configuration */
117
+ format: FormatConfigSchema.optional()
118
+ });
119
+ var ConfigSchema = z.object({
120
+ baseUrl: z.string().url(),
121
+ title: z.string().min(1),
122
+ description: z.string().optional(),
123
+ outputDir: z.string().default("./public"),
124
+ includeOptionalSections: z.boolean().default(false),
125
+ maxContentLength: z.number().int().nonnegative().default(0)
126
+ });
127
+ var LocaleConfigSchema = z.object({
128
+ default: z.string().min(2),
129
+ supported: z.array(z.string().min(2)).min(1),
130
+ strategy: z.enum(["subdirectory", "subdomain", "domain"])
131
+ });
132
+ var CheckConfigSchema = z.object({
133
+ strict: z.boolean().default(false),
134
+ maxTitleLength: z.number().int().positive().default(60),
135
+ maxDescriptionLength: z.number().int().positive().default(160),
136
+ enableLint: z.boolean().default(true)
137
+ });
138
+ var FullConfigSchema = z.object({
139
+ site: ConfigSchema,
140
+ locale: LocaleConfigSchema.optional(),
141
+ check: CheckConfigSchema.optional()
142
+ });
143
+ var ManifestItemSchema = z.object({
144
+ /** URL path slug - required */
145
+ slug: z.string().min(1, { message: "Slug is required and cannot be empty" }),
146
+ /** Available locales for this page */
147
+ locales: z.array(z.string().min(2)).optional(),
148
+ /** Publication date (ISO 8601) */
149
+ publishedAt: z.string().datetime({ message: "publishedAt must be a valid ISO 8601 date" }).optional(),
150
+ /** Last update date (ISO 8601) */
151
+ updatedAt: z.string().datetime({ message: "updatedAt must be a valid ISO 8601 date" }).optional(),
152
+ /** Override canonical URL */
153
+ canonicalOverride: z.string().url().optional(),
154
+ /** Priority for citations (0-100) */
155
+ priority: z.number().int().min(0).max(100).optional(),
156
+ /** Title for display */
157
+ title: z.string().optional(),
158
+ /** Description for display */
159
+ description: z.string().optional()
160
+ });
161
+ var ManifestSourceSchema = z.object({
162
+ /** Source type */
163
+ type: z.enum(["file", "url", "module"]),
164
+ /** Source location */
165
+ source: z.string(),
166
+ /** Optional transform function */
167
+ transform: z.string().optional()
168
+ });
169
+ var ManifestValueSchema = z.union([
170
+ z.array(ManifestItemSchema),
171
+ ManifestSourceSchema
172
+ ]);
173
+ var ManifestsConfigSchema = z.record(z.string(), ManifestValueSchema);
174
+ var OptionalSectionSchema = z.object({
175
+ /** Section title */
176
+ title: z.string().min(1),
177
+ /** Section content */
178
+ content: z.string().optional()
179
+ });
180
+ var PageManifestSchema = z.object({
181
+ /** Page path (e.g., /about) */
182
+ path: z.string().startsWith("/"),
183
+ /** Page title */
184
+ title: z.string().optional(),
185
+ /** Page description */
186
+ description: z.string().optional(),
187
+ /** Page content for llms-full.txt */
188
+ content: z.string().optional(),
189
+ /** Whether page is optional (included only in full) */
190
+ optional: z.boolean().default(false),
191
+ /** Last modified timestamp (ISO 8601) */
192
+ lastModified: z.string().datetime().optional()
193
+ });
194
+ var SiteManifestSchema = z.object({
195
+ /** Site base URL */
196
+ baseUrl: z.string().url(),
197
+ /** Site title */
198
+ title: z.string().min(1),
199
+ /** Site description */
200
+ description: z.string().optional(),
201
+ /** List of pages */
202
+ pages: z.array(PageManifestSchema).min(1),
203
+ /** Optional sections for llms.txt */
204
+ optionalSections: z.array(OptionalSectionSchema).optional(),
205
+ /** Site version */
206
+ version: z.string().optional(),
207
+ /** Generation timestamp (ISO 8601) */
208
+ generatedAt: z.string().datetime().optional()
209
+ });
210
+ var BuildManifestSchema = z.object({
211
+ /** Build ID */
212
+ buildId: z.string(),
213
+ /** List of static pages */
214
+ pages: z.record(z.string(), z.array(z.string())),
215
+ /** Dynamic routes */
216
+ dynamicRoutes: z.record(z.string(), z.object({
217
+ routeRegex: z.string(),
218
+ dataRoute: z.string(),
219
+ dataRouteRegex: z.string()
220
+ })).optional()
221
+ });
222
+
223
+ // src/schema/validate.ts
224
+ function validate(schema, data) {
225
+ const result = schema.safeParse(data);
226
+ if (result.success) {
227
+ return {
228
+ success: true,
229
+ data: result.data,
230
+ issues: []
231
+ };
232
+ }
233
+ return {
234
+ success: false,
235
+ issues: formatZodErrors(result.error)
236
+ };
237
+ }
238
+ function formatZodErrors(error) {
239
+ return error.issues.map((issue) => ({
240
+ path: issue.path.join("."),
241
+ message: issue.message,
242
+ code: issue.code,
243
+ severity: "error"
244
+ }));
245
+ }
246
+ function validateOrThrow(schema, data) {
247
+ const result = validate(schema, data);
248
+ if (!result.success || !result.data) {
249
+ const messages = result.issues?.map((e) => `${e.path}: ${e.message}`).join("; ") ?? "Unknown validation error";
250
+ throw new Error(`Validation failed: ${messages}`);
251
+ }
252
+ return result.data;
253
+ }
254
+ function formatValidationErrors(issues) {
255
+ const lines = ["Validation failed:", ""];
256
+ for (const issue of issues) {
257
+ lines.push(` - ${issue.path || "(root)"}: ${issue.message}`);
258
+ }
259
+ return lines.join("\n");
260
+ }
261
+ function normalizeHubPath(path) {
262
+ let normalized = path.trim();
263
+ const queryIndex = normalized.indexOf("?");
264
+ if (queryIndex !== -1) {
265
+ normalized = normalized.substring(0, queryIndex);
266
+ }
267
+ const hashIndex = normalized.indexOf("#");
268
+ if (hashIndex !== -1) {
269
+ normalized = normalized.substring(0, hashIndex);
270
+ }
271
+ normalized = normalized.replace(/\/+/g, "/");
272
+ return normalized;
273
+ }
274
+ function validateHubPaths(hubs) {
275
+ const issues = [];
276
+ for (let i = 0; i < hubs.length; i++) {
277
+ const hub = hubs[i];
278
+ if (!hub) continue;
279
+ const path = `sections.hubs.${i}`;
280
+ if (!hub.startsWith("/")) {
281
+ issues.push({
282
+ path,
283
+ code: "invalid_hub_path",
284
+ message: `Hub path "${hub}" must start with a leading slash (/)`,
285
+ severity: "error"
286
+ });
287
+ }
288
+ if (hub.includes("//")) {
289
+ issues.push({
290
+ path,
291
+ code: "invalid_hub_path",
292
+ message: `Hub path "${hub}" contains double slashes (//)`,
293
+ severity: "error"
294
+ });
295
+ }
296
+ if (hub.includes("?")) {
297
+ issues.push({
298
+ path,
299
+ code: "invalid_hub_path",
300
+ message: `Hub path "${hub}" must not contain query strings (?)`,
301
+ severity: "error"
302
+ });
303
+ }
304
+ if (hub.includes("#")) {
305
+ issues.push({
306
+ path,
307
+ code: "invalid_hub_path",
308
+ message: `Hub path "${hub}" must not contain hashes (#)`,
309
+ severity: "error"
310
+ });
311
+ }
312
+ }
313
+ return issues;
314
+ }
315
+ function validateManifestItems(manifests) {
316
+ const issues = [];
317
+ for (const [manifestName, manifestValue] of Object.entries(manifests)) {
318
+ if (!Array.isArray(manifestValue)) {
319
+ continue;
320
+ }
321
+ const seen = /* @__PURE__ */ new Map();
322
+ const items = manifestValue;
323
+ for (let i = 0; i < items.length; i++) {
324
+ const item = items[i];
325
+ if (!item) continue;
326
+ const locales = item.locales || [""];
327
+ for (const locale of locales) {
328
+ const key = `${item.slug}:${locale}`;
329
+ const path = `manifests.${manifestName}.${i}`;
330
+ if (item.slug === void 0 || item.slug === "") {
331
+ issues.push({
332
+ path,
333
+ code: "empty_slug",
334
+ message: "Manifest item slug cannot be empty",
335
+ severity: "error"
336
+ });
337
+ continue;
338
+ }
339
+ if (seen.has(key)) {
340
+ const firstIndex = seen.get(key);
341
+ issues.push({
342
+ path,
343
+ code: "duplicate_manifest_item",
344
+ message: `Duplicate manifest item with slug "${item.slug}" and locale "${locale || "default"}" (first occurrence at index ${firstIndex})`,
345
+ severity: "error"
346
+ });
347
+ } else {
348
+ seen.set(key, i);
349
+ }
350
+ }
351
+ }
352
+ }
353
+ return issues;
354
+ }
355
+ function validateContact(contact) {
356
+ const issues = [];
357
+ if (!contact) {
358
+ return issues;
359
+ }
360
+ const hasEmail = Boolean(contact.email);
361
+ const hasSocial = Boolean(
362
+ contact.social?.twitter || contact.social?.linkedin || contact.social?.github
363
+ );
364
+ if (!hasEmail && !hasSocial) {
365
+ issues.push({
366
+ path: "contact",
367
+ code: "missing_contact",
368
+ message: "At least email or one social field (twitter, linkedin, github) is required",
369
+ severity: "error"
370
+ });
371
+ }
372
+ return issues;
373
+ }
374
+ function validateDefaultLocale(defaultLocale, locales) {
375
+ const issues = [];
376
+ if (defaultLocale && !locales.includes(defaultLocale)) {
377
+ issues.push({
378
+ path: "site.defaultLocale",
379
+ code: "invalid_default_locale",
380
+ message: `Default locale "${defaultLocale}" must exist in brand.locales [${locales.join(", ")}]`,
381
+ severity: "error"
382
+ });
383
+ }
384
+ return issues;
385
+ }
386
+ function validateLlmsSeoConfig(data) {
387
+ const schemaResult = validate(LlmsSeoConfigSchema, data);
388
+ if (!schemaResult.success) {
389
+ return schemaResult;
390
+ }
391
+ const config = schemaResult.data;
392
+ const issues = [];
393
+ if (config.site?.defaultLocale && config.brand?.locales) {
394
+ issues.push(...validateDefaultLocale(config.site.defaultLocale, config.brand.locales));
395
+ }
396
+ if (config.sections?.hubs) {
397
+ issues.push(...validateHubPaths(config.sections.hubs));
398
+ }
399
+ if (config.manifests && typeof config.manifests === "object") {
400
+ issues.push(...validateManifestItems(config.manifests));
401
+ }
402
+ issues.push(...validateContact(config.contact));
403
+ if (issues.length > 0) {
404
+ return {
405
+ success: false,
406
+ data: config,
407
+ issues: [...schemaResult.issues || [], ...issues]
408
+ };
409
+ }
410
+ return {
411
+ success: true,
412
+ data: config,
413
+ issues: []
414
+ };
415
+ }
416
+ function normalizeHubPaths(hubs) {
417
+ return hubs.map(normalizeHubPath).filter((h) => h.length > 0);
418
+ }
419
+
420
+ export { BookingConfigSchema, BrandConfigSchema, BuildManifestSchema, CheckConfigSchema, ConfigSchema, ContactConfigSchema, FormatConfigSchema, FullConfigSchema, LlmsSeoConfigSchema, LocaleConfigSchema, MachineHintsConfigSchema, ManifestItemSchema, ManifestSourceSchema, ManifestValueSchema, ManifestsConfigSchema, OptionalSectionSchema, OutputConfigSchema, OutputPathsConfigSchema, PageManifestSchema, PolicyConfigSchema, RestrictedClaimsConfigSchema, SectionsConfigSchema, SiteConfigSchema, SiteManifestSchema, SocialConfigSchema, formatValidationErrors, normalizeHubPaths, validate, validateLlmsSeoConfig, validateOrThrow };
421
+ //# sourceMappingURL=index.js.map
422
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/schema/config.schema.ts","../../src/schema/manifest.schema.ts","../../src/schema/validate.ts"],"names":["z"],"mappings":";;;AAUO,IAAM,gBAAA,GAAmB,EAAE,MAAA,CAAO;AAAA;AAAA,EAEvC,OAAA,EAAS,EACN,MAAA,EAAO,CACP,IAAI,EAAE,OAAA,EAAS,iDAAA,EAAmD,CAAA,CAClE,MAAA;AAAA,IACC,CAAC,GAAA,KAAQ,CAAC,GAAA,CAAI,SAAS,GAAG,CAAA;AAAA,IAC1B,EAAE,SAAS,yCAAA;AAA0C,GACvD;AAAA;AAAA,EAEF,eAAe,CAAA,CAAE,MAAA,GAAS,GAAA,CAAI,CAAC,EAAE,QAAA;AACnC,CAAC;AAUM,IAAM,iBAAA,GAAoB,EAAE,MAAA,CAAO;AAAA;AAAA,EAExC,IAAA,EAAM,EAAE,MAAA,EAAO,CAAE,IAAI,CAAA,EAAG,EAAE,OAAA,EAAS,wBAAA,EAA0B,CAAA;AAAA;AAAA,EAE7D,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAE7B,WAAA,EAAa,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAEjC,GAAA,EAAK,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAEzB,OAAA,EAAS,CAAA,CAAE,KAAA,CAAM,CAAA,CAAE,QAAO,CAAE,GAAA,CAAI,CAAC,CAAC,EAAE,GAAA,CAAI,CAAA,EAAG,EAAE,OAAA,EAAS,mCAAmC;AAC3F,CAAC;AAUM,IAAM,oBAAA,GAAuB,EAAE,MAAA,CAAO;A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,SAAoC,CAAC,CAAA;AAAA,EACnF;AAGA,EAAA,MAAA,CAAO,IAAA,CAAK,GAAG,eAAA,CAAgB,MAAA,CAAO,OAAO,CAAC,CAAA;AAG9C,EAAA,IAAI,MAAA,CAAO,SAAS,CAAA,EAAG;AACrB,IAAA,OAAO;AAAA,MACL,OAAA,EAAS,KAAA;AAAA,MACT,IAAA,EAAM,MAAA;AAAA,MACN,MAAA,EAAQ,CAAC,GAAI,YAAA,CAAa,UAAU,EAAC,EAAI,GAAG,MAAM;AAAA,KACpD;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,IAAA;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,QAAQ;AAAC,GACX;AACF;AAOO,SAAS,kBAAkB,IAAA,EAA0B;AAC1D,EAAA,OAAO,IAAA,CAAK,IAAI,gBAAgB,CAAA,CAAE,OAAO,CAAC,CAAA,KAAM,CAAA,CAAE,MAAA,GAAS,CAAC,CAAA;AAC9D","file":"index.js","sourcesContent":["/**\n * Configuration schema for llm-seo.\n * Full LlmsSeoConfig schema with all required fields and validation rules.\n */\n\nimport { z } from 'zod';\n\n/**\n * Schema for site configuration.\n */\nexport const SiteConfigSchema = z.object({\n /** Site base URL - must be valid URL with http/https, no trailing slash */\n baseUrl: z\n .string()\n .url({ message: 'Must be a valid URL with http or https protocol' })\n .refine(\n (url) => !url.endsWith('/'),\n { message: 'Base URL must not have a trailing slash' }\n ),\n /** Default locale - must be in locales if provided */\n defaultLocale: z.string().min(2).optional(),\n});\n\n/**\n * Type for site configuration.\n */\nexport type SiteConfig = z.infer<typeof SiteConfigSchema>;\n\n/**\n * Schema for brand configuration.\n */\nexport const BrandConfigSchema = z.object({\n /** Brand name - required */\n name: z.string().min(1, { message: 'Brand name is required' }),\n /** Optional tagline */\n tagline: z.string().optional(),\n /** Optional description */\n description: z.string().optional(),\n /** Optional organization name */\n org: z.string().optional(),\n /** Supported locales - e.g., [\"en\", \"uk\", \"de\"] */\n locales: z.array(z.string().min(2)).min(1, { message: 'At least one locale is required' }),\n});\n\n/**\n * Type for brand configuration.\n */\nexport type BrandConfig = z.infer<typeof BrandConfigSchema>;\n\n/**\n * Schema for sections configuration.\n */\nexport const SectionsConfigSchema = z.object({\n /** Hub paths - e.g., [\"/services\", \"/blog\", \"/projects\"] */\n hubs: z.array(z.string()).default([]),\n});\n\n/**\n * Type for sections configuration.\n */\nexport type SectionsConfig = z.infer<typeof SectionsConfigSchema>;\n\n/**\n * Schema for social links configuration.\n */\nexport const SocialConfigSchema = z.object({\n /** Twitter handle or URL */\n twitter: z.string().optional(),\n /** LinkedIn URL */\n linkedin: z.string().optional(),\n /** GitHub URL */\n github: z.string().optional(),\n});\n\n/**\n * Type for social links configuration.\n */\nexport type SocialConfig = z.infer<typeof SocialConfigSchema>;\n\n/**\n * Schema for contact configuration.\n * At least email or one social field required.\n */\nexport const ContactConfigSchema = z.object({\n /** Contact email */\n email: z.string().email().optional(),\n /** Social links */\n social: SocialConfigSchema.optional(),\n /** Phone number */\n phone: z.string().optional(),\n});\n\n/**\n * Type for contact configuration.\n */\nexport type ContactConfig = z.infer<typeof ContactConfigSchema>;\n\n/**\n * Schema for restricted claims configuration.\n */\nexport const RestrictedClaimsConfigSchema = z.object({\n /** Enable restricted claims checking */\n enable: z.boolean(),\n /** Forbidden words/phrases - e.g., [\"best\", \"#1\", \"guaranteed\"] */\n forbidden: z.array(z.string()).optional(),\n /** Allowlisted phrases */\n whitelist: z.array(z.string()).optional(),\n});\n\n/**\n * Type for restricted claims configuration.\n */\nexport type RestrictedClaimsConfig = z.infer<typeof RestrictedClaimsConfigSchema>;\n\n/**\n * Schema for policy configuration.\n */\nexport const PolicyConfigSchema = z.object({\n /** Geographic policy statement */\n geoPolicy: z.string().optional(),\n /** Citation rules */\n citationRules: z.string().optional(),\n /** Restricted claims configuration */\n restrictedClaims: RestrictedClaimsConfigSchema.optional(),\n});\n\n/**\n * Type for policy configuration.\n */\nexport type PolicyConfig = z.infer<typeof PolicyConfigSchema>;\n\n/**\n * Schema for booking configuration.\n */\nexport const BookingConfigSchema = z.object({\n /** Booking URL - e.g., Cal.com link */\n url: z.string().url().optional(),\n /** Booking label - e.g., \"Book a consultation\" */\n label: z.string().optional(),\n});\n\n/**\n * Type for booking configuration.\n */\nexport type BookingConfig = z.infer<typeof BookingConfigSchema>;\n\n/**\n * Schema for machine hints configuration.\n */\nexport const MachineHintsConfigSchema = z.object({\n /** URL to robots.txt */\n robots: z.string().url().optional(),\n /** URL to sitemap.xml */\n sitemap: z.string().url().optional(),\n /** URL to llms.txt */\n llmsTxt: z.string().url().optional(),\n /** URL to llms-full.txt */\n llmsFullTxt: z.string().url().optional(),\n});\n\n/**\n * Type for machine hints configuration.\n */\nexport type MachineHintsConfig = z.infer<typeof MachineHintsConfigSchema>;\n\n/**\n * Schema for output paths configuration.\n */\nexport const OutputPathsConfigSchema = z.object({\n /** Path to llms.txt output - e.g., \"public/llms.txt\" */\n llmsTxt: z.string().min(1, { message: 'llmsTxt output path is required' }),\n /** Path to llms-full.txt output - e.g., \"public/llms-full.txt\" */\n llmsFullTxt: z.string().min(1, { message: 'llmsFullTxt output path is required' }),\n /** Path to citations.json output - e.g., \"public/citations.json\" */\n citations: z.string().optional(),\n});\n\n/**\n * Type for output paths configuration.\n */\nexport type OutputPathsConfig = z.infer<typeof OutputPathsConfigSchema>;\n\n/**\n * Schema for output configuration.\n */\nexport const OutputConfigSchema = z.object({\n /** Output paths */\n paths: OutputPathsConfigSchema,\n});\n\n/**\n * Type for output configuration.\n */\nexport type OutputConfig = z.infer<typeof OutputConfigSchema>;\n\n/**\n * Schema for format configuration.\n */\nexport const FormatConfigSchema = z.object({\n /** Trailing slash handling */\n trailingSlash: z.enum(['always', 'never', 'preserve']).default('never'),\n /** Line endings format */\n lineEndings: z.enum(['lf', 'crlf']).default('lf'),\n /** Locale URL strategy */\n localeStrategy: z.enum(['prefix', 'subdomain', 'none']).optional(),\n});\n\n/**\n * Type for format configuration.\n */\nexport type FormatConfig = z.infer<typeof FormatConfigSchema>;\n\n/**\n * Full LlmsSeoConfig schema with all required fields.\n */\nexport const LlmsSeoConfigSchema = z.object({\n /** Site configuration */\n site: SiteConfigSchema,\n /** Brand configuration */\n brand: BrandConfigSchema,\n /** Sections configuration */\n sections: SectionsConfigSchema.optional(),\n /** Manifests configuration */\n manifests: z.record(z.unknown()).default({}),\n /** Contact configuration */\n contact: ContactConfigSchema.optional(),\n /** Policy configuration */\n policy: PolicyConfigSchema.optional(),\n /** Booking configuration */\n booking: BookingConfigSchema.optional(),\n /** Machine hints configuration */\n machineHints: MachineHintsConfigSchema.optional(),\n /** Output configuration */\n output: OutputConfigSchema,\n /** Format configuration */\n format: FormatConfigSchema.optional(),\n});\n\n/**\n * Type for full LlmsSeoConfig.\n */\nexport type LlmsSeoConfig = z.infer<typeof LlmsSeoConfigSchema>;\n\n// Legacy exports for backwards compatibility\nexport const ConfigSchema = z.object({\n baseUrl: z.string().url(),\n title: z.string().min(1),\n description: z.string().optional(),\n outputDir: z.string().default('./public'),\n includeOptionalSections: z.boolean().default(false),\n maxContentLength: z.number().int().nonnegative().default(0),\n});\n\nexport type Config = z.infer<typeof ConfigSchema>;\n\nexport const LocaleConfigSchema = z.object({\n default: z.string().min(2),\n supported: z.array(z.string().min(2)).min(1),\n strategy: z.enum(['subdirectory', 'subdomain', 'domain']),\n});\n\nexport type LocaleConfigSchemaType = z.infer<typeof LocaleConfigSchema>;\n\nexport const CheckConfigSchema = z.object({\n strict: z.boolean().default(false),\n maxTitleLength: z.number().int().positive().default(60),\n maxDescriptionLength: z.number().int().positive().default(160),\n enableLint: z.boolean().default(true),\n});\n\nexport type CheckConfig = z.infer<typeof CheckConfigSchema>;\n\nexport const FullConfigSchema = z.object({\n site: ConfigSchema,\n locale: LocaleConfigSchema.optional(),\n check: CheckConfigSchema.optional(),\n});\n\nexport type FullConfig = z.infer<typeof FullConfigSchema>;\n","/**\n * Manifest schema for site pages.\n */\n\nimport { z } from 'zod';\n\n/**\n * Schema for ManifestItem - a single page entry in a manifest.\n */\nexport const ManifestItemSchema = z.object({\n /** URL path slug - required */\n slug: z.string().min(1, { message: 'Slug is required and cannot be empty' }),\n /** Available locales for this page */\n locales: z.array(z.string().min(2)).optional(),\n /** Publication date (ISO 8601) */\n publishedAt: z.string().datetime({ message: 'publishedAt must be a valid ISO 8601 date' }).optional(),\n /** Last update date (ISO 8601) */\n updatedAt: z.string().datetime({ message: 'updatedAt must be a valid ISO 8601 date' }).optional(),\n /** Override canonical URL */\n canonicalOverride: z.string().url().optional(),\n /** Priority for citations (0-100) */\n priority: z.number().int().min(0).max(100).optional(),\n /** Title for display */\n title: z.string().optional(),\n /** Description for display */\n description: z.string().optional(),\n});\n\n/**\n * Type for ManifestItem.\n */\nexport type ManifestItem = z.infer<typeof ManifestItemSchema>;\n\n/**\n * Schema for ManifestSource - external manifest reference.\n */\nexport const ManifestSourceSchema = z.object({\n /** Source type */\n type: z.enum(['file', 'url', 'module']),\n /** Source location */\n source: z.string(),\n /** Optional transform function */\n transform: z.string().optional(),\n});\n\n/**\n * Type for ManifestSource.\n */\nexport type ManifestSource = z.infer<typeof ManifestSourceSchema>;\n\n/**\n * Schema for manifest value - can be array of items or source reference.\n */\nexport const ManifestValueSchema = z.union([\n z.array(ManifestItemSchema),\n ManifestSourceSchema,\n]);\n\n/**\n * Type for manifest value.\n */\nexport type ManifestValue = z.infer<typeof ManifestValueSchema>;\n\n/**\n * Schema for manifests configuration.\n */\nexport const ManifestsConfigSchema = z.record(z.string(), ManifestValueSchema);\n\n/**\n * Type for manifests configuration.\n */\nexport type ManifestsConfig = z.infer<typeof ManifestsConfigSchema>;\n\n// Legacy schemas for backwards compatibility\n\n/**\n * Schema for optional section in llms.txt.\n */\nexport const OptionalSectionSchema = z.object({\n /** Section title */\n title: z.string().min(1),\n /** Section content */\n content: z.string().optional(),\n});\n\n/**\n * Type for optional section.\n */\nexport type OptionalSection = z.infer<typeof OptionalSectionSchema>;\n\n/**\n * Schema for a page manifest entry (legacy).\n */\nexport const PageManifestSchema = z.object({\n /** Page path (e.g., /about) */\n path: z.string().startsWith('/'),\n /** Page title */\n title: z.string().optional(),\n /** Page description */\n description: z.string().optional(),\n /** Page content for llms-full.txt */\n content: z.string().optional(),\n /** Whether page is optional (included only in full) */\n optional: z.boolean().default(false),\n /** Last modified timestamp (ISO 8601) */\n lastModified: z.string().datetime().optional(),\n});\n\n/**\n * Type for page manifest.\n */\nexport type PageManifest = z.infer<typeof PageManifestSchema>;\n\n/**\n * Schema for site manifest.\n */\nexport const SiteManifestSchema = z.object({\n /** Site base URL */\n baseUrl: z.string().url(),\n /** Site title */\n title: z.string().min(1),\n /** Site description */\n description: z.string().optional(),\n /** List of pages */\n pages: z.array(PageManifestSchema).min(1),\n /** Optional sections for llms.txt */\n optionalSections: z.array(OptionalSectionSchema).optional(),\n /** Site version */\n version: z.string().optional(),\n /** Generation timestamp (ISO 8601) */\n generatedAt: z.string().datetime().optional(),\n});\n\n/**\n * Type for site manifest.\n */\nexport type SiteManifest = z.infer<typeof SiteManifestSchema>;\n\n/**\n * Schema for build manifest (Next.js compatible).\n */\nexport const BuildManifestSchema = z.object({\n /** Build ID */\n buildId: z.string(),\n /** List of static pages */\n pages: z.record(z.string(), z.array(z.string())),\n /** Dynamic routes */\n dynamicRoutes: z.record(z.string(), z.object({\n routeRegex: z.string(),\n dataRoute: z.string(),\n dataRouteRegex: z.string(),\n })).optional(),\n});\n\n/**\n * Type for build manifest.\n */\nexport type BuildManifest = z.infer<typeof BuildManifestSchema>;\n","/**\n * Validation utilities using Zod schemas.\n */\n\nimport { ZodType, ZodError } from 'zod';\nimport { LlmsSeoConfigSchema, type LlmsSeoConfig, type ContactConfig } from './config.schema.js';\nimport type { ManifestItem } from './manifest.schema.js';\n\n/**\n * Result of a validation operation.\n */\nexport interface ValidationResult<T> {\n /** Whether validation passed */\n success: boolean;\n /** Validated data (only present if success is true) */\n data?: T;\n /** Validation issues (errors and warnings) */\n issues?: ValidationIssue[];\n}\n\n/**\n * Represents a single validation issue (error or warning).\n */\nexport interface ValidationIssue {\n /** Path to the invalid field */\n path: string;\n /** Error code */\n code: string;\n /** Human-readable error message */\n message: string;\n /** Issue severity */\n severity: 'error' | 'warning';\n}\n\n/**\n * Legacy ValidationError type for backwards compatibility.\n */\nexport type ValidationError = Omit<ValidationIssue, 'severity'>;\n\n/**\n * Validates data against a Zod schema.\n * @param schema - The Zod schema to validate against\n * @param data - The data to validate\n * @returns Validation result\n */\nexport function validate<T>(\n schema: ZodType<T>,\n data: unknown\n): ValidationResult<T> {\n const result = schema.safeParse(data);\n \n if (result.success) {\n return {\n success: true,\n data: result.data,\n issues: [],\n };\n }\n \n return {\n success: false,\n issues: formatZodErrors(result.error),\n };\n}\n\n/**\n * Formats Zod errors into ValidationIssues.\n * @param error - The Zod error\n * @returns Array of validation issues\n */\nfunction formatZodErrors(error: ZodError): ValidationIssue[] {\n return error.issues.map((issue) => ({\n path: issue.path.join('.'),\n message: issue.message,\n code: issue.code,\n severity: 'error' as const,\n }));\n}\n\n/**\n * Validates and throws on error.\n * @param schema - The Zod schema to validate against\n * @param data - The data to validate\n * @returns Validated data\n * @throws Error if validation fails\n */\nexport function validateOrThrow<T>(schema: ZodType<T>, data: unknown): T {\n const result = validate(schema, data);\n \n if (!result.success || !result.data) {\n const messages = result.issues?.map((e) => `${e.path}: ${e.message}`).join('; ') ?? 'Unknown validation error';\n throw new Error(`Validation failed: ${messages}`);\n }\n \n return result.data;\n}\n\n/**\n * Creates a human-readable error message from validation issues.\n * @param issues - Array of validation issues\n * @returns Formatted error message\n */\nexport function formatValidationErrors(issues: readonly ValidationIssue[]): string {\n const lines: string[] = ['Validation failed:', ''];\n \n for (const issue of issues) {\n lines.push(` - ${issue.path || '(root)'}: ${issue.message}`);\n }\n \n return lines.join('\\n');\n}\n\n/**\n * Normalizes a hub path by removing double slashes, query strings, and hashes.\n * @param path - The path to normalize\n * @returns Normalized path\n */\nfunction normalizeHubPath(path: string): string {\n let normalized = path.trim();\n \n // Remove query strings\n const queryIndex = normalized.indexOf('?');\n if (queryIndex !== -1) {\n normalized = normalized.substring(0, queryIndex);\n }\n \n // Remove hashes\n const hashIndex = normalized.indexOf('#');\n if (hashIndex !== -1) {\n normalized = normalized.substring(0, hashIndex);\n }\n \n // Remove double slashes (but keep leading slash)\n normalized = normalized.replace(/\\/+/g, '/');\n \n return normalized;\n}\n\n/**\n * Validates hub paths according to the rules.\n * @param hubs - Array of hub paths\n * @returns Array of validation issues\n */\nfunction validateHubPaths(hubs: string[]): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n \n for (let i = 0; i < hubs.length; i++) {\n const hub = hubs[i];\n if (!hub) continue;\n \n const path = `sections.hubs.${i}`;\n \n // Check for leading slash\n if (!hub.startsWith('/')) {\n issues.push({\n path,\n code: 'invalid_hub_path',\n message: `Hub path \"${hub}\" must start with a leading slash (/)`,\n severity: 'error',\n });\n }\n \n // Check for double slashes\n if (hub.includes('//')) {\n issues.push({\n path,\n code: 'invalid_hub_path',\n message: `Hub path \"${hub}\" contains double slashes (//)`,\n severity: 'error',\n });\n }\n \n // Check for query strings\n if (hub.includes('?')) {\n issues.push({\n path,\n code: 'invalid_hub_path',\n message: `Hub path \"${hub}\" must not contain query strings (?)`,\n severity: 'error',\n });\n }\n \n // Check for hashes\n if (hub.includes('#')) {\n issues.push({\n path,\n code: 'invalid_hub_path',\n message: `Hub path \"${hub}\" must not contain hashes (#)`,\n severity: 'error',\n });\n }\n }\n \n return issues;\n}\n\n/**\n * Validates manifest items for uniqueness by slug + locale.\n * @param manifests - The manifests record\n * @returns Array of validation issues\n */\nfunction validateManifestItems(manifests: Record<string, unknown>): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n \n for (const [manifestName, manifestValue] of Object.entries(manifests)) {\n // Skip if not an array (could be ManifestSource)\n if (!Array.isArray(manifestValue)) {\n continue;\n }\n \n const seen = new Map<string, number>();\n const items = manifestValue as ManifestItem[];\n \n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (!item) continue;\n \n const locales = item.locales || [''];\n \n for (const locale of locales) {\n const key = `${item.slug}:${locale}`;\n const path = `manifests.${manifestName}.${i}`;\n \n if (item.slug === undefined || item.slug === '') {\n issues.push({\n path,\n code: 'empty_slug',\n message: 'Manifest item slug cannot be empty',\n severity: 'error',\n });\n continue;\n }\n \n if (seen.has(key)) {\n const firstIndex = seen.get(key);\n issues.push({\n path,\n code: 'duplicate_manifest_item',\n message: `Duplicate manifest item with slug \"${item.slug}\" and locale \"${locale || 'default'}\" (first occurrence at index ${firstIndex})`,\n severity: 'error',\n });\n } else {\n seen.set(key, i);\n }\n }\n }\n }\n \n return issues;\n}\n\n/**\n * Validates contact configuration.\n * At least email or one social field required.\n * @param contact - The contact configuration\n * @returns Array of validation issues\n */\nfunction validateContact(contact: ContactConfig | undefined): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n \n if (!contact) {\n return issues;\n }\n \n const hasEmail = Boolean(contact.email);\n const hasSocial = Boolean(\n contact.social?.twitter ||\n contact.social?.linkedin ||\n contact.social?.github\n );\n \n if (!hasEmail && !hasSocial) {\n issues.push({\n path: 'contact',\n code: 'missing_contact',\n message: 'At least email or one social field (twitter, linkedin, github) is required',\n severity: 'error',\n });\n }\n \n return issues;\n}\n\n/**\n * Validates that defaultLocale exists in brand.locales.\n * @param defaultLocale - The default locale\n * @param locales - Available locales\n * @returns Array of validation issues\n */\nfunction validateDefaultLocale(defaultLocale: string | undefined, locales: string[]): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n \n if (defaultLocale && !locales.includes(defaultLocale)) {\n issues.push({\n path: 'site.defaultLocale',\n code: 'invalid_default_locale',\n message: `Default locale \"${defaultLocale}\" must exist in brand.locales [${locales.join(', ')}]`,\n severity: 'error',\n });\n }\n \n return issues;\n}\n\n/**\n * Validates the full LlmsSeoConfig with custom validation rules.\n * @param data - The configuration data to validate\n * @returns Validation result with all issues\n */\nexport function validateLlmsSeoConfig(data: unknown): ValidationResult<LlmsSeoConfig> {\n // First, validate with Zod schema\n const schemaResult = validate<LlmsSeoConfig>(LlmsSeoConfigSchema as ZodType<LlmsSeoConfig>, data);\n \n if (!schemaResult.success) {\n return schemaResult;\n }\n \n const config = schemaResult.data!;\n const issues: ValidationIssue[] = [];\n \n // Validate defaultLocale exists in locales\n if (config.site?.defaultLocale && config.brand?.locales) {\n issues.push(...validateDefaultLocale(config.site.defaultLocale, config.brand.locales));\n }\n \n // Validate hub paths\n if (config.sections?.hubs) {\n issues.push(...validateHubPaths(config.sections.hubs));\n }\n \n // Validate manifest items\n if (config.manifests && typeof config.manifests === 'object') {\n issues.push(...validateManifestItems(config.manifests as Record<string, unknown>));\n }\n \n // Validate contact\n issues.push(...validateContact(config.contact));\n \n // Return result with all issues\n if (issues.length > 0) {\n return {\n success: false,\n data: config,\n issues: [...(schemaResult.issues || []), ...issues],\n };\n }\n \n return {\n success: true,\n data: config,\n issues: [],\n };\n}\n\n/**\n * Normalizes hub paths in the configuration.\n * @param hubs - Array of hub paths\n * @returns Normalized hub paths\n */\nexport function normalizeHubPaths(hubs: string[]): string[] {\n return hubs.map(normalizeHubPath).filter((h) => h.length > 0);\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@pas7/llm-seo",
3
+ "version": "0.1.6",
4
+ "description": "Deterministic LLM SEO artifacts generation and validation for modern static sites",
5
+ "type": "module",
6
+ "bin": {
7
+ "llm-seo": "./dist/cli/bin.js"
8
+ },
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./core": {
15
+ "types": "./dist/core/index.d.ts",
16
+ "import": "./dist/core/index.js"
17
+ },
18
+ "./schema": {
19
+ "types": "./dist/schema/index.d.ts",
20
+ "import": "./dist/schema/index.js"
21
+ },
22
+ "./adapters": {
23
+ "types": "./dist/adapters/index.d.ts",
24
+ "import": "./dist/adapters/index.js"
25
+ },
26
+ "./adapters/next": {
27
+ "types": "./dist/adapters/next/index.d.ts",
28
+ "import": "./dist/adapters/next/index.js"
29
+ }
30
+ },
31
+ "types": "./dist/index.d.ts",
32
+ "main": "./dist/index.js",
33
+ "files": [
34
+ "dist",
35
+ "README.md"
36
+ ],
37
+ "dependencies": {
38
+ "commander": "^12.1.0",
39
+ "zod": "^3.23.8"
40
+ },
41
+ "devDependencies": {
42
+ "@changesets/cli": "^2.27.0",
43
+ "@types/node": "^20.14.10",
44
+ "tsup": "^8.1.0",
45
+ "typescript": "^5.5.3",
46
+ "vitest": "^1.6.0"
47
+ },
48
+ "engines": {
49
+ "node": ">=18"
50
+ },
51
+ "keywords": [
52
+ "llm",
53
+ "seo",
54
+ "llms.txt",
55
+ "static-site",
56
+ "ssg",
57
+ "next.js",
58
+ "ai",
59
+ "crawlers",
60
+ "optimization"
61
+ ],
62
+ "author": "",
63
+ "license": "MIT",
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "https://github.com/pas7-studio/llm-seo.git"
67
+ },
68
+ "bugs": {
69
+ "url": "https://github.com/pas7-studio/llm-seo/issues"
70
+ },
71
+ "homepage": "https://github.com/pas7-studio/llm-seo#readme",
72
+ "scripts": {
73
+ "build": "tsup",
74
+ "dev": "tsup --watch",
75
+ "test": "vitest run",
76
+ "test:watch": "vitest",
77
+ "lint": "tsc --noEmit",
78
+ "typecheck": "tsc --noEmit",
79
+ "changeset": "changeset",
80
+ "version-packages": "changeset version",
81
+ "release": "changeset publish"
82
+ }
83
+ }