@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
package/dist/server.d.mts
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './seo-schema-D8EwzllB.mjs';
|
|
2
|
+
export { c as createSEORecordSchema, u as updateSEORecordSchema } from './seo-schema-D8EwzllB.mjs';
|
|
3
|
+
import { h as StorageAdapter } from './storage-factory-CdCI1VHl.mjs';
|
|
4
|
+
export { E as ExtractedMetadata, I as ImageValidationResult, R as RobotsTxtOptions, S as SitemapEntry, c as SitemapOptions, a as ValidationIssue, V as ValidationResult, q as crawlSiteForSEO, r as createStorageAdapter, e as extractMetadataFromHTML, p as extractMetadataFromURL, f as extractSitemapFromRobotsTxt, d as generateRobotsTxt, b as generateSitemapFromRecords, g as generateSitemapXML, m as metadataToSEORecord, s as seoRecordsToSitemapEntries, u as updateRobotsTxtWithSitemap, n as validateHTML, l as validateOGImage, v as validateSitemapEntry, o as validateURL } from './storage-factory-CdCI1VHl.mjs';
|
|
3
5
|
export { GenerateMetadataOptions, getRoutePathFromParams, useGenerateMetadata } from './hooks/index.mjs';
|
|
4
6
|
import 'zod';
|
|
5
7
|
import 'next';
|
|
6
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Route Discovery Utility
|
|
11
|
+
* Automatically discovers Next.js routes from the file system
|
|
12
|
+
*/
|
|
13
|
+
interface DiscoveredRoute {
|
|
14
|
+
routePath: string;
|
|
15
|
+
filePath: string;
|
|
16
|
+
isDynamic: boolean;
|
|
17
|
+
isCatchAll: boolean;
|
|
18
|
+
params: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Discover all Next.js routes from the app directory
|
|
22
|
+
*/
|
|
23
|
+
declare function discoverNextJSRoutes(appDir?: string, rootDir?: string): Promise<DiscoveredRoute[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Generate example route paths for dynamic routes
|
|
26
|
+
* Useful for creating sample SEO records
|
|
27
|
+
*/
|
|
28
|
+
declare function generateExamplePaths(route: DiscoveredRoute, count?: number): string[];
|
|
29
|
+
|
|
7
30
|
/**
|
|
8
31
|
* Crawlability Validator
|
|
9
32
|
* Validates that search engines can crawl and index pages
|
|
@@ -39,6 +62,60 @@ declare function validatePublicAccess(url: string): Promise<{
|
|
|
39
62
|
requiresAuth: boolean;
|
|
40
63
|
}>;
|
|
41
64
|
|
|
65
|
+
/**
|
|
66
|
+
* File-based storage adapter
|
|
67
|
+
* Stores SEO records in a JSON file
|
|
68
|
+
* No database required!
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
declare class FileStorage implements StorageAdapter {
|
|
72
|
+
private filePath;
|
|
73
|
+
private records;
|
|
74
|
+
private initialized;
|
|
75
|
+
constructor(filePath?: string);
|
|
76
|
+
private ensureInitialized;
|
|
77
|
+
private save;
|
|
78
|
+
isAvailable(): Promise<boolean>;
|
|
79
|
+
getRecords(): Promise<SEORecord[]>;
|
|
80
|
+
getRecordById(id: string): Promise<SEORecord | null>;
|
|
81
|
+
getRecordByRoute(routePath: string): Promise<SEORecord | null>;
|
|
82
|
+
createRecord(record: CreateSEORecord): Promise<SEORecord>;
|
|
83
|
+
updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
|
|
84
|
+
deleteRecord(id: string): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type Result$1<T, E = Error> = {
|
|
88
|
+
success: true;
|
|
89
|
+
data: T;
|
|
90
|
+
} | {
|
|
91
|
+
success: false;
|
|
92
|
+
error: E;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Get all SEO records for the current user
|
|
96
|
+
*/
|
|
97
|
+
declare function getSEORecords(): Promise<Result$1<SEORecord[]>>;
|
|
98
|
+
/**
|
|
99
|
+
* Get a single SEO record by ID
|
|
100
|
+
*/
|
|
101
|
+
declare function getSEORecordById(id: string): Promise<Result$1<SEORecord>>;
|
|
102
|
+
/**
|
|
103
|
+
* Get SEO record by route path
|
|
104
|
+
*/
|
|
105
|
+
declare function getSEORecordByRoute(routePath: string): Promise<Result$1<SEORecord | null>>;
|
|
106
|
+
/**
|
|
107
|
+
* Create a new SEO record
|
|
108
|
+
*/
|
|
109
|
+
declare function createSEORecord(record: CreateSEORecord): Promise<Result$1<SEORecord>>;
|
|
110
|
+
/**
|
|
111
|
+
* Update an existing SEO record
|
|
112
|
+
*/
|
|
113
|
+
declare function updateSEORecord(record: UpdateSEORecord): Promise<Result$1<SEORecord>>;
|
|
114
|
+
/**
|
|
115
|
+
* Delete an SEO record
|
|
116
|
+
*/
|
|
117
|
+
declare function deleteSEORecord(id: string): Promise<Result$1<void>>;
|
|
118
|
+
|
|
42
119
|
/**
|
|
43
120
|
* Server-side only exports
|
|
44
121
|
* These can be safely imported in API routes and server components
|
|
@@ -52,4 +129,4 @@ type Result<T> = {
|
|
|
52
129
|
error: Error;
|
|
53
130
|
};
|
|
54
131
|
|
|
55
|
-
export { type Result, validateCrawlability, validatePublicAccess, validateRobotsTxt };
|
|
132
|
+
export { CreateSEORecord, type DiscoveredRoute, FileStorage, type Result, SEORecord, UpdateSEORecord, createSEORecord, deleteSEORecord, discoverNextJSRoutes, generateExamplePaths, getSEORecordById, getSEORecordByRoute, getSEORecords, updateSEORecord, validateCrawlability, validatePublicAccess, validateRobotsTxt };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './seo-schema-D8EwzllB.js';
|
|
2
|
+
export { c as createSEORecordSchema, u as updateSEORecordSchema } from './seo-schema-D8EwzllB.js';
|
|
3
|
+
import { h as StorageAdapter } from './storage-factory-L2YGjVID.js';
|
|
4
|
+
export { E as ExtractedMetadata, I as ImageValidationResult, R as RobotsTxtOptions, S as SitemapEntry, c as SitemapOptions, a as ValidationIssue, V as ValidationResult, q as crawlSiteForSEO, r as createStorageAdapter, e as extractMetadataFromHTML, p as extractMetadataFromURL, f as extractSitemapFromRobotsTxt, d as generateRobotsTxt, b as generateSitemapFromRecords, g as generateSitemapXML, m as metadataToSEORecord, s as seoRecordsToSitemapEntries, u as updateRobotsTxtWithSitemap, n as validateHTML, l as validateOGImage, v as validateSitemapEntry, o as validateURL } from './storage-factory-L2YGjVID.js';
|
|
3
5
|
export { GenerateMetadataOptions, getRoutePathFromParams, useGenerateMetadata } from './hooks/index.js';
|
|
4
6
|
import 'zod';
|
|
5
7
|
import 'next';
|
|
6
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Route Discovery Utility
|
|
11
|
+
* Automatically discovers Next.js routes from the file system
|
|
12
|
+
*/
|
|
13
|
+
interface DiscoveredRoute {
|
|
14
|
+
routePath: string;
|
|
15
|
+
filePath: string;
|
|
16
|
+
isDynamic: boolean;
|
|
17
|
+
isCatchAll: boolean;
|
|
18
|
+
params: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Discover all Next.js routes from the app directory
|
|
22
|
+
*/
|
|
23
|
+
declare function discoverNextJSRoutes(appDir?: string, rootDir?: string): Promise<DiscoveredRoute[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Generate example route paths for dynamic routes
|
|
26
|
+
* Useful for creating sample SEO records
|
|
27
|
+
*/
|
|
28
|
+
declare function generateExamplePaths(route: DiscoveredRoute, count?: number): string[];
|
|
29
|
+
|
|
7
30
|
/**
|
|
8
31
|
* Crawlability Validator
|
|
9
32
|
* Validates that search engines can crawl and index pages
|
|
@@ -39,6 +62,60 @@ declare function validatePublicAccess(url: string): Promise<{
|
|
|
39
62
|
requiresAuth: boolean;
|
|
40
63
|
}>;
|
|
41
64
|
|
|
65
|
+
/**
|
|
66
|
+
* File-based storage adapter
|
|
67
|
+
* Stores SEO records in a JSON file
|
|
68
|
+
* No database required!
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
declare class FileStorage implements StorageAdapter {
|
|
72
|
+
private filePath;
|
|
73
|
+
private records;
|
|
74
|
+
private initialized;
|
|
75
|
+
constructor(filePath?: string);
|
|
76
|
+
private ensureInitialized;
|
|
77
|
+
private save;
|
|
78
|
+
isAvailable(): Promise<boolean>;
|
|
79
|
+
getRecords(): Promise<SEORecord[]>;
|
|
80
|
+
getRecordById(id: string): Promise<SEORecord | null>;
|
|
81
|
+
getRecordByRoute(routePath: string): Promise<SEORecord | null>;
|
|
82
|
+
createRecord(record: CreateSEORecord): Promise<SEORecord>;
|
|
83
|
+
updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
|
|
84
|
+
deleteRecord(id: string): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type Result$1<T, E = Error> = {
|
|
88
|
+
success: true;
|
|
89
|
+
data: T;
|
|
90
|
+
} | {
|
|
91
|
+
success: false;
|
|
92
|
+
error: E;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Get all SEO records for the current user
|
|
96
|
+
*/
|
|
97
|
+
declare function getSEORecords(): Promise<Result$1<SEORecord[]>>;
|
|
98
|
+
/**
|
|
99
|
+
* Get a single SEO record by ID
|
|
100
|
+
*/
|
|
101
|
+
declare function getSEORecordById(id: string): Promise<Result$1<SEORecord>>;
|
|
102
|
+
/**
|
|
103
|
+
* Get SEO record by route path
|
|
104
|
+
*/
|
|
105
|
+
declare function getSEORecordByRoute(routePath: string): Promise<Result$1<SEORecord | null>>;
|
|
106
|
+
/**
|
|
107
|
+
* Create a new SEO record
|
|
108
|
+
*/
|
|
109
|
+
declare function createSEORecord(record: CreateSEORecord): Promise<Result$1<SEORecord>>;
|
|
110
|
+
/**
|
|
111
|
+
* Update an existing SEO record
|
|
112
|
+
*/
|
|
113
|
+
declare function updateSEORecord(record: UpdateSEORecord): Promise<Result$1<SEORecord>>;
|
|
114
|
+
/**
|
|
115
|
+
* Delete an SEO record
|
|
116
|
+
*/
|
|
117
|
+
declare function deleteSEORecord(id: string): Promise<Result$1<void>>;
|
|
118
|
+
|
|
42
119
|
/**
|
|
43
120
|
* Server-side only exports
|
|
44
121
|
* These can be safely imported in API routes and server components
|
|
@@ -52,4 +129,4 @@ type Result<T> = {
|
|
|
52
129
|
error: Error;
|
|
53
130
|
};
|
|
54
131
|
|
|
55
|
-
export { type Result, validateCrawlability, validatePublicAccess, validateRobotsTxt };
|
|
132
|
+
export { CreateSEORecord, type DiscoveredRoute, FileStorage, type Result, SEORecord, UpdateSEORecord, createSEORecord, deleteSEORecord, discoverNextJSRoutes, generateExamplePaths, getSEORecordById, getSEORecordByRoute, getSEORecords, updateSEORecord, validateCrawlability, validatePublicAccess, validateRobotsTxt };
|