@seo-console/package 1.0.0 → 1.0.1
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/dist/components/index.d.mts +48 -3
- package/dist/components/index.d.ts +48 -3
- package/dist/components/index.js +3 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/index.js +443 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +443 -3
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +71 -66
- package/dist/index.d.ts +71 -66
- package/dist/index.js +804 -692
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +788 -682
- package/dist/index.mjs.map +1 -1
- package/dist/robots-generator-B1KOf8vn.d.ts +166 -0
- package/dist/robots-generator-D6T5HVNx.d.mts +166 -0
- package/dist/{index-6lAOwFXQ.d.mts → seo-schema-D8EwzllB.d.mts} +1 -46
- package/dist/{index-6lAOwFXQ.d.ts → seo-schema-D8EwzllB.d.ts} +1 -46
- package/dist/server.d.mts +88 -0
- package/dist/server.d.ts +88 -0
- package/dist/server.js +1547 -0
- package/dist/server.js.map +1 -0
- package/dist/server.mjs +1485 -0
- package/dist/server.mjs.map +1 -0
- package/package.json +13 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,81 +1,86 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './
|
|
3
|
-
export {
|
|
4
|
-
|
|
1
|
+
export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Input, OGImagePreview, SEORecordForm, SEORecordList, Spinner, ValidationDashboard } from './components/index.mjs';
|
|
2
|
+
import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './seo-schema-D8EwzllB.mjs';
|
|
3
|
+
export { c as createSEORecordSchema, u as updateSEORecordSchema } from './seo-schema-D8EwzllB.mjs';
|
|
4
|
+
export { D as DiscoveredRoute, E as ExtractedMetadata, I as ImageValidationResult, R as RobotsTxtOptions, S as SitemapEntry, i as SitemapOptions, a as ValidationIssue, V as ValidationResult, c as crawlSiteForSEO, d as discoverNextJSRoutes, e as extractMetadataFromHTML, b as extractMetadataFromURL, k as extractSitemapFromRobotsTxt, g as generateExamplePaths, j as generateRobotsTxt, h as generateSitemapFromRecords, f as generateSitemapXML, m as metadataToSEORecord, s as seoRecordsToSitemapEntries, u as updateRobotsTxtWithSitemap, v as validateSitemapEntry } from './robots-generator-D6T5HVNx.mjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
|
-
import 'zod';
|
|
7
6
|
import 'react';
|
|
7
|
+
import 'zod';
|
|
8
8
|
|
|
9
|
-
type ValidationSeverity = "critical" | "warning" | "info";
|
|
10
|
-
interface ValidationIssue {
|
|
11
|
-
field: string;
|
|
12
|
-
severity: ValidationSeverity;
|
|
13
|
-
message: string;
|
|
14
|
-
expected?: string;
|
|
15
|
-
actual?: string;
|
|
16
|
-
}
|
|
17
|
-
interface ValidationResult {
|
|
18
|
-
isValid: boolean;
|
|
19
|
-
issues: ValidationIssue[];
|
|
20
|
-
validatedAt: Date;
|
|
21
|
-
}
|
|
22
9
|
/**
|
|
23
|
-
*
|
|
10
|
+
* Storage Adapter Interface
|
|
11
|
+
* Allows SEO Console to work with different storage backends
|
|
24
12
|
*/
|
|
25
|
-
declare function validateHTML(html: string, record: SEORecord, _baseUrl?: string): Promise<ValidationResult>;
|
|
26
13
|
|
|
27
|
-
interface
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
interface StorageAdapter {
|
|
15
|
+
/**
|
|
16
|
+
* Get all SEO records
|
|
17
|
+
*/
|
|
18
|
+
getRecords(): Promise<SEORecord[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Get a single SEO record by ID
|
|
21
|
+
*/
|
|
22
|
+
getRecordById(id: string): Promise<SEORecord | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Get SEO record by route path
|
|
25
|
+
*/
|
|
26
|
+
getRecordByRoute(routePath: string): Promise<SEORecord | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Create a new SEO record
|
|
29
|
+
*/
|
|
30
|
+
createRecord(record: CreateSEORecord): Promise<SEORecord>;
|
|
31
|
+
/**
|
|
32
|
+
* Update an existing SEO record
|
|
33
|
+
*/
|
|
34
|
+
updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
|
|
35
|
+
/**
|
|
36
|
+
* Delete an SEO record
|
|
37
|
+
*/
|
|
38
|
+
deleteRecord(id: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Check if storage is available/configured
|
|
41
|
+
*/
|
|
42
|
+
isAvailable(): Promise<boolean>;
|
|
43
|
+
}
|
|
44
|
+
type StorageType = "supabase" | "file" | "sqlite" | "memory";
|
|
45
|
+
interface StorageConfig {
|
|
46
|
+
type: StorageType;
|
|
47
|
+
supabaseUrl?: string;
|
|
48
|
+
supabaseKey?: string;
|
|
49
|
+
filePath?: string;
|
|
50
|
+
sqlitePath?: string;
|
|
42
51
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Validate OG image URL
|
|
45
|
-
* Checks dimensions, format, file size, and accessibility
|
|
46
|
-
*/
|
|
47
|
-
declare function validateOGImage(imageUrl: string, expectedWidth?: number, expectedHeight?: number): Promise<ImageValidationResult>;
|
|
48
52
|
|
|
49
|
-
type Result<T, E = Error> = {
|
|
50
|
-
success: true;
|
|
51
|
-
data: T;
|
|
52
|
-
} | {
|
|
53
|
-
success: false;
|
|
54
|
-
error: E;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Get all SEO records for the current user
|
|
58
|
-
*/
|
|
59
|
-
declare function getSEORecords(): Promise<Result<SEORecord[]>>;
|
|
60
53
|
/**
|
|
61
|
-
*
|
|
54
|
+
* Storage Factory
|
|
55
|
+
* Creates the appropriate storage adapter based on configuration
|
|
62
56
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* Get SEO record by route path
|
|
66
|
-
*/
|
|
67
|
-
declare function getSEORecordByRoute(routePath: string): Promise<Result<SEORecord | null>>;
|
|
68
|
-
/**
|
|
69
|
-
* Create a new SEO record
|
|
70
|
-
*/
|
|
71
|
-
declare function createSEORecord(record: CreateSEORecord): Promise<Result<SEORecord>>;
|
|
57
|
+
|
|
58
|
+
declare function createStorageAdapter(config: StorageConfig): StorageAdapter;
|
|
72
59
|
/**
|
|
73
|
-
*
|
|
60
|
+
* Auto-detect storage type from environment
|
|
74
61
|
*/
|
|
75
|
-
declare function
|
|
62
|
+
declare function detectStorageConfig(): StorageConfig;
|
|
63
|
+
|
|
76
64
|
/**
|
|
77
|
-
*
|
|
65
|
+
* File-based storage adapter
|
|
66
|
+
* Stores SEO records in a JSON file
|
|
67
|
+
* No database required!
|
|
78
68
|
*/
|
|
79
|
-
declare function deleteSEORecord(id: string): Promise<Result<void>>;
|
|
80
69
|
|
|
81
|
-
|
|
70
|
+
declare class FileStorage implements StorageAdapter {
|
|
71
|
+
private filePath;
|
|
72
|
+
private records;
|
|
73
|
+
private initialized;
|
|
74
|
+
constructor(filePath?: string);
|
|
75
|
+
private ensureInitialized;
|
|
76
|
+
private save;
|
|
77
|
+
isAvailable(): Promise<boolean>;
|
|
78
|
+
getRecords(): Promise<SEORecord[]>;
|
|
79
|
+
getRecordById(id: string): Promise<SEORecord | null>;
|
|
80
|
+
getRecordByRoute(routePath: string): Promise<SEORecord | null>;
|
|
81
|
+
createRecord(record: CreateSEORecord): Promise<SEORecord>;
|
|
82
|
+
updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
|
|
83
|
+
deleteRecord(id: string): Promise<void>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { CreateSEORecord, FileStorage, SEORecord, type StorageAdapter, type StorageConfig, type StorageType, UpdateSEORecord, createStorageAdapter, detectStorageConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,81 +1,86 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './
|
|
3
|
-
export {
|
|
4
|
-
|
|
1
|
+
export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Input, OGImagePreview, SEORecordForm, SEORecordList, Spinner, ValidationDashboard } from './components/index.js';
|
|
2
|
+
import { S as SEORecord, C as CreateSEORecord, U as UpdateSEORecord } from './seo-schema-D8EwzllB.js';
|
|
3
|
+
export { c as createSEORecordSchema, u as updateSEORecordSchema } from './seo-schema-D8EwzllB.js';
|
|
4
|
+
export { D as DiscoveredRoute, E as ExtractedMetadata, I as ImageValidationResult, R as RobotsTxtOptions, S as SitemapEntry, i as SitemapOptions, a as ValidationIssue, V as ValidationResult, c as crawlSiteForSEO, d as discoverNextJSRoutes, e as extractMetadataFromHTML, b as extractMetadataFromURL, k as extractSitemapFromRobotsTxt, g as generateExamplePaths, j as generateRobotsTxt, h as generateSitemapFromRecords, f as generateSitemapXML, m as metadataToSEORecord, s as seoRecordsToSitemapEntries, u as updateRobotsTxtWithSitemap, v as validateSitemapEntry } from './robots-generator-B1KOf8vn.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
|
-
import 'zod';
|
|
7
6
|
import 'react';
|
|
7
|
+
import 'zod';
|
|
8
8
|
|
|
9
|
-
type ValidationSeverity = "critical" | "warning" | "info";
|
|
10
|
-
interface ValidationIssue {
|
|
11
|
-
field: string;
|
|
12
|
-
severity: ValidationSeverity;
|
|
13
|
-
message: string;
|
|
14
|
-
expected?: string;
|
|
15
|
-
actual?: string;
|
|
16
|
-
}
|
|
17
|
-
interface ValidationResult {
|
|
18
|
-
isValid: boolean;
|
|
19
|
-
issues: ValidationIssue[];
|
|
20
|
-
validatedAt: Date;
|
|
21
|
-
}
|
|
22
9
|
/**
|
|
23
|
-
*
|
|
10
|
+
* Storage Adapter Interface
|
|
11
|
+
* Allows SEO Console to work with different storage backends
|
|
24
12
|
*/
|
|
25
|
-
declare function validateHTML(html: string, record: SEORecord, _baseUrl?: string): Promise<ValidationResult>;
|
|
26
13
|
|
|
27
|
-
interface
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
interface StorageAdapter {
|
|
15
|
+
/**
|
|
16
|
+
* Get all SEO records
|
|
17
|
+
*/
|
|
18
|
+
getRecords(): Promise<SEORecord[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Get a single SEO record by ID
|
|
21
|
+
*/
|
|
22
|
+
getRecordById(id: string): Promise<SEORecord | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Get SEO record by route path
|
|
25
|
+
*/
|
|
26
|
+
getRecordByRoute(routePath: string): Promise<SEORecord | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Create a new SEO record
|
|
29
|
+
*/
|
|
30
|
+
createRecord(record: CreateSEORecord): Promise<SEORecord>;
|
|
31
|
+
/**
|
|
32
|
+
* Update an existing SEO record
|
|
33
|
+
*/
|
|
34
|
+
updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
|
|
35
|
+
/**
|
|
36
|
+
* Delete an SEO record
|
|
37
|
+
*/
|
|
38
|
+
deleteRecord(id: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Check if storage is available/configured
|
|
41
|
+
*/
|
|
42
|
+
isAvailable(): Promise<boolean>;
|
|
43
|
+
}
|
|
44
|
+
type StorageType = "supabase" | "file" | "sqlite" | "memory";
|
|
45
|
+
interface StorageConfig {
|
|
46
|
+
type: StorageType;
|
|
47
|
+
supabaseUrl?: string;
|
|
48
|
+
supabaseKey?: string;
|
|
49
|
+
filePath?: string;
|
|
50
|
+
sqlitePath?: string;
|
|
42
51
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Validate OG image URL
|
|
45
|
-
* Checks dimensions, format, file size, and accessibility
|
|
46
|
-
*/
|
|
47
|
-
declare function validateOGImage(imageUrl: string, expectedWidth?: number, expectedHeight?: number): Promise<ImageValidationResult>;
|
|
48
52
|
|
|
49
|
-
type Result<T, E = Error> = {
|
|
50
|
-
success: true;
|
|
51
|
-
data: T;
|
|
52
|
-
} | {
|
|
53
|
-
success: false;
|
|
54
|
-
error: E;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Get all SEO records for the current user
|
|
58
|
-
*/
|
|
59
|
-
declare function getSEORecords(): Promise<Result<SEORecord[]>>;
|
|
60
53
|
/**
|
|
61
|
-
*
|
|
54
|
+
* Storage Factory
|
|
55
|
+
* Creates the appropriate storage adapter based on configuration
|
|
62
56
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* Get SEO record by route path
|
|
66
|
-
*/
|
|
67
|
-
declare function getSEORecordByRoute(routePath: string): Promise<Result<SEORecord | null>>;
|
|
68
|
-
/**
|
|
69
|
-
* Create a new SEO record
|
|
70
|
-
*/
|
|
71
|
-
declare function createSEORecord(record: CreateSEORecord): Promise<Result<SEORecord>>;
|
|
57
|
+
|
|
58
|
+
declare function createStorageAdapter(config: StorageConfig): StorageAdapter;
|
|
72
59
|
/**
|
|
73
|
-
*
|
|
60
|
+
* Auto-detect storage type from environment
|
|
74
61
|
*/
|
|
75
|
-
declare function
|
|
62
|
+
declare function detectStorageConfig(): StorageConfig;
|
|
63
|
+
|
|
76
64
|
/**
|
|
77
|
-
*
|
|
65
|
+
* File-based storage adapter
|
|
66
|
+
* Stores SEO records in a JSON file
|
|
67
|
+
* No database required!
|
|
78
68
|
*/
|
|
79
|
-
declare function deleteSEORecord(id: string): Promise<Result<void>>;
|
|
80
69
|
|
|
81
|
-
|
|
70
|
+
declare class FileStorage implements StorageAdapter {
|
|
71
|
+
private filePath;
|
|
72
|
+
private records;
|
|
73
|
+
private initialized;
|
|
74
|
+
constructor(filePath?: string);
|
|
75
|
+
private ensureInitialized;
|
|
76
|
+
private save;
|
|
77
|
+
isAvailable(): Promise<boolean>;
|
|
78
|
+
getRecords(): Promise<SEORecord[]>;
|
|
79
|
+
getRecordById(id: string): Promise<SEORecord | null>;
|
|
80
|
+
getRecordByRoute(routePath: string): Promise<SEORecord | null>;
|
|
81
|
+
createRecord(record: CreateSEORecord): Promise<SEORecord>;
|
|
82
|
+
updateRecord(record: UpdateSEORecord): Promise<SEORecord>;
|
|
83
|
+
deleteRecord(id: string): Promise<void>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { CreateSEORecord, FileStorage, SEORecord, type StorageAdapter, type StorageConfig, type StorageType, UpdateSEORecord, createStorageAdapter, detectStorageConfig };
|