@seo-console/package 1.1.2 → 1.2.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.
@@ -1,4 +1,4 @@
1
- import { S as SEORecord } from './seo-schema-D8EwzllB.js';
1
+ import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './seo-schema-D8EwzllB.mjs';
2
2
 
3
3
  type ValidationSeverity = "critical" | "warning" | "info";
4
4
  interface ValidationIssue {
@@ -44,27 +44,6 @@ interface ImageValidationResult {
44
44
  */
45
45
  declare function validateOGImage(imageUrl: string, expectedWidth?: number, expectedHeight?: number): Promise<ImageValidationResult>;
46
46
 
47
- /**
48
- * Route Discovery Utility
49
- * Automatically discovers Next.js routes from the file system
50
- */
51
- interface DiscoveredRoute {
52
- routePath: string;
53
- filePath: string;
54
- isDynamic: boolean;
55
- isCatchAll: boolean;
56
- params: string[];
57
- }
58
- /**
59
- * Discover all Next.js routes from the app directory
60
- */
61
- declare function discoverNextJSRoutes(appDir?: string, rootDir?: string): Promise<DiscoveredRoute[]>;
62
- /**
63
- * Generate example route paths for dynamic routes
64
- * Useful for creating sample SEO records
65
- */
66
- declare function generateExamplePaths(route: DiscoveredRoute, count?: number): string[];
67
-
68
47
  /**
69
48
  * Metadata Extractor
70
49
  * Extracts SEO metadata from HTML pages or Next.js metadata exports
@@ -163,4 +142,56 @@ declare function updateRobotsTxtWithSitemap(existingContent: string, sitemapUrl:
163
142
  */
164
143
  declare function extractSitemapFromRobotsTxt(content: string): string | null;
165
144
 
166
- export { type DiscoveredRoute as D, type ExtractedMetadata as E, type ImageValidationResult as I, type RobotsTxtOptions as R, type SitemapEntry as S, type ValidationResult as V, validateHTML as a, validateURL as b, type ValidationIssue as c, generateSitemapFromRecords as d, generateRobotsTxt as e, extractMetadataFromURL as f, generateSitemapXML as g, crawlSiteForSEO as h, discoverNextJSRoutes as i, generateExamplePaths as j, extractMetadataFromHTML as k, validateSitemapEntry as l, metadataToSEORecord as m, type SitemapOptions as n, extractSitemapFromRobotsTxt as o, seoRecordsToSitemapEntries as s, updateRobotsTxtWithSitemap as u, validateOGImage as v };
145
+ /**
146
+ * Storage Adapter Interface
147
+ * Allows SEO Console to work with different storage backends
148
+ */
149
+
150
+ interface StorageAdapter {
151
+ /**
152
+ * Get all SEO records
153
+ */
154
+ getRecords(): Promise<SEORecord[]>;
155
+ /**
156
+ * Get a single SEO record by ID
157
+ */
158
+ getRecordById(id: string): Promise<SEORecord | null>;
159
+ /**
160
+ * Get SEO record by route path
161
+ */
162
+ getRecordByRoute(routePath: string): Promise<SEORecord | null>;
163
+ /**
164
+ * Create a new SEO record
165
+ */
166
+ createRecord(record: CreateSEORecord): Promise<SEORecord>;
167
+ /**
168
+ * Update an existing SEO record
169
+ */
170
+ updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
171
+ /**
172
+ * Delete an SEO record
173
+ */
174
+ deleteRecord(id: string): Promise<void>;
175
+ /**
176
+ * Check if storage is available/configured
177
+ */
178
+ isAvailable(): Promise<boolean>;
179
+ }
180
+ type StorageType = "file" | "memory";
181
+ interface StorageConfig {
182
+ type?: StorageType;
183
+ filePath?: string;
184
+ }
185
+
186
+ /**
187
+ * Storage Factory
188
+ * Creates file-based storage adapter
189
+ */
190
+
191
+ declare function createStorageAdapter(config?: StorageConfig): StorageAdapter;
192
+ /**
193
+ * Auto-detect storage config from environment
194
+ */
195
+ declare function detectStorageConfig(): StorageConfig;
196
+
197
+ export { type ExtractedMetadata as E, type ImageValidationResult as I, type RobotsTxtOptions as R, type SitemapEntry as S, type ValidationResult as V, type ValidationIssue as a, generateSitemapFromRecords as b, type SitemapOptions as c, generateRobotsTxt as d, extractMetadataFromHTML as e, extractSitemapFromRobotsTxt as f, generateSitemapXML as g, type StorageAdapter as h, type StorageType as i, type StorageConfig as j, detectStorageConfig as k, validateOGImage as l, metadataToSEORecord as m, validateHTML as n, validateURL as o, extractMetadataFromURL as p, crawlSiteForSEO as q, createStorageAdapter as r, seoRecordsToSitemapEntries as s, updateRobotsTxtWithSitemap as u, validateSitemapEntry as v };
@@ -1,4 +1,4 @@
1
- import { S as SEORecord } from './seo-schema-D8EwzllB.mjs';
1
+ import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './seo-schema-D8EwzllB.js';
2
2
 
3
3
  type ValidationSeverity = "critical" | "warning" | "info";
4
4
  interface ValidationIssue {
@@ -44,27 +44,6 @@ interface ImageValidationResult {
44
44
  */
45
45
  declare function validateOGImage(imageUrl: string, expectedWidth?: number, expectedHeight?: number): Promise<ImageValidationResult>;
46
46
 
47
- /**
48
- * Route Discovery Utility
49
- * Automatically discovers Next.js routes from the file system
50
- */
51
- interface DiscoveredRoute {
52
- routePath: string;
53
- filePath: string;
54
- isDynamic: boolean;
55
- isCatchAll: boolean;
56
- params: string[];
57
- }
58
- /**
59
- * Discover all Next.js routes from the app directory
60
- */
61
- declare function discoverNextJSRoutes(appDir?: string, rootDir?: string): Promise<DiscoveredRoute[]>;
62
- /**
63
- * Generate example route paths for dynamic routes
64
- * Useful for creating sample SEO records
65
- */
66
- declare function generateExamplePaths(route: DiscoveredRoute, count?: number): string[];
67
-
68
47
  /**
69
48
  * Metadata Extractor
70
49
  * Extracts SEO metadata from HTML pages or Next.js metadata exports
@@ -163,4 +142,56 @@ declare function updateRobotsTxtWithSitemap(existingContent: string, sitemapUrl:
163
142
  */
164
143
  declare function extractSitemapFromRobotsTxt(content: string): string | null;
165
144
 
166
- export { type DiscoveredRoute as D, type ExtractedMetadata as E, type ImageValidationResult as I, type RobotsTxtOptions as R, type SitemapEntry as S, type ValidationResult as V, validateHTML as a, validateURL as b, type ValidationIssue as c, generateSitemapFromRecords as d, generateRobotsTxt as e, extractMetadataFromURL as f, generateSitemapXML as g, crawlSiteForSEO as h, discoverNextJSRoutes as i, generateExamplePaths as j, extractMetadataFromHTML as k, validateSitemapEntry as l, metadataToSEORecord as m, type SitemapOptions as n, extractSitemapFromRobotsTxt as o, seoRecordsToSitemapEntries as s, updateRobotsTxtWithSitemap as u, validateOGImage as v };
145
+ /**
146
+ * Storage Adapter Interface
147
+ * Allows SEO Console to work with different storage backends
148
+ */
149
+
150
+ interface StorageAdapter {
151
+ /**
152
+ * Get all SEO records
153
+ */
154
+ getRecords(): Promise<SEORecord[]>;
155
+ /**
156
+ * Get a single SEO record by ID
157
+ */
158
+ getRecordById(id: string): Promise<SEORecord | null>;
159
+ /**
160
+ * Get SEO record by route path
161
+ */
162
+ getRecordByRoute(routePath: string): Promise<SEORecord | null>;
163
+ /**
164
+ * Create a new SEO record
165
+ */
166
+ createRecord(record: CreateSEORecord): Promise<SEORecord>;
167
+ /**
168
+ * Update an existing SEO record
169
+ */
170
+ updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
171
+ /**
172
+ * Delete an SEO record
173
+ */
174
+ deleteRecord(id: string): Promise<void>;
175
+ /**
176
+ * Check if storage is available/configured
177
+ */
178
+ isAvailable(): Promise<boolean>;
179
+ }
180
+ type StorageType = "file" | "memory";
181
+ interface StorageConfig {
182
+ type?: StorageType;
183
+ filePath?: string;
184
+ }
185
+
186
+ /**
187
+ * Storage Factory
188
+ * Creates file-based storage adapter
189
+ */
190
+
191
+ declare function createStorageAdapter(config?: StorageConfig): StorageAdapter;
192
+ /**
193
+ * Auto-detect storage config from environment
194
+ */
195
+ declare function detectStorageConfig(): StorageConfig;
196
+
197
+ export { type ExtractedMetadata as E, type ImageValidationResult as I, type RobotsTxtOptions as R, type SitemapEntry as S, type ValidationResult as V, type ValidationIssue as a, generateSitemapFromRecords as b, type SitemapOptions as c, generateRobotsTxt as d, extractMetadataFromHTML as e, extractSitemapFromRobotsTxt as f, generateSitemapXML as g, type StorageAdapter as h, type StorageType as i, type StorageConfig as j, detectStorageConfig as k, validateOGImage as l, metadataToSEORecord as m, validateHTML as n, validateURL as o, extractMetadataFromURL as p, crawlSiteForSEO as q, createStorageAdapter as r, seoRecordsToSitemapEntries as s, updateRobotsTxtWithSitemap as u, validateSitemapEntry as v };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seo-console/package",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "SEO validation and management system for Next.js applications",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",