@peam-ai/next 0.1.2 → 0.1.4
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/index.d.mts +10 -20
- package/dist/index.d.ts +10 -20
- package/dist/index.js +2552 -81
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2533 -82
- package/dist/index.mjs.map +1 -1
- package/dist/peam.adapter.js +22 -29
- package/dist/peam.adapter.js.map +1 -1
- package/dist/route.d.mts +0 -8
- package/dist/route.d.ts +0 -8
- package/dist/route.js +2554 -1
- package/dist/route.js.map +1 -1
- package/dist/route.mjs +2533 -1
- package/dist/route.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { NextConfig, NextAdapter } from 'next';
|
|
2
|
+
import { SearchExporterConfig, SearchIndexExporter } from '@peam-ai/search';
|
|
2
3
|
|
|
3
|
-
interface
|
|
4
|
+
interface PeamConfig {
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @default '.peam'
|
|
6
|
+
* Search exporter configuration
|
|
7
|
+
* @default { type: 'fileBased', config: { indexPath: '.peam/index.json' } }
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Filename for the search index
|
|
11
|
-
* @default 'index.json'
|
|
12
|
-
*/
|
|
13
|
-
indexFilename?: string;
|
|
9
|
+
searchExporter?: SearchExporterConfig;
|
|
14
10
|
/**
|
|
15
11
|
* Whether to respect robots.txt rules when indexing pages
|
|
16
12
|
* @default true
|
|
@@ -31,18 +27,12 @@ interface PeamAdapterConfig {
|
|
|
31
27
|
*/
|
|
32
28
|
exclude?: string[];
|
|
33
29
|
}
|
|
34
|
-
type ResolvedPeamAdapterConfig = Required<Omit<
|
|
30
|
+
type ResolvedPeamAdapterConfig = Required<Omit<PeamConfig, 'robotsTxtPath' | 'searchExporter'>> & {
|
|
35
31
|
robotsTxtPath?: string;
|
|
32
|
+
searchIndexExporter: SearchIndexExporter;
|
|
36
33
|
};
|
|
37
|
-
declare
|
|
38
|
-
outputDir: string;
|
|
39
|
-
indexFilename: string;
|
|
40
|
-
respectRobotsTxt: true;
|
|
41
|
-
robotsTxtPath: undefined;
|
|
42
|
-
exclude: never[];
|
|
43
|
-
};
|
|
34
|
+
declare function setNextConfig(nextConfig: NextConfig, peamConfig?: PeamConfig): void;
|
|
44
35
|
declare const getConfig: () => ResolvedPeamAdapterConfig;
|
|
45
|
-
declare function setNextConfig(nextConfig: NextConfig, peamConfig: PeamAdapterConfig): void;
|
|
46
36
|
|
|
47
37
|
declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapter;
|
|
48
38
|
|
|
@@ -59,6 +49,6 @@ declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapt
|
|
|
59
49
|
* });
|
|
60
50
|
* ```
|
|
61
51
|
*/
|
|
62
|
-
declare function withPeam(peamConfig?:
|
|
52
|
+
declare function withPeam(peamConfig?: PeamConfig): (nextConfig?: NextConfig) => NextConfig;
|
|
63
53
|
|
|
64
|
-
export { type
|
|
54
|
+
export { type PeamConfig, type ResolvedPeamAdapterConfig, createPeamAdapter, getConfig, setNextConfig, withPeam };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { NextConfig, NextAdapter } from 'next';
|
|
2
|
+
import { SearchExporterConfig, SearchIndexExporter } from '@peam-ai/search';
|
|
2
3
|
|
|
3
|
-
interface
|
|
4
|
+
interface PeamConfig {
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @default '.peam'
|
|
6
|
+
* Search exporter configuration
|
|
7
|
+
* @default { type: 'fileBased', config: { indexPath: '.peam/index.json' } }
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Filename for the search index
|
|
11
|
-
* @default 'index.json'
|
|
12
|
-
*/
|
|
13
|
-
indexFilename?: string;
|
|
9
|
+
searchExporter?: SearchExporterConfig;
|
|
14
10
|
/**
|
|
15
11
|
* Whether to respect robots.txt rules when indexing pages
|
|
16
12
|
* @default true
|
|
@@ -31,18 +27,12 @@ interface PeamAdapterConfig {
|
|
|
31
27
|
*/
|
|
32
28
|
exclude?: string[];
|
|
33
29
|
}
|
|
34
|
-
type ResolvedPeamAdapterConfig = Required<Omit<
|
|
30
|
+
type ResolvedPeamAdapterConfig = Required<Omit<PeamConfig, 'robotsTxtPath' | 'searchExporter'>> & {
|
|
35
31
|
robotsTxtPath?: string;
|
|
32
|
+
searchIndexExporter: SearchIndexExporter;
|
|
36
33
|
};
|
|
37
|
-
declare
|
|
38
|
-
outputDir: string;
|
|
39
|
-
indexFilename: string;
|
|
40
|
-
respectRobotsTxt: true;
|
|
41
|
-
robotsTxtPath: undefined;
|
|
42
|
-
exclude: never[];
|
|
43
|
-
};
|
|
34
|
+
declare function setNextConfig(nextConfig: NextConfig, peamConfig?: PeamConfig): void;
|
|
44
35
|
declare const getConfig: () => ResolvedPeamAdapterConfig;
|
|
45
|
-
declare function setNextConfig(nextConfig: NextConfig, peamConfig: PeamAdapterConfig): void;
|
|
46
36
|
|
|
47
37
|
declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapter;
|
|
48
38
|
|
|
@@ -59,6 +49,6 @@ declare function createPeamAdapter(config: ResolvedPeamAdapterConfig): NextAdapt
|
|
|
59
49
|
* });
|
|
60
50
|
* ```
|
|
61
51
|
*/
|
|
62
|
-
declare function withPeam(peamConfig?:
|
|
52
|
+
declare function withPeam(peamConfig?: PeamConfig): (nextConfig?: NextConfig) => NextConfig;
|
|
63
53
|
|
|
64
|
-
export { type
|
|
54
|
+
export { type PeamConfig, type ResolvedPeamAdapterConfig, createPeamAdapter, getConfig, setNextConfig, withPeam };
|