@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.
- package/README.md +103 -1
- package/dist/index.d.mts +2 -79
- package/dist/index.d.ts +2 -79
- package/dist/index.js +0 -230
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -224
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +80 -3
- package/dist/server.d.ts +80 -3
- package/dist/server.js +12858 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +12869 -0
- package/dist/server.mjs.map +1 -1
- package/dist/{robots-generator-CYA9Ofu_.d.ts → storage-factory-CdCI1VHl.d.mts} +54 -23
- package/dist/{robots-generator-9d9aTULk.d.mts → storage-factory-L2YGjVID.d.ts} +54 -23
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SEORecord } from './seo-schema-D8EwzllB.
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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 };
|